From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sun, 13 Oct 2024 00:59:05 +0000 (+0200) Subject: [3.13] Doc: Fix suggested usage of `-X gil=0` in the glossary (GH-125366) (#125382) X-Git-Tag: v3.13.1~316 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e47dd9326285c28cf9bf540bd5472bb4bbd73629;p=thirdparty%2FPython%2Fcpython.git [3.13] Doc: Fix suggested usage of `-X gil=0` in the glossary (GH-125366) (#125382) Doc: Fix suggested usage of `-X gil=0` in the glossary (GH-125366) Currently, the "global interpreter lock" entry in the glossary mentions that `-X gil 0` can be used to disable the GIL [1]. However, this is invalid; the correct usage should be `-X gil=0`. $ python -X gil 0 -c 'print("Hello, world")' Fatal Python error: config_read_gil: PYTHON_GIL / -X gil must be "0" or "1" Python runtime state: preinitialized $ python -X gil=0 -c 'print("Hello, world")' Hello, world [1]: https://docs.python.org/3/using/cmdline.htmlGH-cmdoption-X (cherry picked from commit a8fa4ad9e9f7aa0cba8b23af2c583d17bb1d1847) Signed-off-by: Ruoyu Zhong Co-authored-by: Ruoyu Zhong --- diff --git a/Doc/glossary.rst b/Doc/glossary.rst index d7c712ff938c..3c931a7c2a93 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -585,7 +585,7 @@ Glossary As of Python 3.13, the GIL can be disabled using the :option:`--disable-gil` build configuration. After building Python with this option, code must be - run with :option:`-X gil 0 <-X>` or after setting the :envvar:`PYTHON_GIL=0 ` + run with :option:`-X gil=0 <-X>` or after setting the :envvar:`PYTHON_GIL=0 ` environment variable. This feature enables improved performance for multi-threaded applications and makes it easier to use multi-core CPUs efficiently. For more details, see :pep:`703`.