New submission from Tin Tvrtković <tinches...@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 <rep...@bugs.python.org> <https://bugs.python.org/issue42332> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com