We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
GitHub fields:
assignee = None closed_at = <Date 2020-11-17.22:53:26.216> created_at = <Date 2020-11-12.12:04:09.556> labels = ['type-feature', '3.9', '3.10'] title = 'add __weakref__ to types.GenericAlias' updated_at = <Date 2020-11-17.22:53:26.215> user = 'https://github.com/Tinche'
bugs.python.org fields:
activity = <Date 2020-11-17.22:53:26.215> actor = 'gvanrossum' assignee = 'none' closed = True closed_date = <Date 2020-11-17.22:53:26.216> closer = 'gvanrossum' components = [] creation = <Date 2020-11-12.12:04:09.556> creator = 'tinchester' dependencies = [] files = [] hgrepos = [] issue_num = 42332 keywords = ['patch'] message_count = 5.0 messages = ['380816', '380834', '380836', '381060', '381301'] nosy_count = 4.0 nosy_names = ['gvanrossum', 'tinchester', 'miss-islington', 'kj'] pr_nums = ['23250', '23309'] priority = 'normal' resolution = 'fixed' stage = 'resolved' status = 'closed' superseder = None type = 'enhancement' url = 'https://bugs.python.org/issue42332' versions = ['Python 3.9', 'Python 3.10']
The text was updated successfully, but these errors were encountered:
For example, dict[int, int] cannot be used with singledispatch because types.GenericAlias doesn't support weak references.
I'm an author of a third party library (https://github.com/Tinche/cattrs) for which this functionality would be useful.
Here's a similar issue in typing (note that this issue is for *types*.GenericAlias) that was fixed: python/typing#345
Sorry, something went wrong.
It would be great if we could get this into 3.9.
I think it's reasonable to consider this a bug to be fixed.
New changeset 384b7a4 by kj in branch 'master': bpo-42332: Add weakref slot to types.GenericAlias (GH-23250) 384b7a4
New changeset 71ba5f5 by kj in branch '3.9': [3.9] bpo-42332: Add weakref slot to types.GenericAlias (GH-23250) (GH-23309) 71ba5f5
No branches or pull requests
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: