classification
Title: Allow PYTHONTRACEMALLOC=0 and -X tracemalloc=0 to disable explicitly tracemalloc
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: vstinner
Priority: normal Keywords: patch

Created on 2018-07-25 16:54 by vstinner, last changed 2018-07-26 08:53 by vstinner. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 8467 merged vstinner, 2018-07-25 17:03
Messages (3)
msg322369 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-07-25 16:54
Currently, -X tracemalloc=0 command line option is reject as an invalid value. I would like to allow to explicitly disable tracemalloc. That's useful to ignore the PYTHONTRACEMALLOC environment variable:

"PYTHONTRACEMALLOC=1 python3 -X tracemalloc=0" would not enable tracemalloc at startup.
msg322372 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-07-25 17:23
New changeset 60b04c9f6fb87522a62ab6b95db9f8a09aef42d4 by Victor Stinner in branch 'master':
bpo-34228: Allow PYTHONTRACEMALLOC=0 (GH-8467)
https://github.com/python/cpython/commit/60b04c9f6fb87522a62ab6b95db9f8a09aef42d4
msg322407 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-07-26 08:53
I don't think that it's worth it to backport this change. It's really a corner case and it's almsot a bugfix. I mostly need it for testing _PyCoreConfig and Python initialisation.
History
Date User Action Args
2018-07-26 08:53:13vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg322407

stage: patch review -> resolved
2018-07-25 17:23:56vstinnersetmessages: + msg322372
2018-07-25 17:03:23vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request7991
2018-07-25 16:54:55vstinnercreate