-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-work support of var-positional parameters in Argument Clinic #122943
Labels
Comments
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Aug 12, 2024
…nt Clinic Move creation of a tuple for var-positional parameter out of _PyArg_UnpackKeywordsWithVararg(). Merge _PyArg_UnpackKeywordsWithVararg() with _PyArg_UnpackKeywords(). Add a new parameter in _PyArg_UnpackKeywords(). The "parameters" and "converters" attributes of ParseArgsCodeGen no longer contain the var-positional parameter. It is now available as the "varpos" attribute. Optimize code generation for var-positional parameter and reuse the same generating code for functions with and without keyword parameters.
Changes in most of Argument Clinic generated files (which correspond to unchanged source files) can be ignored. Sorry, all these review requests are false. |
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Aug 12, 2024
…nt Clinic Move creation of a tuple for var-positional parameter out of _PyArg_UnpackKeywordsWithVararg(). Merge _PyArg_UnpackKeywordsWithVararg() with _PyArg_UnpackKeywords(). Add a new parameter in _PyArg_UnpackKeywords(). The "parameters" and "converters" attributes of ParseArgsCodeGen no longer contain the var-positional parameter. It is now available as the "varpos" attribute. Optimize code generation for var-positional parameter and reuse the same generating code for functions with and without keyword parameters.
serhiy-storchaka
added a commit
that referenced
this issue
Nov 7, 2024
…nic (GH-122945) Move creation of a tuple for var-positional parameter out of _PyArg_UnpackKeywordsWithVararg(). Merge _PyArg_UnpackKeywordsWithVararg() with _PyArg_UnpackKeywords(). Add a new parameter in _PyArg_UnpackKeywords(). The "parameters" and "converters" attributes of ParseArgsCodeGen no longer contain the var-positional parameter. It is now available as the "varpos" attribute. Optimize code generation for var-positional parameter and reuse the same generating code for functions with and without keyword parameters. Add special converters for var-positional parameter. "tuple" represents it as a Python tuple and "array" represents it as a continuous array of PyObject*. "object" is a temporary alias of "tuple".
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Nov 7, 2024
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Nov 7, 2024
serhiy-storchaka
added a commit
that referenced
this issue
Nov 8, 2024
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Nov 8, 2024
Remove _PyArg_UnpackKeywordsWithVararg. Add comments for integer arguments of _PyArg_UnpackKeywords.
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Nov 8, 2024
Remove _PyArg_UnpackKeywordsWithVararg. Add comments for integer arguments of _PyArg_UnpackKeywords.
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Nov 8, 2024
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Nov 8, 2024
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Nov 8, 2024
serhiy-storchaka
added a commit
that referenced
this issue
Nov 8, 2024
serhiy-storchaka
added a commit
that referenced
this issue
Nov 8, 2024
Remove _PyArg_UnpackKeywordsWithVararg. Add comments for integer arguments of _PyArg_UnpackKeywords.
picnixz
pushed a commit
to picnixz/cpython
that referenced
this issue
Dec 8, 2024
…nt Clinic (pythonGH-122945) Move creation of a tuple for var-positional parameter out of _PyArg_UnpackKeywordsWithVararg(). Merge _PyArg_UnpackKeywordsWithVararg() with _PyArg_UnpackKeywords(). Add a new parameter in _PyArg_UnpackKeywords(). The "parameters" and "converters" attributes of ParseArgsCodeGen no longer contain the var-positional parameter. It is now available as the "varpos" attribute. Optimize code generation for var-positional parameter and reuse the same generating code for functions with and without keyword parameters. Add special converters for var-positional parameter. "tuple" represents it as a Python tuple and "array" represents it as a continuous array of PyObject*. "object" is a temporary alias of "tuple".
picnixz
pushed a commit
to picnixz/cpython
that referenced
this issue
Dec 8, 2024
picnixz
pushed a commit
to picnixz/cpython
that referenced
this issue
Dec 8, 2024
picnixz
pushed a commit
to picnixz/cpython
that referenced
this issue
Dec 8, 2024
…ythonGH-126564) Remove _PyArg_UnpackKeywordsWithVararg. Add comments for integer arguments of _PyArg_UnpackKeywords.
ebonnal
pushed a commit
to ebonnal/cpython
that referenced
this issue
Jan 12, 2025
…nt Clinic (pythonGH-122945) Move creation of a tuple for var-positional parameter out of _PyArg_UnpackKeywordsWithVararg(). Merge _PyArg_UnpackKeywordsWithVararg() with _PyArg_UnpackKeywords(). Add a new parameter in _PyArg_UnpackKeywords(). The "parameters" and "converters" attributes of ParseArgsCodeGen no longer contain the var-positional parameter. It is now available as the "varpos" attribute. Optimize code generation for var-positional parameter and reuse the same generating code for functions with and without keyword parameters. Add special converters for var-positional parameter. "tuple" represents it as a Python tuple and "array" represents it as a continuous array of PyObject*. "object" is a temporary alias of "tuple".
ebonnal
pushed a commit
to ebonnal/cpython
that referenced
this issue
Jan 12, 2025
ebonnal
pushed a commit
to ebonnal/cpython
that referenced
this issue
Jan 12, 2025
ebonnal
pushed a commit
to ebonnal/cpython
that referenced
this issue
Jan 12, 2025
…ythonGH-126564) Remove _PyArg_UnpackKeywordsWithVararg. Add comments for integer arguments of _PyArg_UnpackKeywords.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When fixing some bugs (#118814, #122688) I noticed also design problems in
_PyArg_UnpackKeywordsWithVararg()
.vararg
parameter is always equal tomaxpos
, therefore it is redundant._PyArg_UnpackKeywordsWithVararg()
code which caused bugs._PyArg_UnpackKeywordsWithVararg()
._PyArg_UnpackKeywords()
.So I re-worked it in several steps:
vararg
parameter from_PyArg_UnpackKeywordsWithVararg()
._PyArg_UnpackKeywordsWithVararg()
._PyArg_UnpackKeywordsWithVararg()
was merged with_PyArg_UnpackKeywords()
which now got a new flag.Linked PRs
The text was updated successfully, but these errors were encountered: