[New-bugs-announce] [issue32101] Add PYTHONDEVMODE=1 to enable the developer mode
STINNER Victor
report at bugs.python.org
Mon Nov 20 21:58:57 EST 2017
New submission from STINNER Victor <victor.stinner at gmail.com>:
In the review of the PR 4478, Antoine Pitrou proposed to add an environment variable to enable the new Python "developer mode" to inherit the developer mode in child Python processes.
I proposed to add PYTHONDEVMODE=1. Nick Coghlan proposed PYTHONXOPTIONS=dev.
While -X is a new "catch all" for new CPython options, Python got new PYTHONxxx environment variables to enable new options:
* -X faulthandler: PYTHONFAULTHANDLER=1
* -X tracemalloc=N: PYTHONTRACEMALLOC=n
* -X importtime: PYTHONPROFILEIMPORTTIME=1 -- note that the names are different in this case, I don't know why
I have a preference for PYTHONDEVMODE=1.
If we start to use PYTHONXOPTIONS, users may want to use PYTHONXOPTIONS=tracemalloc, and then we have to decide which environment variable has the preference :-(
Moreover, tracemalloc takes an argument, whereas environment variables with a value containing '=' are rare and so likely to cause issues in programs not carefully written to handle such variables. (Environment variables are inherited by all processes, not only Python processes.)
----------
messages: 306618
nosy: ncoghlan, pitrou, vstinner
priority: normal
severity: normal
status: open
title: Add PYTHONDEVMODE=1 to enable the developer mode
type: enhancement
versions: Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32101>
_______________________________________
More information about the New-bugs-announce
mailing list