classification
Title: Py3k DeprecationWarning in difflib
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.6
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: rhettinger, vdupras
Priority: normal Keywords: patch

Created on 2008-06-24 11:36 by vdupras, last changed 2008-06-24 15:59 by rhettinger. This issue is now closed.

Files
File name Uploaded Description Edit
difflib_py3k_deprecation.diff vdupras, 2008-06-24 11:36
difflib_py3k_deprecation2.diff vdupras, 2008-06-24 11:42
Messages (3)
msg68677 - (view) Author: Virgil Dupras (vdupras) Date: 2008-06-24 11:36
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.
msg68678 - (view) Author: Virgil Dupras (vdupras) Date: 2008-06-24 11:42
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.
msg68693 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2008-06-24 15:59
Applying a minimal version of this patch -- changing has_key() to 
__contains__().  See r64511.
History
Date User Action Args
2008-06-24 15:59:10rhettingersetstatus: open -> closed
resolution: accepted
messages: + msg68693
nosy: + rhettinger
2008-06-24 11:42:45vduprassetfiles: + difflib_py3k_deprecation2.diff
messages: + msg68678
2008-06-24 11:36:12vduprascreate