bpo-34498: Warn against using deprecated typing aliases with @singledispatch - #29508
bpo-34498: Warn against using deprecated typing aliases with @singledispatch#29508AlexWaygood wants to merge 2 commits into
typing aliases with @singledispatch#29508Conversation
…ingledispatch`` Attempting to register a ``singledispatch`` implementation on certain aliases from the ``typing`` module will lead to an exception being raised. Since these aliases are all deprecated, this PR proposes simply adding a note to the documentation steering users towards PEP 585-style syntax.
|
Other than 2 minor comments, looks good to me. |
Thanks for taking a look! |
It actually seems that this would be a bad change to make -- while registering an implementation to |
|
Note that the part about using |
True, but how many people on Python <3.9 use |
|
Yes, I agree; just wanted to note it for reference for the future if someone refers to this PR. |
Attempting to register a
singledispatchimplementation on certain aliasesfrom the
typingmodule will lead to an exception being raised. Since thesealiases are all deprecated, this PR proposes simply adding a note to the
documentation steering users towards PEP 585-style syntax.
https://bugs.python.org/issue34498