Skip to content

[3.12] gh-109853: Fix sys.path[0] For Subinterpreters (gh-109994) #110701

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

Conversation

ericsnowcurrently
Copy link
Member

This change makes sure sys.path[0] is set properly for subinterpreters. Before, it wasn't getting set at all.

This change does not address the broader concerns from gh-109853.

Note that here, unlike in main, we do not add PyConfig.sys_path_0, since that changes the ABI. Instead, we add _PyRuntimeState.sys_path_0.

(cherry-picked from commit a040a32)

…-109994)

This change makes sure sys.path[0] is set properly for subinterpreters.  Before, it wasn't getting set at all.

This change does not address the broader concerns from pythongh-109853.

(cherry-picked from commit a040a32)
@ericsnowcurrently ericsnowcurrently enabled auto-merge (squash) November 27, 2023 22:15
@ericsnowcurrently ericsnowcurrently merged commit 3135544 into python:3.12 Nov 27, 2023
@ericsnowcurrently ericsnowcurrently deleted the backport-a040a32-fix-sys-path-0 branch November 27, 2023 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants