-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
gh-142737: Handle lost io.open in _Py_FindSourceFile
#142747
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
gh-142737: Handle lost io.open in _Py_FindSourceFile
#142747
Conversation
|
Testing this will be harder because we're in a scenario where |
c74ce79 to
1cb2a7e
Compare
a95f248 to
e5c77a0
Compare
|
Not sure about whether reusing |
callable isn't NULL in _PyObject_CallMethodFormatio.open in _Py_FindSourceFile
Misc/NEWS.d/next/Core_and_Builtins/2025-12-15-15-01-21.gh-issue-142737.xYXzeB.rst
Show resolved
Hide resolved
fbeeba3 to
d95a3d4
Compare
|
For some reason the test doesn't crash for a build without the fix ( I'll need to tweak the test and we're ready. |
|
Oh, I think I know why. It doesn't look for source when we pass the code via |
d5700c9 to
6589e9f
Compare
I was going to suggest that, go for it. |
|
@ZeroIntensity ready |
ZeroIntensity
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
Thanks @johnslavik for the PR, and @ZeroIntensity for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
…nGH-142747) (cherry picked from commit f277781) Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
|
Sorry, @johnslavik and @ZeroIntensity, I could not cleanly backport this to |
|
|
GH-142773 is a backport of this pull request to the 3.14 branch. |
…nGH-142747) (cherry picked from commit f277781)
…pythonGH-142747) (cherry picked from commit f277781) Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
|
GH-142774 is a backport of this pull request to the 3.13 branch. |
This fixes the problem in the issue.
WIP: a regrtest is needed.
PyObject *callmethod(PyThreadState *, PyObject *, const char *, struct __va_list_tag *): Assertion 'callable != NULL' failed.#142737