Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
[3.13] gh-130163: Fix crashes related to PySys_GetObject() (GH-130503)#130556
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
[3.13] gh-130163: Fix crashes related to PySys_GetObject() (GH-130503)#130556
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…honGH-130503)The use of PySys_GetObject() and _PySys_GetAttr(), which return a borrowedreference, has been replaced by using one of the following functions, whichreturn a strong reference and distinguish a missing attribute from an error:_PySys_GetOptionalAttr(), _PySys_GetOptionalAttrString(),_PySys_GetRequiredAttr(), and _PySys_GetRequiredAttrString().(cherry picked from commit0ef4ffe)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
7c1b76f
intopython:3.13Uh oh!
There was an error while loading.Please reload this page.
Thanks@serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Sorry,@serhiy-storchaka, I could not cleanly backport this to
|
This change introduced reference leaks in the 3.13 branch. Example:
cc@encukou |
Example of buildbot failure, Fedora Stable (x86):https://buildbot.python.org/#/builders/1471/builds/551 Failed tests:
|
…honGH-130503) (pythonGH-130556)The use of PySys_GetObject() and _PySys_GetAttr(), which return a borrowedreference, has been replaced by using one of the following functions, whichreturn a strong reference and distinguish a missing attribute from an error:_PySys_GetOptionalAttr(), _PySys_GetOptionalAttrString(),_PySys_GetRequiredAttr(), and _PySys_GetRequiredAttrString().(cherry picked from commit0ef4ffe)(cherry picked from commit7c1b76f)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
GH-130576 is a backport of this pull request to the3.12 branch. |
GH-130556) (GH-130576)The use of PySys_GetObject() and _PySys_GetAttr(), which return a borrowedreference, has been replaced by using one of the following functions, whichreturn a strong reference and distinguish a missing attribute from an error:_PySys_GetOptionalAttr(), _PySys_GetOptionalAttrString(),_PySys_GetRequiredAttr(), and _PySys_GetRequiredAttrString().(cherry picked from commit0ef4ffe)(cherry picked from commit7c1b76f)(cherry picked from commit2ab7e11)
Uh oh!
There was an error while loading.Please reload this page.
The use of PySys_GetObject() and _PySys_GetAttr(), which return a borrowed reference, has been replaced by using one of the following functions, which return a strong reference and distinguish a missing attribute from an error: _PySys_GetOptionalAttr(), _PySys_GetOptionalAttrString(), _PySys_GetRequiredAttr(), and _PySys_GetRequiredAttrString(). (cherry picked from commit0ef4ffe)
print
and concurrently modifyingsys.stdout
#130163