]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-90300: Document equivalent -X options for envvars in the Python CLI help...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 14 Mar 2024 10:39:32 +0000 (11:39 +0100)
committerGitHub <noreply@github.com>
Thu, 14 Mar 2024 10:39:32 +0000 (10:39 +0000)
(cherry picked from commit 991710af022f27db862ff1399178bcc76b062669)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 8c6db45ce34df7081d7497e638daf3e130303295)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Python/initconfig.c

index 98860d0418a5631ddfaef3862d80e896f5dfbc73..989f724e12859dc9dbf325022546224ab7afd831 100644 (file)
@@ -137,18 +137,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"
@@ -159,28 +152,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"
 ;