Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue32043

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Add a new -X dev option: "developer mode"
Type:enhancementStage:resolved
Components:Interpreter CoreVersions:Python 3.7
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: barry, vstinner
Priority:normalKeywords:patch

Created on2017-11-16 02:43 byvstinner, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Pull Requests
URLStatusLinkedEdit
PR 4413mergedvstinner,2017-11-16 02:47
PR 4478mergedvstinner,2017-11-20 17:33
Messages (7)
msg306330 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2017-11-16 02:43
I propose to add a new "developer mode": a new "-X dev" command line option.In short:   python3 -X dev script.pybehaves as:   PYTHONMALLOC=debug python3 -W default -X faulthandler script.pyFor the rationale, please see:https://mail.python.org/pipermail/python-dev/2017-November/150514.html
msg306331 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2017-11-16 02:48
I rewrote Py_Main() inbpo-32030 to make it very easy to implement this new feature.I wrotePR 4413 to implement -X dev.
msg306351 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2017-11-16 11:20
New changesetccb0442a338066bf40fe417455e5a374e5238afb by Victor Stinner in branch 'master':bpo-32043: New "developer mode": "-X dev" option (#4413)https://github.com/python/cpython/commit/ccb0442a338066bf40fe417455e5a374e5238afb
msg306357 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2017-11-16 13:04
Antoine Pitrou asked me to document the performance and memory overhead of -X dev:https://mail.python.org/pipermail/python-dev/2017-November/150578.htmlFor example, I measured an increase of +50% on the peak memory usage (measured by tracemalloc) when running test_os.Antoine proposed:"""Currently, developer mode adds negligible CPU time overhead, but canincrease memory consumption significantly if many small objects areallocated.  This is subject to change in the future."""https://mail.python.org/pipermail/python-dev/2017-November/150579.html
msg306619 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2017-11-21 02:59
I createdbpo-32101: Add PYTHONDEVMODE=1 to enable the developer mode.
msg306620 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2017-11-21 02:59
New changesetbc9b6e29cb52f8da15613f9174af2f603131b56d by Victor Stinner in branch 'master':bpo-32043: Rephrase -X dev documentation (#4478)https://github.com/python/cpython/commit/bc9b6e29cb52f8da15613f9174af2f603131b56d
msg306621 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2017-11-21 03:03
While the discussion is not done, I close this issue to focus on other more specific issues.I completed the documentation and fixed warnings filters (bpo-32089). The option now also enables asyncio debug mode (bpo-32047).It was proposed to add an environment variable to enable the developer mode: seebpo-32101 ("Add PYTHONDEVMODE=1 to enable the developer mode").Note: I also fixed subprocess._args_from_interpreter_flags:bpo-32094.
History
DateUserActionArgs
2022-04-11 14:58:54adminsetgithub: 76224
2017-11-21 03:03:29vstinnersetstatus: open -> closed
resolution: fixed
messages: +msg306621

stage: patch review -> resolved
2017-11-21 02:59:52vstinnersetmessages: +msg306620
2017-11-21 02:59:27vstinnersetmessages: +msg306619
2017-11-20 17:33:28vstinnersetpull_requests: +pull_request4415
2017-11-16 13:04:17vstinnersetmessages: +msg306357
2017-11-16 11:20:33vstinnersetmessages: +msg306351
2017-11-16 02:48:51vstinnersetmessages: +msg306331
2017-11-16 02:47:58vstinnersetkeywords: +patch
stage: patch review
pull_requests: +pull_request4363
2017-11-16 02:47:55barrysetnosy: +barry
2017-11-16 02:43:27vstinnercreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp