]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] Doc: Fix suggested usage of `-X gil=0` in the glossary (GH-125366) (#125382)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 13 Oct 2024 00:59:05 +0000 (02:59 +0200)
committerGitHub <noreply@github.com>
Sun, 13 Oct 2024 00:59:05 +0000 (00:59 +0000)
commite47dd9326285c28cf9bf540bd5472bb4bbd73629
tree80f8e0912bdbd9f13ef203b555c03c2b6db3cb96
parent6afdb098593d1e1c08fdd2aee7306d768a2e3bff
[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 <zhongruoyu@outlook.com>
Co-authored-by: Ruoyu Zhong <zhongruoyu@outlook.com>
Doc/glossary.rst