FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.10] bpo-46032: Check types in singledispatch's register() at declaration time (GH-30050) by serhiy-storchaka · Pull Request #30254 · python/cpython · GitHub

/ cpython Public

[3.10] bpo-46032: Check types in singledispatch's register() at declaration time (GH-30050) - #30254

Merged
serhiy-storchaka merged 1 commit into
python:3.10from
serhiy-storchaka:backport-078abb6-3.10
Dec 25, 2021
Merged

[3.10] bpo-46032: Check types in singledispatch's register() at declaration time (GH-30050)#30254
serhiy-storchaka merged 1 commit into
python:3.10from
serhiy-storchaka:backport-078abb6-3.10

Conversation

serhiy-storchaka commented Dec 25, 2021
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

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)

https://bugs.python.org/issue46032

…time (pythonGH-30050)

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)
serhiy-storchaka changed the title bpo-46032: Check types in singledispatch's register() at declaration time (GH-30050) [3.10] bpo-46032: Check types in singledispatch's register() at declaration time (GH-30050) Dec 25, 2021
bedevere-bot added the type-bug An unexpected behavior, bug, or error label Dec 25, 2021
serhiy-storchaka merged commit 03c7449 into python:3.10 Dec 25, 2021

Copy link
Copy Markdown
Contributor

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

serhiy-storchaka deleted the backport-078abb6-3.10 branch December 25, 2021 14:12

Copy link
Copy Markdown

GH-30255 is a backport of this pull request to the 3.9 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 25, 2021
…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 <storchaka@gmail.com>
serhiy-storchaka added a commit that referenced this pull request Dec 26, 2021
…ation time (GH-30050) (GH-30254) (GH-30255)

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 <storchaka@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

5 participants


Back | FazBrowse Home | New Git URL