From 3a004aa858ffb995f938c78498f3d639511da7b0 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Sun, 10 Aug 2025 13:25:17 +0200 Subject: [PATCH 1/3] Commit --- Doc/using/cmdline.rst | 2 +- Python/initconfig.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst index cad49e2deeb46f..6fd87343bf036e 100644 --- a/Doc/using/cmdline.rst +++ b/Doc/using/cmdline.rst @@ -369,7 +369,7 @@ Miscellaneous options .. option:: -R Turn on hash randomization. This option only has an effect if the - :envvar:`PYTHONHASHSEED` environment variable is set to ``0``, since hash + :envvar:`PYTHONHASHSEED` environment variable is set, since hash randomization is enabled by default. On previous versions of Python, this option turns on hash randomization, diff --git a/Python/initconfig.c b/Python/initconfig.c index cc0db19d416058..fd2cfe56510b2c 100644 --- a/Python/initconfig.c +++ b/Python/initconfig.c @@ -273,6 +273,8 @@ Options (and corresponding environment variables):\n\ -P : don't prepend a potentially unsafe path to sys.path; also\n\ PYTHONSAFEPATH\n\ -q : don't print version and copyright messages on interactive startup\n\ +-R : enable hash randomization; + this option overrides PYTHONHASHSEED to use the default behavior\n\ -s : don't add user site directory to sys.path; also PYTHONNOUSERSITE=x\n\ -S : don't imply 'import site' on initialization\n\ -u : force the stdout and stderr streams to be unbuffered;\n\ From 846af0a436a113555d4f608ff042b8f0ac0bd829 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Sun, 10 Aug 2025 13:27:54 +0200 Subject: [PATCH 2/3] Fixup --- Python/initconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/initconfig.c b/Python/initconfig.c index fd2cfe56510b2c..c60892256e6943 100644 --- a/Python/initconfig.c +++ b/Python/initconfig.c @@ -273,7 +273,7 @@ Options (and corresponding environment variables):\n\ -P : don't prepend a potentially unsafe path to sys.path; also\n\ PYTHONSAFEPATH\n\ -q : don't print version and copyright messages on interactive startup\n\ --R : enable hash randomization; +-R : enable hash randomization;\n\ this option overrides PYTHONHASHSEED to use the default behavior\n\ -s : don't add user site directory to sys.path; also PYTHONNOUSERSITE=x\n\ -S : don't imply 'import site' on initialization\n\ From 16ec869d8e8483574dcb43c04394dab3b40e1f54 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Sun, 10 Aug 2025 18:43:30 +0200 Subject: [PATCH 3/3] Revert change --- Python/initconfig.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/Python/initconfig.c b/Python/initconfig.c index c60892256e6943..cc0db19d416058 100644 --- a/Python/initconfig.c +++ b/Python/initconfig.c @@ -273,8 +273,6 @@ Options (and corresponding environment variables):\n\ -P : don't prepend a potentially unsafe path to sys.path; also\n\ PYTHONSAFEPATH\n\ -q : don't print version and copyright messages on interactive startup\n\ --R : enable hash randomization;\n\ - this option overrides PYTHONHASHSEED to use the default behavior\n\ -s : don't add user site directory to sys.path; also PYTHONNOUSERSITE=x\n\ -S : don't imply 'import site' on initialization\n\ -u : force the stdout and stderr streams to be unbuffered;\n\