Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to trace to run module as a script #76696

Closed
mariocj89 mannequin opened this issue Jan 7, 2018 · 1 comment
Closed

Add an option to trace to run module as a script #76696

mariocj89 mannequin opened this issue Jan 7, 2018 · 1 comment
Labels
3.8 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@mariocj89
Copy link
Mannequin

mariocj89 mannequin commented Jan 7, 2018

BPO 32515
Nosy @mariocj89
PRs
  • bpo-32515: Add an option to trace to run module as a script #5134
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-06-01.19:49:35.966>
    created_at = <Date 2018-01-07.20:58:47.912>
    labels = ['3.8', 'type-feature', 'library']
    title = 'Add an option to trace to run module as a script'
    updated_at = <Date 2019-06-01.19:49:35.965>
    user = 'https://github.com/mariocj89'

    bugs.python.org fields:

    activity = <Date 2019-06-01.19:49:35.965>
    actor = 'pablogsal'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-06-01.19:49:35.966>
    closer = 'pablogsal'
    components = ['Library (Lib)']
    creation = <Date 2018-01-07.20:58:47.912>
    creator = 'mariocj89'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 32515
    keywords = ['patch']
    message_count = 1.0
    messages = ['309638']
    nosy_count = 1.0
    nosy_names = ['mariocj89']
    pr_nums = ['5134']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue32515'
    versions = ['Python 3.8']

    @mariocj89
    Copy link
    Mannequin Author

    mariocj89 mannequin commented Jan 7, 2018

    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 (bpo-32206) over the one on profiler(bpo-32512). 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

    @mariocj89 mariocj89 mannequin added 3.7 (EOL) end of life stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Jan 7, 2018
    @matrixise matrixise added 3.8 only security fixes and removed 3.7 (EOL) end of life labels Jan 30, 2018
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants