Skip to content

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

Closed

Description

@iyume

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)

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    on Aug 18, 2022
  2. added a commit that references this issue on Aug 18, 2022
  3. added a commit that references this issue on Aug 31, 2022
  4. HACKED-need-HELP commented on Oct 30, 2022

    @HACKED-need-HELP
  5. AlexWaygood commented on Oct 30, 2022

    @AlexWaygood
    Member

    @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.

  6. AlexWaygood commented on Oct 30, 2022

    @AlexWaygood
    Member

    (Reopened the issue by accident!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions