From 22afe2bd4d3b63119a30018318be068c17ecd152 Mon Sep 17 00:00:00 2001 From: javed-shekh777 Date: Wed, 24 Dec 2025 19:14:37 +0530 Subject: [PATCH 1/5] Docs: fix PYTHONDONTWRITEBYTECODE description --- Doc/using/cmdline.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst index aff165191b76e8..355dd370829c35 100644 --- a/Doc/using/cmdline.rst +++ b/Doc/using/cmdline.rst @@ -880,9 +880,10 @@ conflict. .. envvar:: PYTHONDONTWRITEBYTECODE - If this is set to a non-empty string, Python won't try to write ``.pyc`` - files on the import of source modules. This is equivalent to - specifying the :option:`-B` option. + If this is set to a non-zero integer value, Python won't try to write + ``.pyc`` files on the import of source modules. Setting it to ``0`` does + not disable bytecode writing. This is equivalent to specifying the + :option:`-B` option. .. envvar:: PYTHONPYCACHEPREFIX From bb4365f31d685fd1031b072b85200677f4b8fac6 Mon Sep 17 00:00:00 2001 From: javed-shekh777 Date: Wed, 24 Dec 2025 19:44:02 +0530 Subject: [PATCH 2/5] Docs: clarify PYTHONDONTWRITEBYTECODE behavior --- Doc/using/cmdline.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst index 355dd370829c35..b815cf81b34272 100644 --- a/Doc/using/cmdline.rst +++ b/Doc/using/cmdline.rst @@ -880,9 +880,9 @@ conflict. .. envvar:: PYTHONDONTWRITEBYTECODE - If this is set to a non-zero integer value, Python won't try to write - ``.pyc`` files on the import of source modules. Setting it to ``0`` does - not disable bytecode writing. This is equivalent to specifying the + If this is set to a value other than ``"0"``, Python won't try to write + ``.pyc`` files on the import of source modules. Setting it to ``"0"`` + does not disable bytecode writing. This is equivalent to specifying the :option:`-B` option. From a5b0e5349c688bbeb96bd97010cacce7cf56fd35 Mon Sep 17 00:00:00 2001 From: javed-shekh777 Date: Wed, 24 Dec 2025 20:06:40 +0530 Subject: [PATCH 3/5] Docs: clarify PYTHONDONTWRITEBYTECODE behavior --- Doc/using/cmdline.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst index b815cf81b34272..4dbe2a55fe50df 100644 --- a/Doc/using/cmdline.rst +++ b/Doc/using/cmdline.rst @@ -880,8 +880,8 @@ conflict. .. envvar:: PYTHONDONTWRITEBYTECODE - If this is set to a value other than ``"0"``, Python won't try to write - ``.pyc`` files on the import of source modules. Setting it to ``"0"`` + If this is set to a value other than ``"0"``, Python won't try to write ``.pyc`` + files on the import of source modules. Setting it to ``"0"`` does not disable bytecode writing. This is equivalent to specifying the :option:`-B` option. From c3fdc060d026e8cc6add2768db6adb93a9839639 Mon Sep 17 00:00:00 2001 From: javed-shekh777 Date: Wed, 24 Dec 2025 20:07:15 +0530 Subject: [PATCH 4/5] Docs: clarify PYTHONDONTWRITEBYTECODE behavior --- Doc/using/cmdline.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst index 4dbe2a55fe50df..b815cf81b34272 100644 --- a/Doc/using/cmdline.rst +++ b/Doc/using/cmdline.rst @@ -880,8 +880,8 @@ conflict. .. envvar:: PYTHONDONTWRITEBYTECODE - If this is set to a value other than ``"0"``, Python won't try to write ``.pyc`` - files on the import of source modules. Setting it to ``"0"`` + If this is set to a value other than ``"0"``, Python won't try to write + ``.pyc`` files on the import of source modules. Setting it to ``"0"`` does not disable bytecode writing. This is equivalent to specifying the :option:`-B` option. From 9a32b48594d41583d2812d222d0179105cb3209a Mon Sep 17 00:00:00 2001 From: javed-shekh777 Date: Wed, 24 Dec 2025 21:44:02 +0530 Subject: [PATCH 5/5] Docs: clarify PYTHONDONTWRITEBYTECODE behavior --- Doc/using/cmdline.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst index b815cf81b34272..d4884ff11b5d3d 100644 --- a/Doc/using/cmdline.rst +++ b/Doc/using/cmdline.rst @@ -880,9 +880,9 @@ conflict. .. envvar:: PYTHONDONTWRITEBYTECODE - If this is set to a value other than ``"0"``, Python won't try to write - ``.pyc`` files on the import of source modules. Setting it to ``"0"`` - does not disable bytecode writing. This is equivalent to specifying the + If this is set to a non-empty string other than ``0``, Python won't try to write + ``.pyc`` files on the import of source modules. Setting it to ``0`` does + not disable bytecode writing. This is equivalent to specifying the :option:`-B` option.