This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: logging module __init__ uses has_key
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.6
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: benjamin.peterson, georg.brandl, r.david.murray, vstinner
Priority: normal Keywords: patch

Created on 2008-12-04 14:19 by r.david.murray, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
logging_py3k.patch vstinner, 2008-12-04 15:01
Messages (4)
msg76883 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2008-12-04 14:18
I ran my ap with -3 and got the following:

/usr/lib/python2.6/logging/ DeprecationWarning:
dict.has_key() not supported in 3.x; use the in operator
msg76885 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2008-12-04 14:23
The regression tests are already running with -bb. We should also 
use -3 to detect such bug. But is "-3" enough to raise an error (and 
not just display a message)?
msg76886 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2008-12-04 15:01
I tried the whole Python test suite with -3. Some warnings:
 - no more cPikle and bsddb modules
 - has_key() (used in many tests)
 - a <> b (used in many AST/grammar tests)
 - an exception have to inherit from Exception
 - callable() doesn't exist anymore
 - etc.

It's not a good idea to fix the regression tests because Python 2.6 
still uses the listed features. But the logging warning should be 
fixed, so here is a patch.
msg77773 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-12-14 01:46
Fixed in r67748.
Date User Action Args
2022-04-11 14:56:42adminsetgithub: 48773
2008-12-14 01:46:33benjamin.petersonsetstatus: open -> closed
nosy: + benjamin.peterson
resolution: fixed
messages: + msg77773
2008-12-08 08:20:31rhettingersetassignee: georg.brandl
nosy: + georg.brandl
2008-12-04 15:01:40vstinnersetfiles: + logging_py3k.patch
keywords: + patch
messages: + msg76886
2008-12-04 14:23:08vstinnersetnosy: + vstinner
messages: + msg76885
2008-12-04 14:19:01r.david.murraycreate