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

2021-12-30 Thread wrobell
wrobell added the comment: To add bit more context, there is a discussion about Python types and annotation types, where suggestion of closing this bug has been raised https://github.com/python/mypy/issues/9773 The discussion is about the need of distinction between Python types and

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

2021-12-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker ___

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

2021-12-29 Thread Guido van Rossum
Guido van Rossum added the comment: Let's close this issue as "won't fix" then. The solution "use collections.abc.Sequence" makes sense. -- ___ Python tracker ___

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

2021-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The original issue is about dispatching on non-parametrized generics like typing.Sequence. isinstance([], typing.Sequence) works, so it could be possible to support dispatching on typing.Sequence. But I have doubts that it is worth to revive such feature,

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

2021-12-28 Thread Alex Waygood
Alex Waygood added the comment: Guido: Serhiy fixed this very recently in Issue46032. The documentation should probably be improved, however, in my opinion; there's currently nothing officially stating that GenericAlias/NewType/typing aliases are unsupported. Support for

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

2021-12-28 Thread Guido van Rossum
Guido van Rossum 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

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

2021-11-09 Thread Alex Waygood
Change by Alex Waygood : -- keywords: +patch nosy: +AlexWaygood nosy_count: 8.0 -> 9.0 pull_requests: +27759 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29508 ___ Python tracker

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

2021-09-07 Thread Irit Katriel
Change by Irit Katriel : -- title: Python 3.7 breaks on singledispatch_function.register(pseudo_type), which Python 3.6 accepted -> Python 3.7+ break on singledispatch_function.register(pseudo_type), which Python 3.6 accepted ___ Python tracker