Skip to content
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

[3.11] gh-90300: Document equivalent -X options for envvars in the Python CLI help (GH-116756) (GH-116786) #116796

Merged
merged 1 commit into from Mar 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
37 changes: 19 additions & 18 deletions Python/initconfig.c
Expand Up @@ -132,18 +132,11 @@ static const char usage_envvars[] =
" The default module search path uses %s.\n"
"PYTHONPLATLIBDIR: override sys.platlibdir.\n"
"PYTHONCASEOK : ignore case in 'import' statements (Windows).\n"
"PYTHONUTF8 : if set to 1, enable the UTF-8 mode.\n"
"PYTHONIOENCODING: Encoding[:errors] used for stdin/stdout/stderr.\n"
"PYTHONFAULTHANDLER: dump the Python traceback on fatal errors.\n"
"PYTHONHASHSEED : if this variable is set to 'random', a random value is used\n"
" to seed the hashes of str and bytes objects. It can also be\n"
" set to an integer in the range [0,4294967295] to get hash\n"
" values with a predictable seed.\n"
"PYTHONINTMAXSTRDIGITS: limits the maximum digit characters in an int value\n"
" when converting from a string and when converting an int\n"
" back to a str. A value of 0 disables the limit.\n"
" Conversions to or from bases 2, 4, 8, 16, and 32 are never\n"
" limited.\n"
"PYTHONMALLOC : set the Python memory allocators and/or install debug hooks\n"
" on Python memory allocators. Use PYTHONMALLOC=debug to\n"
" install debug hooks.\n"
Expand All @@ -154,28 +147,36 @@ static const char usage_envvars[] =
"PYTHONBREAKPOINT: if this variable is set to 0, it disables the default\n"
" debugger. It can be set to the callable of your debugger of\n"
" choice.\n"
"PYTHONDEVMODE : enable the development mode.\n"
"PYTHONPYCACHEPREFIX: root directory for bytecode cache (pyc) files.\n"
"PYTHONWARNDEFAULTENCODING: enable opt-in EncodingWarning for 'encoding=None'.\n"
"PYTHONNODEBUGRANGES: if this variable is set, it disables the inclusion of\n"
" the tables mapping extra location information (end line,\n"
" start column offset and end column offset) to every\n"
" instruction in code objects. This is useful when smaller\n"
" code objects and pyc files are desired as well as\n"
" suppressing the extra visual location indicators when the\n"
" interpreter displays tracebacks.\n"
"\n"
"These variables have equivalent command-line options (see --help for details):\n"
"PYTHONDEBUG : enable parser debug mode (-d)\n"
"PYTHONDEVMODE : enable the development mode (-X dev)\n"
"PYTHONDONTWRITEBYTECODE: don't write .pyc files (-B)\n"
"PYTHONFAULTHANDLER: dump the Python traceback on fatal errors (-X faulthandler)\n"
"PYTHONINSPECT : inspect interactively after running script (-i)\n"
"PYTHONINTMAXSTRDIGITS: limit max digit characters in an int value\n"
"PYTHONINTMAXSTRDIGITS: limits the maximum digit characters in an int value\n"
" when converting from a string and when converting an int\n"
" back to a str. A value of 0 disables the limit.\n"
" Conversions to or from bases 2, 4, 8, 16, and 32 are never\n"
" limited.\n"
" (-X int_max_str_digits=number)\n"
"PYTHONNODEBUGRANGES: if this variable is set, it disables the inclusion of\n"
" the tables mapping extra location information (end line,\n"
" start column offset and end column offset) to every\n"
" instruction in code objects. This is useful when smaller\n"
" code objects and pyc files are desired as well as\n"
" suppressing the extra visual location indicators when the\n"
" interpreter displays tracebacks. (-X no_debug_ranges)\n"
"PYTHONNOUSERSITE: disable user site directory (-s)\n"
"PYTHONOPTIMIZE : enable level 1 optimizations (-O)\n"
"PYTHONPYCACHEPREFIX: root directory for bytecode cache (pyc) files\n"
" (-X pycache_prefix)\n"
"PYTHONSAFEPATH : don't prepend a potentially unsafe path to sys.path.\n"
"PYTHONUNBUFFERED: disable stdout/stderr buffering (-u)\n"
"PYTHONUTF8 : if set to 1, enable the UTF-8 mode (-X utf8)\n"
"PYTHONVERBOSE : trace import statements (-v)\n"
"PYTHONWARNDEFAULTENCODING: enable opt-in EncodingWarning for 'encoding=None'\n"
" (-X warn_default_encoding)\n"
"PYTHONWARNINGS=arg: warning control (-W arg)\n"
;

Expand Down