Skip to content

pdb exits unexpectedly when calling args #86350

Closed as not planned
Closed as not planned

Description

@xgenadam
mannequin
BPO 42184
Nosy @iritkatriel
Files
  • bug_example.py: simple reproduction
  • 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 = None
    created_at = <Date 2020-10-28.18:07:15.566>
    labels = ['3.8', 'type-bug', 'library', '3.9', '3.10']
    title = 'pdb exits unexpectedly when calling args'
    updated_at = <Date 2020-10-30.23:07:36.784>
    user = 'https://bugs.python.org/xgenadam'

    bugs.python.org fields:

    activity = <Date 2020-10-30.23:07:36.784>
    actor = 'iritkatriel'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2020-10-28.18:07:15.566>
    creator = 'xgenadam'
    dependencies = []
    files = ['49546']
    hgrepos = []
    issue_num = 42184
    keywords = []
    message_count = 2.0
    messages = ['379838', '380011']
    nosy_count = 2.0
    nosy_names = ['iritkatriel', 'xgenadam']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue42184'
    versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']

    Activity

    1. xgenadam commented on Oct 28, 2020

      xgenadammannequin
      MannequinAuthor

      When an objects repr or str methods return None a TypeError is raised. However if this object is passed to a function and args is called from within pdb, pdb will immediately exit.

      Attached to this is bug_example.py which contains a simple example of how to reproduce this.

      Depending on circumstances this can make debugging difficult.

      exact python version that this happened with:
      Python 3.6.11

    2. iritkatriel commented on Oct 30, 2020

      @iritkatriel
      Member

      This is true in 3.10 as well. The same happens if __repr__ raises an exception. do_args command doesn't handle exceptions from repr.

      See also bpo-37022.

    3. transferred this issue fromon Apr 10, 2022
    4. kumaraditya303 commented on Jul 14, 2022

      @kumaraditya303
      Contributor

      Duplicate of #28400

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.10 (EOL)end of life3.8 (EOL)end of life3.9 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions