-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
Doc/glossary.rst: fix -X gil
option usage
#125366
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
Merged
AA-Turner
merged 1 commit into
python:main
from
ZhongRuoyu:doc-glossary-fix-gil-option-usage
Oct 13, 2024
Merged
Doc/glossary.rst: fix -X gil
option usage
#125366
AA-Turner
merged 1 commit into
python:main
from
ZhongRuoyu:doc-glossary-fix-gil-option-usage
Oct 13, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Currently, the "global interpreter lock" entry in the glossary mentions that `-X gil 0` can be used to disable the GIL. However, this is invalid; the correct usage should be `-X gil=0` [^1]. $ 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.13/using/cmdline.html#cmdoption-X Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
This comment was marked as off-topic.
This comment was marked as off-topic.
picnixz
approved these changes
Oct 12, 2024
AA-Turner
approved these changes
Oct 13, 2024
Thanks @ZhongRuoyu for the PR, and @AA-Turner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Oct 13, 2024
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 a8fa4ad) Co-authored-by: Ruoyu Zhong <zhongruoyu@outlook.com> Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
GH-125382 is a backport of this pull request to the 3.13 branch. |
AA-Turner
pushed a commit
that referenced
this pull request
Oct 13, 2024
) (#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 a8fa4ad) Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com> Co-authored-by: Ruoyu Zhong <zhongruoyu@outlook.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, the "global interpreter lock" entry in the glossary mentions that
-X gil 0
can be used to disable the GIL. However, this is invalid; the correct usage should be-X gil=0
1.📚 Documentation preview 📚: https://cpython-previews--125366.org.readthedocs.build/
Footnotes
https://docs.python.org/3.13/using/cmdline.html#cmdoption-X ↩