-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
3.11 regression: default arguments in PyEval_EvalCodeEx #101072
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
Comments
@larryhastings This may be of interest since you authored #92175 |
The only usage of So the only context in which the regression matters is external use of EDIT: just realized you already have a PR and reached the same conclusion :) |
…11+ (#101127) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
…CodeEx for 3.11+ (pythonGH-101127) Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit ae62bdd) Co-authored-by: Matthieu Dartiailh <m.dartiailh@gmail.com>
This can now be closed I believe. |
Bug report
3.11 Started using
_PyFunction_FromConstructor
inside PyEval_EvalCodeEx. #92173 reported that this caused issues when closures were involved because_PyFunction_FromConstructor
discarded the closure found inPyFrameConstructor
. This was fixed in #92175.It turns out the same holds true for default arguments and default kw arguments as can be seen at https://github.com/python/cpython/blob/main/Objects/funcobject.c#L90-L91 and is a regression compared to 3.10.
The fix appears fairly simple but I would love to have some guidance as to where to add a test for it.
Your environment
Linked PRs
The text was updated successfully, but these errors were encountered: