[Python-checkins] [3.10] gh-93217: fix some issues in man page and --help (GH-93219) (#93261)
merwok
webhook-mailer at python.org
Sun May 29 14:04:32 EDT 2022
https://github.com/python/cpython/commit/c649526f923c70d9db201b08d8a850831b5cf989
commit: c649526f923c70d9db201b08d8a850831b5cf989
branch: 3.10
author: Éric <merwok at netwok.org>
committer: merwok <merwok at netwok.org>
date: 2022-05-29T14:04:23-04:00
summary:
[3.10] gh-93217: fix some issues in man page and --help (GH-93219) (#93261)
files:
M Misc/python.man
M Python/initconfig.c
diff --git a/Misc/python.man b/Misc/python.man
index 45a49271d4dfe..6b21fdc8790bc 100644
--- a/Misc/python.man
+++ b/Misc/python.man
@@ -66,10 +66,10 @@ python \- an interpreted, interactive, object-oriented programming language
.B \-x
]
[
-[
.B \-X
.I option
]
+[
.B \-?
]
.br
@@ -302,7 +302,8 @@ Set implementation specific option. The following options are available:
more verbose than the default if the code is correct: new warnings are
only emitted when an issue is detected. Effect of the developer mode:
* Add default warning filter, as -W default
- * Install debug hooks on memory allocators: see the PyMem_SetupDebugHooks() C function
+ * Install debug hooks on memory allocators: see the PyMem_SetupDebugHooks()
+ C function
* Enable the faulthandler module to dump the Python traceback on a crash
* Enable asyncio debug mode
* Set the dev_mode attribute of sys.flags to True
@@ -313,7 +314,10 @@ Set implementation specific option. The following options are available:
otherwise activate automatically). See PYTHONUTF8 for more details
-X pycache_prefix=PATH: enable writing .pyc files to a parallel tree rooted at the
- given directory instead of to the code tree.
+ given directory instead of to the code tree.
+
+ -X warn_default_encoding: enable opt-in EncodingWarning for 'encoding=None'
+
.TP
.B \-x
Skip the first line of the source. This is intended for a DOS
diff --git a/Python/initconfig.c b/Python/initconfig.c
index b2986116fdc35..0341e7baa210c 100644
--- a/Python/initconfig.c
+++ b/Python/initconfig.c
@@ -41,7 +41,7 @@ Options and arguments (and corresponding environment variables):\n\
-d : turn on parser debugging output (for experts only, only works on\n\
debug builds); also PYTHONDEBUG=x\n\
-E : ignore PYTHON* environment variables (such as PYTHONPATH)\n\
--h : print this help message and exit (also --help)\n\
+-h : print this help message and exit (also -? or --help)\n\
";
static const char usage_2[] = "\
-i : inspect interactively after running script; forces a prompt even\n\
@@ -67,7 +67,6 @@ static const char usage_3[] = "\
also PYTHONWARNINGS=arg\n\
-x : skip first line of source, allowing use of non-Unix forms of #!cmd\n\
-X opt : set implementation-specific option. The following options are available:\n\
-\n\
-X faulthandler: enable faulthandler\n\
-X showrefcount: output the total reference count and number of used\n\
memory blocks when the program finishes or after each statement in the\n\
@@ -84,7 +83,8 @@ static const char usage_3[] = "\
checks which are too expensive to be enabled by default. Effect of the\n\
developer mode:\n\
* Add default warning filter, as -W default\n\
- * Install debug hooks on memory allocators: see the PyMem_SetupDebugHooks() C function\n\
+ * Install debug hooks on memory allocators: see the PyMem_SetupDebugHooks()\n\
+ C function\n\
* Enable the faulthandler module to dump the Python traceback on a crash\n\
* Enable asyncio debug mode\n\
* Set the dev_mode attribute of sys.flags to True\n\
@@ -95,7 +95,6 @@ static const char usage_3[] = "\
-X pycache_prefix=PATH: enable writing .pyc files to a parallel tree rooted at the\n\
given directory instead of to the code tree\n\
-X warn_default_encoding: enable opt-in EncodingWarning for 'encoding=None'\n\
-\n\
--check-hash-based-pycs always|default|never:\n\
control how Python invalidates hash-based .pyc files\n\
";
More information about the Python-checkins
mailing list