Skip to content

Py3k DeprecationWarning in difflib #47439

Closed

Description

@vdupras
mannequin
BPO 3189
Nosy @rhettinger
Files
  • difflib_py3k_deprecation.diff
  • difflib_py3k_deprecation2.diff
  • 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 2008-06-24.15:59:10.252>
    created_at = <Date 2008-06-24.11:36:12.129>
    labels = ['type-bug', 'library']
    title = 'Py3k DeprecationWarning in difflib'
    updated_at = <Date 2008-06-24.15:59:10.232>
    user = 'https://bugs.python.org/vdupras'

    bugs.python.org fields:

    activity = <Date 2008-06-24.15:59:10.232>
    actor = 'rhettinger'
    assignee = 'none'
    closed = True
    closed_date = <Date 2008-06-24.15:59:10.252>
    closer = 'rhettinger'
    components = ['Library (Lib)']
    creation = <Date 2008-06-24.11:36:12.129>
    creator = 'vdupras'
    dependencies = []
    files = ['10717', '10718']
    hgrepos = []
    issue_num = 3189
    keywords = ['patch']
    message_count = 3.0
    messages = ['68677', '68678', '68693']
    nosy_count = 2.0
    nosy_names = ['rhettinger', 'vdupras']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue3189'
    versions = ['Python 2.6']

    Activity

    1. vdupras commented on Jun 24, 2008

      vduprasmannequin
      MannequinAuthor

      When running with the -3 flag, difflib creates DeprecationWarnings. I
      attach a patch fixing them.

      There was a note in the code saying "DOES NOT WORK for x in a". However,
      after my changes, tests still pass, so I removed these notices. If someone
      knows what this was all about, let me know.

    2. added
      stdlib
      type-bug
      on Jun 24, 2008
    3. vdupras commented on Jun 24, 2008

      vduprasmannequin
      MannequinAuthor

      It slipped out of my mind that performance was probably important for this
      module, so I ditched that nested get call and went if an if..else.

    4. rhettinger commented on Jun 24, 2008

      @rhettinger
      Contributor

      Applying a minimal version of this patch -- changing has_key() to
      __contains__(). See r64511.

    5. transferred this issue fromon Apr 10, 2022
    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

      stdlibtype-bug

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions