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

Give pdb.set_trace() an optional header keyword argument #75570

Closed
warsaw opened this issue Sep 7, 2017 · 3 comments
Closed

Give pdb.set_trace() an optional header keyword argument #75570

warsaw opened this issue Sep 7, 2017 · 3 comments
Assignees
Labels
3.7 (EOL) end of life stdlib Python modules in the Lib dir

Comments

@warsaw
Copy link
Member

warsaw commented Sep 7, 2017

BPO 31389
Nosy @warsaw
PRs
  • bpo-31389 Add an optional header argument to pdb.set_trace() #3438
  • 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 = 'https://github.com/warsaw'
    closed_at = <Date 2017-09-22.16:30:06.920>
    created_at = <Date 2017-09-07.22:30:47.069>
    labels = ['3.7', 'library']
    title = 'Give pdb.set_trace() an optional `header` keyword argument'
    updated_at = <Date 2017-09-22.16:30:06.919>
    user = 'https://github.com/warsaw'

    bugs.python.org fields:

    activity = <Date 2017-09-22.16:30:06.919>
    actor = 'barry'
    assignee = 'barry'
    closed = True
    closed_date = <Date 2017-09-22.16:30:06.920>
    closer = 'barry'
    components = ['Library (Lib)']
    creation = <Date 2017-09-07.22:30:47.069>
    creator = 'barry'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 31389
    keywords = ['patch']
    message_count = 3.0
    messages = ['301643', '301646', '302754']
    nosy_count = 1.0
    nosy_names = ['barry']
    pr_nums = ['3438']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue31389'
    versions = ['Python 3.7']

    @warsaw
    Copy link
    Member Author

    warsaw commented Sep 7, 2017

    IPython has a neat little feature where the function that enters the debugger takes an optional header argument. If given, it is a string that's printed to the console just before the debugger is entered.

    https://github.com/ipython/ipython/blob/master/IPython/terminal/embed.py#L177
    https://mail.python.org/pipermail/python-dev/2017-September/149256.html

    I kind of realized this would be nice to have in pdb, and the code is easy so here's the tracking issue.

    @warsaw warsaw added the 3.7 (EOL) end of life label Sep 7, 2017
    @warsaw warsaw self-assigned this Sep 7, 2017
    @warsaw warsaw added the stdlib Python modules in the Lib dir label Sep 7, 2017
    @warsaw
    Copy link
    Member Author

    warsaw commented Sep 7, 2017

    And specifically header is chosen to match IPython. Why be different?

    @warsaw
    Copy link
    Member Author

    warsaw commented Sep 22, 2017

    New changeset 35425d6 by Barry Warsaw in branch 'master':
    bpo-31389 Add an optional header argument to pdb.set_trace() (bpo-3438)
    35425d6

    @warsaw warsaw closed this as completed Sep 22, 2017
    @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.7 (EOL) end of life stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant