Skip to content

gh-158001: No longer read global config vars in PyConfig_Read() - #158014

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:config_remove_global
Sep 23, 2026
Merged

vstinner merged 1 commit into
python:mainfrom
vstinner:config_remove_global

Conversation

@vstinner

@vstinner vstinner commented Sep 23, 2026

Copy link
Copy Markdown
Member

PyConfig_Read() and _PyPreConfig_Read() no longer read global config variables (such as Py_BytesWarningFlag). Instead, PyConfig_Read() now copies PyPreConfig members (isolated, use_environment and dev_mode).

_PyPreConfig_Read() still reads the last global configuration variable: Py_UTF8Mode.

PyConfig_Read() and _PyPreConfig_Read() no longer read global config
variables (such as Py_BytesWarningFlag). Instead, PyConfig_Read() now
copies PyPreConfig members (isolated, use_environment and dev_mode).

_PyPreConfig_Read() still reads the last global configuration
variable: Py_UTF8Mode.
@vstinner
vstinner requested a review from FFY00 as a code owner September 23, 2026 17:15
@vstinner
vstinner merged commit 2f5791d into python:main Sep 23, 2026
56 checks passed
@vstinner
vstinner deleted the config_remove_global branch September 23, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant