Repository navigation
Preserve Value's runtime annotation namespace - #51
Open
Quinnod345 wants to merge 1 commit into
Open
Quinnod345 wants to merge 1 commit into
Quinnod345 wants to merge 1 commit into
Conversation
Public metadata normalization moves Value to outcome, while its postponed field annotation still resolves ValueT through that module. Bind the exact existing type variable so default typing and attrs class introspection works without replacing public objects or changing the export list. Add focused regressions and a user-visible bugfix fragment. The identical regression fails before and passes after on the checked minimum and current Python/attrs combinations; native suites, formatting, type checks, configured coverage, builds and installed-wheel checks pass locally.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After
import outcome,typing.get_type_hints(outcome.Value)raisesNameErrorforValueT.attr.resolve_types(outcome.Value)fails for the same reason where that API is available: metadata normalization moves the class tooutcome, but its postponed field annotation still needs the type variable fromoutcome._impl.Bind that exact existing type variable in the lookup namespace. The seven-name
__all__, public object identities and module names remain intact. Add focused regressions, preservation controls and a bugfix fragment.Local macOS validation:
I maintain Ponder. Its review flagged this case; I reproduced it and implemented the fix.