classification
Title: Add an option to trace to run module as a script
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: mariocj89
Priority: normal Keywords: patch

Created on 2018-01-07 20:58 by mariocj89, last changed 2019-06-01 19:49 by pablogsal. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 5134 merged mariocj89, 2018-01-07 21:23
Messages (1)
msg309638 - (view) Author: Mario Corchero (mariocj89) * (Python triager) Date: 2018-01-07 20:58
Add an option to trace to be able to do `python3 -m trace -t --module my.module.name` to be able to trace a runnable module the same way we can do with scripts.

As we want trace to not include the lines in runpy I am going to with the approach of pdb (issue32206) over the one on profiler(issue32512). As Nick raised before this hits a private API in runpy but it is within the stdlib. Alternatives are welcomed as well! :)

Additionally, '-m' is already in use, I have added --module.

Related issue for improved executable module support for standard library modules that run other scripts: https://bugs.python.org/issue9325
History
Date User Action Args
2019-06-01 19:49:35pablogsalsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-01-30 13:13:31matrixisesetversions: + Python 3.8, - Python 3.7
2018-01-08 02:18:30ncoghlanlinkissue9325 dependencies
2018-01-07 21:23:39mariocj89setkeywords: + patch
stage: patch review
pull_requests: + pull_request4995
2018-01-07 20:58:47mariocj89create