Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-125235: Keep_tkinter TCL paths pointing to base installation on Windows#125250
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Misc/NEWS.d/next/Library/2024-10-10-18-33-31.gh-issue-125235.0kOB5I.rst OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
| PyObject*prefix=PySys_GetObject("prefix");// borrowed reference | ||
| /* gh-125235: Should not use "prefix" which might point to venv root. */ | ||
| PyObject*prefix=PySys_GetObject("base_prefix");// borrowed reference |
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.
I think removing//bordered reference is more appropriate, because you have already explained it above.
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.
I removed my extra comment line, since it's neither a workaround nor a corner case.
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.
So deprecatedPy_GetPath() should be replaced withPySys_GetObject("base_prefix"), instead ofPySys_GetObject("prefix")?
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.
So deprecated
Py_GetPath()should be replaced withPySys_GetObject("base_prefix"), instead ofPySys_GetObject("prefix")?
Yeah, the equivalent ofPy_GetPath /Py_GetPrefix should besys.base_prefix, sincesys.prefix takes venv into consideration. I think it's necessary to clarify it in their deprecation notes:https://docs.python.org/3/c-api/init.html#c.Py_GetPrefix
Signed-off-by: y5c4l3 <y5c4l3@proton.me>
vstinner 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
…ion on Windows (pythonGH-125250)(cherry picked from commitb3aa1b5)Co-authored-by: Y5 <124019959+y5c4l3@users.noreply.github.com>Signed-off-by: y5c4l3 <y5c4l3@proton.me>
GH-125312 is a backport of this pull request to the3.13 branch. |
vstinner commentedOct 11, 2024
Thank you for your bugfix@y5c4l3. I merged your PR. |
vstinner commentedOct 11, 2024
@y5c4l3: Do you want to propose a fix for the Py_GetPrefix() deprecation doc? |
Uh oh!
There was an error while loading.Please reload this page.