Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Merged
ericsnowcurrently merged 7 commits into
python:3.12python/cpython:3.12from
ericsnowcurrently:backport-a040a32-fix-sys-path-0ericsnowcurrently/cpython:backport-a040a32-fix-sys-path-0Copy head branch name to clipboard
Nov 27, 2023
Merged

[3.12] gh-109853: Fix sys.path[0] For Subinterpreters (gh-109994)#110701
ericsnowcurrently merged 7 commits into
python:3.12python/cpython:3.12from
ericsnowcurrently:backport-a040a32-fix-sys-path-0ericsnowcurrently/cpython:backport-a040a32-fix-sys-path-0Copy head branch name to clipboard

Conversation

@ericsnowcurrently

Copy link
Copy Markdown
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)
Comment thread Include/internal/pycore_runtime.h Outdated
Comment thread Modules/main.c Outdated
@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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.