Skip to content

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Dec 25, 2021

The registry() method of functools.singledispatch() functions checks now
the first argument or the first parameter annotation and raises a TypeError if it is
not supported. Previously unsupported "types" were ignored (e.g. typing.List[int])
or caused an error at calling time (e.g. list[int]).

(cherry picked from commit 078abb6)
(cherry picked from commit 03c7449)

Co-authored-by: Serhiy Storchaka [email protected]

https://bugs.python.org/issue46032

…ration time (pythonGH-30050) (pythonGH-30254)

The registry() method of functools.singledispatch() functions checks now
the first argument or the first parameter annotation and raises a TypeError if it is
not supported. Previously unsupported "types" were ignored (e.g. typing.List[int])
or caused an error at calling time (e.g. list[int]).

(cherry picked from commit 078abb6)
(cherry picked from commit 03c7449)

Co-authored-by: Serhiy Storchaka <[email protected]>
@miss-islington
Copy link
Contributor Author

@serhiy-storchaka: Status check is done, and it's a success ❌ .

@serhiy-storchaka serhiy-storchaka changed the title [3.9] [3.10] bpo-46032: Check types in singledispatch's register() at declaration time (GH-30050) (GH-30254) [3.9] bpo-46032: Check types in singledispatch's register() at declaration time (GH-30050) (GH-30254) Dec 26, 2021
@serhiy-storchaka serhiy-storchaka merged commit 25a12aa into python:3.9 Dec 26, 2021
@miss-islington miss-islington deleted the backport-03c7449-3.9 branch December 26, 2021 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants