8000 gh-133644: remove deprecated global configuration variables by picnixz · Pull Request #133654 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-133644: remove deprecated global configuration variables #133654

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

Draft
wants to merge 30 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
12f494a
remove `Py_BytesWarningFlag`
picnixz May 8, 2025
a6467f8
remove `Py_DebugFlag`
picnixz May 8, 2025
df48806
remove `Py_VerboseFlag`
picnixz May 8, 2025
cfabb22
remove `Py_QuietFlag`
picnixz May 8, 2025
71bca31
remove `Py_InspectFlag`
picnixz May 8, 2025
7ebf7bd
remove `Py_OptimizeFlag`
picnixz May 8, 2025
2d05afe
remove `Py_NoSiteFlag`
picnixz May 8, 2025
2a8e546
remove `Py_FrozenFlag`
picnixz May 8, 2025
93eee09
remove `Py_IgnoreEnvironmentFlag`
picnixz May 8, 2025
311f95c
remove `Py_DontWriteBytecodeFlag`
picnixz May 8, 2025
f5b39db
remove `Py_NoUserSiteDirectory`
picnixz May 8, 2025
c66edb3
remove `Py_UnbufferedStdioFlag`
picnixz May 8, 2025
9116a65
remove `Py_HashRandomizationFlag`
picnixz May 8, 2025
fb2a247
remove `Py_IsolatedFlag`
picnixz May 8, 2025
86c0c87
remove `Py_LegacyWindowsFSEncodingFlag`
picnixz May 8, 2025
eab9e01
remove `Py_LegacyWindowsStdioFlag`
picnixz May 8, 2025
54ff2aa
remove `Py_FileSystemDefaultEncoding` and `Py_HasFileSystemDefaultEnc…
picnixz May 8, 2025
9a322fe
remove `Py_FileSystemDefaultEncodeErrors`
picnixz May 8, 2025
d4ff0f7
fix test_embed
picnixz May 8, 2025
5d59540
blurb
picnixz May 8, 2025
eef039e
update What's New entries
picnixz May 8, 2025
1248cea
update docs
picnixz May 8, 2025
583bafb
update docutils refs
picnixz May 8, 2025
daa1e2d
fixup
picnixz May 8, 2025
6c7baa2
revert `putenv` statements
picnixz May 8, 2025
d9f4def
restore file
picnixz May 8, 2025
279ac00
update stable ABI symbols
picnixz May 8, 2025
cddebbe
revert runtime changes for now
picnixz May 8, 2025
b8afe23
Merge remote-tracking branch 'upstream/main' into cleanup/315/depreca…
picnixz May 9, 2025
8a2173f
Merge remote-tracking branch 'upstream/main' into cleanup/315/depreca…
picnixz Jun 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove Py_HashRandomizationFlag
  • Loading branch information
picnixz committed May 8, 2025
commit 9116a65fabf4b308213106aacd49a44741af9423
16 changes: 0 additions & 16 deletions Doc/c-api/init.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,22 +98,6 @@ that the option was set. For example, ``-b`` sets :c:data:`Py_BytesWarningFlag`
to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.


.. c:var:: int Py_HashRandomizationFlag

This API is kept for backward compatibility: setting
:c:member:`PyConfig.hash_seed` and :c:member:`PyConfig.use_hash_seed` should
be used instead, see :ref:`Python Initialization Configuration
<init-config>`.

Set to ``1`` if the :envvar:`PYTHONHASHSEED` environment variable is set to
a non-empty string.

If the flag is non-zero, read the :envvar:`PYTHONHASHSEED` environment
variable to initialize the secret hash seed.

.. deprecated-removed:: 3.12 3.15


.. c:var:: int Py_InteractiveFlag

This API is kept for backward compatibility: setting
Expand Down
4 changes: 0 additions & 4 deletions Doc/deprecations/c-api-pending-removal-in-3.15.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ Pending removal in Python 3.15
* :c:var:`Py_InteractiveFlag`:
Use :c:member:`PyConfig.interactive` or
:c:func:`PyConfig_Get("interactive") <PyConfig_Get>` instead.
* :c:var:`Py_HashRandomizationFlag`:
Use :c:member:`PyConfig.use_hash_seed`
and :c:member:`PyConfig.hash_seed` or
:c:func:`PyConfig_Get("hash_seed") <PyConfig_Get>` instead.
* :c:var:`Py_IsolatedFlag`:
Use :c:member:`PyConfig.isolated` or
:c:func:`PyConfig_Get("isolated") <PyConfig_Get>` instead.
Expand Down
1 change: 0 additions & 1 deletion Include/cpython/pydebug.h
10000
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ extern "C" {
#endif

Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_InteractiveFlag;
Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_HashRandomizationFlag;
Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_IsolatedFlag;

#ifdef MS_WINDOWS
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,6 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
# global config
DEFAULT_GLOBAL_CONFIG = {
'Py_HasFileSystemDefaultEncoding': 0,
'Py_HashRandomizationFlag': 1,
'_Py_HasFileSystemDefaultEncodeErrors': 0,
}
COPY_GLOBAL_PRE_CONFIG = [
Expand Down
6 changes: 0 additions & 6 deletions Python/initconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,6 @@ static const char usage_envvars[] =
stdin and stdout error handler to "surrogateescape". */
int Py_UTF8Mode = 0;
int Py_InteractiveFlag = 0; /* Previously, was used by Py_FdIsInteractive() */
int Py_HashRandomizationFlag = 0; /* for -R and PYTHONHASHSEED */
int Py_IsolatedFlag = 0; /* for -I, isolate from user's env */
#ifdef MS_WINDOWS
int Py_LegacyWindowsFSEncodingFlag = 0; /* Uses mbcs instead of utf-8 */
Expand Down Expand Up @@ -512,7 +511,6 @@ _Py_COMP_DIAG_IGNORE_DEPR_DECLS
SET_ITEM_INT(Py_UTF8Mode);
SET_ITEM_INT(Py_InteractiveFlag);

SET_ITEM_INT(Py_HashRandomizationFlag);
SET_ITEM_INT(Py_IsolatedFlag);

#ifdef MS_WINDOWS
Expand Down Expand Up @@ -1690,10 +1688,6 @@ _Py_COMP_DIAG_IGNORE_DEPR_DECLS
COPY_FLAG(legacy_windows_stdio, Py_LegacyWindowsStdioFlag);
#endif

/* Random or non-zero hash seed */
Py_HashRandomizationFlag = (config->use_hash_seed == 0 ||
config->hash_seed != 0);

#undef COPY_FLAG
#undef COPY_NOT_FLAG
_Py_COMP_DIAG_POP
Expand Down
1 change: 0 additions & 1 deletion Tools/c-analyzer/cpython/ignored.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ Python/preconfig.c - _Py_HasFileSystemDefaultEncodeErrors -
## legacy config flags
Python/initconfig.c - Py_UTF8Mode -
Python/initconfig.c - Py_InteractiveFlag -
Python/initconfig.c - Py_HashRandomizationFlag -
Python/initconfig.c - Py_IsolatedFlag -
Python/initconfig.c - Py_LegacyWindowsFSEncodingFlag -
Python/initconfig.c - Py_LegacyWindowsStdioFlag -
Expand Down
0