[New-bugs-announce] [issue42332] add __weakref__ to types.GenericAlias

Tin Tvrtković report at bugs.python.org
Thu Nov 12 07:04:09 EST 2020


New submission from Tin Tvrtković <tinchester at gmail.com>:

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: https://github.com/python/typing/issues/345

----------
messages: 380816
nosy: gvanrossum, tinchester
priority: normal
severity: normal
status: open
title: add __weakref__ to types.GenericAlias
type: enhancement
versions: Python 3.10, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42332>
_______________________________________


More information about the New-bugs-announce mailing list