8000 Lib/typing.py Missing field _name for _AnnotatedAlias · Issue #96079 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Lib/typing.py Missing field _name for _AnnotatedAlias #96079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
iyume opened this issue Aug 18, 2022 · 3 comments
Closed

Lib/typing.py Missing field _name for _AnnotatedAlias #96079

iyume opened this issue Aug 18, 2022 · 3 comments
Labels
topic-typing type-bug An unexpected behavior, bug, or error

Comments

@iyume
Copy link
Contributor
iyume commented Aug 18, 2022

Bug report

Relate to: https://github.com/python/cpython/blob/main/Lib/typing.py#L2102

_AnnotatedAlias should give name="Annotated" to _GenericAlias

The cpython main branch add the __getattr__ to define a different behaviour from _GenericAlias

I wonder if this is a bug.

To perform a runtime check, I can only use sys.version_info >= (3, 9) and isinstance(obj, _AnnotatedAlias)

@HACKED-need-HELP

This comment was marked as spam.

@AlexWaygood
Copy link
Member
AlexWaygood commented Oct 30, 2022

@python/organization-owners, can you block @HACKED-need-HELP as a spammer, please? They seem to be posting bizarre messages like this in several Python-organisation repositories.

@AlexWaygood
Copy link
Member

(Reopened the issue by accident!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-typing type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

4 participants
0