gh-125235: Keep _tkinter TCL paths pointing to base installation on Windows#125250
gh-125235: Keep _tkinter TCL paths pointing to base installation on Windows#125250vstinner merged 1 commit intopython:mainfrom
_tkinter TCL paths pointing to base installation on Windows#125250Conversation
Misc/NEWS.d/next/Library/2024-10-10-18-33-31.gh-issue-125235.0kOB5I.rst
Outdated
Show resolved
Hide resolved
|
|
||
| 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.
I think removing //bordered reference is more appropriate, because you have already explained it above.
There was a problem hiding this comment.
I removed my extra comment line, since it's neither a workaround nor a corner case.
There was a problem hiding this comment.
So deprecated Py_GetPath() should be replaced with PySys_GetObject("base_prefix"), instead of PySys_GetObject("prefix")?
There was a problem hiding this comment.
So deprecated
Py_GetPath()should be replaced withPySys_GetObject("base_prefix"), instead ofPySys_GetObject("prefix")?
Yeah, the equivalent of Py_GetPath / Py_GetPrefix should be sys.base_prefix, since sys.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 <[email protected]>
39ebf07 to
dbe4d9a
Compare
…ion on Windows (pythonGH-125250) (cherry picked from commit b3aa1b5) Co-authored-by: Y5 <[email protected]> Signed-off-by: y5c4l3 <[email protected]>
|
GH-125312 is a backport of this pull request to the 3.13 branch. |
|
Thank you for your bugfix @y5c4l3. I merged your PR. |
|
@y5c4l3: Do you want to propose a fix for the Py_GetPrefix() deprecation doc? |
…tion on Windows (GH-125250) (#125312) gh-125235: Keep `_tkinter` TCL paths pointing to base installation on Windows (GH-125250) (cherry picked from commit b3aa1b5) Signed-off-by: y5c4l3 <[email protected]> Co-authored-by: Y5 <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.