Skip to content

gh-158001: Remove global configuration variables from C API - #158020

Open
vstinner wants to merge 10 commits into
python:mainfrom
vstinner:remove_global_config
Open

vstinner wants to merge 10 commits into
python:mainfrom
vstinner:remove_global_config

Conversation

@vstinner

@vstinner vstinner commented Sep 23, 2026

Copy link
Copy Markdown
Member

Keep 4 variables in the stable ABI:

  • Py_FileSystemDefaultEncodeErrors
  • Py_FileSystemDefaultEncoding
  • Py_HasFileSystemDefaultEncoding
  • Py_UTF8Mode

Keep 4 variables in the stable ABI:

* Py_FileSystemDefaultEncodeErrors
* Py_FileSystemDefaultEncoding
* Py_HasFileSystemDefaultEncoding
* Py_UTF8Mode
@vstinner

Copy link
Copy Markdown
Member Author

This PR is based on #158014 which prepared the code base for this large removal.

I leave Doc/deprecations/c-api-pending-removal-in-3.16.rst unchanged, since this file is include by What's New in Python 3.12/13/14.

@read-the-docs-community

read-the-docs-community Bot commented Sep 23, 2026

Copy link
Copy Markdown

* test_capi.test_config: Remove test_config_set_global_vars().
* test_ctypes: Get Py_Version variable instead of Py_OptimizeFlag.
Mark the 4 variables as abi_only in Misc/stable_abi.toml.
@vstinner
vstinner requested a review from encukou as a code owner September 23, 2026 20:49
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