This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients ncoghlan, pitrou, vstinner
Date 2017-11-21.02:58:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1511233137.85.0.213398074469.issue32101@psf.upfronthosting.co.za>
In-reply-to
Content
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.)
History
Date User Action Args
2017-11-21 02:58:57vstinnersetrecipients: + vstinner, ncoghlan, pitrou
2017-11-21 02:58:57vstinnersetmessageid: <1511233137.85.0.213398074469.issue32101@psf.upfronthosting.co.za>
2017-11-21 02:58:57vstinnerlinkissue32101 messages
2017-11-21 02:58:56vstinnercreate