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

Py3k DeprecationWarning in difflib #47439

Closed
vdupras mannequin opened this issue Jun 24, 2008 · 3 comments
Closed

Py3k DeprecationWarning in difflib #47439

vdupras mannequin opened this issue Jun 24, 2008 · 3 comments
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@vdupras
Copy link
Mannequin

vdupras mannequin commented Jun 24, 2008

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']

    @vdupras
    Copy link
    Mannequin Author

    vdupras mannequin commented Jun 24, 2008

    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.

    @vdupras vdupras mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Jun 24, 2008
    @vdupras
    Copy link
    Mannequin Author

    vdupras mannequin commented Jun 24, 2008

    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.

    @rhettinger
    Copy link
    Contributor

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

    @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
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant