[issue34498] Python 3.7+ break on singledispatch_function.register(pseudo_type), which Python 3.6 accepted

Guido van Rossum report at bugs.python.org
Tue Dec 28 19:50:49 EST 2021


Guido van Rossum <guido at python.org> added the comment:

There's no point in lamenting the compatibility with Python 3.6, it's water under the bridge. Dispatching on types like list[int] or types generated by NewType is not realistic. Maybe the only thing left to do is to raise an error on registration when the type is e.g. list[int]? Currently that passes, but then attempting to dispatch on *anything* fails with TypeError: issubclass() argument 2 cannot be a parameterized generic

----------
nosy: +gvanrossum, serhiy.storchaka

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


More information about the Python-bugs-list mailing list