[PATCH] set/show python dont-write-bytecode fixes

Eli Zaretskii eliz@gnu.org
Fri Jul 22 06:40:07 GMT 2022


> Date: Thu, 21 Jul 2022 16:08:32 -0700
> From: Kevin Buettner via Gdb-patches <gdb-patches@sourceware.org>
> Cc: Simon Marchi <simark@simark.ca>, gdb-patches@sourceware.org
> 
> @@ -2346,11 +2353,11 @@ python executable."),
>  
>    add_setshow_auto_boolean_cmd ("dont-write-bytecode", no_class,
>  				&python_dont_write_bytecode, _("\
> -Set whether the Python interpreter should ignore environment variables."), _(" \
> -Show whether the Python interpreter showlist ignore environment variables."), _(" \
> -When enabled GDB's Python interpreter will ignore any Python related\n	\
> -flags in the environment.  This is equivalent to passing `-E' to a\n	\
> -python executable."),
> +Set whether the Python interpreter won't byte-compile python modules."), _("\
> +Show whether the Python interpreter won't byte-compile python modules."), _("

"Set whether ... won't byte-compile" is a kind-of double negation.
How about

 Set whether the Python interpreter should avoid byte-compiling python modules.

instead (and similar change in the "Show" line)?

> +When enabled GDB's Python interpreter won't byte-compile python modules.\n\
               ^
Comma missing there.

> +In order to take effect, this setting must be enabled before python\n\
> +initialization."),

Will GDB users understand clearly what that means in practical terms?
Should we say instead "before invoking the Python interpreter for the
first time"?

Finally should we mention the PYTHONDONTWRITEBYTECODE environment
variable?

Thanks.


More information about the Gdb-patches mailing list