Skip to content

Cmd.complete does not handle cmd=None #79451

Done

Description

@blueyed
mannequin
BPO 35270
Nosy @blueyed, @iritkatriel
PRs
  • gh-79451: Cmd.complete: use completedefault also with cmd=None #10588
  • 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 2018-11-17.23:06:01.739>
    labels = ['3.8', 'type-bug', 'library']
    title = 'Cmd.complete does not handle cmd=None'
    updated_at = <Date 2021-09-07.14:24:40.604>
    user = 'https://github.com/blueyed'

    bugs.python.org fields:

    activity = <Date 2021-09-07.14:24:40.604>
    actor = 'iritkatriel'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2018-11-17.23:06:01.739>
    creator = 'blueyed'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 35270
    keywords = ['patch']
    message_count = 2.0
    messages = ['330035', '401285']
    nosy_count = 2.0
    nosy_names = ['blueyed', 'iritkatriel']
    pr_nums = ['10588']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue35270'
    versions = ['Python 3.8']

    Activity

    1. blueyed commented on Nov 17, 2018

      blueyedmannequin
      MannequinAuthor

      When parseline returns None for cmd (like pdb++ might cause it when changing a cmd "disable" to "!disable"), the following will cause a TypeError:

      compfunc = getattr(self, 'complete_' + cmd)

      "None" should be also forwarded to "completedefault", just like cmd="".

    2. added
      type-crash
      3.8 (EOL)
      stdlib
      on Nov 17, 2018
    3. iritkatriel commented on Sep 7, 2021

      @iritkatriel
      Member

      Changing type since crash is typically used for a segfault rather than an exception.

    4. added
      type-bug
      and removed
      type-crash
      on Sep 7, 2021
    5. transferred this issue fromon Apr 10, 2022
    6. maurycy commented on Dec 6, 2026

      @maurycy
      Contributor

      Fixed in 1d9406e (3.14; #133364):

      def test_bang_completion_without_do_shell(self):

      cc @StanFromIreland

    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.8 (EOL)stdlibtype-bug

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions