Skip to content

bpo-44793: Fix checking the number of arguments when subscribe a gene…#27515

Merged
serhiy-storchaka merged 1 commit intopython:mainfrom
serhiy-storchaka:typing-generic-paramspec-numargs
Aug 2, 2021
Merged

bpo-44793: Fix checking the number of arguments when subscribe a gene…#27515
serhiy-storchaka merged 1 commit intopython:mainfrom
serhiy-storchaka:typing-generic-paramspec-numargs

Conversation

@serhiy-storchaka
Copy link
Copy Markdown
Member

@serhiy-storchaka serhiy-storchaka commented Jul 31, 2021

…ric type with ParamSpec parameter.

For example Callable[P, T][[int], str, float] will now raise an error.

Use also the term "arguments" instead of "parameters" in error
message for too few/many arguments.

https://bugs.python.org/issue44793

@serhiy-storchaka serhiy-storchaka added type-bug An unexpected behavior, bug, or error needs backport to 3.10 only security fixes labels Jul 31, 2021
@serhiy-storchaka serhiy-storchaka force-pushed the typing-generic-paramspec-numargs branch from 14d2277 to fa6937f Compare July 31, 2021 17:37
…ric type with ParamSpec parameter.

For example Callable[P, T][[int], str, float] will now raise an error.

Use also the term "arguments" instead of "parameters" in error
message for too few/many arguments.
@serhiy-storchaka serhiy-storchaka force-pushed the typing-generic-paramspec-numargs branch from fa6937f to 0db1b4d Compare July 31, 2021 17:38
@serhiy-storchaka serhiy-storchaka merged commit f92b913 into python:main Aug 2, 2021
@miss-islington
Copy link
Copy Markdown
Contributor

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

@serhiy-storchaka serhiy-storchaka deleted the typing-generic-paramspec-numargs branch August 2, 2021 06:17
@bedevere-bot
Copy link
Copy Markdown

GH-27537 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Aug 2, 2021
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 2, 2021
…ric type with ParamSpec parameter. (pythonGH-27515)

For example Callable[P, T][[int], str, float] will now raise an error.

Use also term "arguments" instead of "parameters" in error
message for too few/many arguments.
(cherry picked from commit f92b913)

Co-authored-by: Serhiy Storchaka <[email protected]>
miss-islington added a commit that referenced this pull request Aug 2, 2021
…ric type with ParamSpec parameter. (GH-27515)

For example Callable[P, T][[int], str, float] will now raise an error.

Use also term "arguments" instead of "parameters" in error
message for too few/many arguments.
(cherry picked from commit f92b913)

Co-authored-by: Serhiy Storchaka <[email protected]>
@Fidget-Spinner
Copy link
Copy Markdown
Member

Sorry, I wasn't able to review this on time Serhiy.

Looking at this after the merge, it looks good. Thanks!

@serhiy-storchaka
Copy link
Copy Markdown
Member Author

It would be good to have a review, but I merged this PR because it is relatively simple and is a prerequisite of other more complex changes.

The code changed in this PR will likely be rewritten in future, I am just not sure that that changes will be backported.

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