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.

classification
Title: logging's fileConfig causes KeyError on shutdown
Type: Stage:
Components: Library (Lib) Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: vinay.sajip Nosy List: anthonybaxter, mdbeachy, splitscreen, vinay.sajip
Priority: normal Keywords:

Created on 2006-08-04 19:58 by mdbeachy, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
bugreport.tar.gz mdbeachy, 2006-08-04 19:58 demonstration of the bug and proposed patch
Messages (4)
msg29443 - (view) Author: mdbeachy (mdbeachy) Date: 2006-08-04 19:58
If logging.config.fileConfig() is called after logging
handlers already exist, a KeyError is thrown in the
atexit call to logging.shutdown().

This looks like it's fixed in the 2.5 branch but since
I've bothered to figure out what was going on I'm
sending this in anyway. There still might be a 2.4.4,
right? (Also, my fix looks better than what was done
for 2.5, but I suppose the flush/close I added may not
be necessary.)

Attached is a demo and a patch against 2.4.3.

Thanks,
Mike
msg29444 - (view) Author: Matt Fleming (splitscreen) Date: 2006-08-09 14:10
Logged In: YES 
user_id=1126061

Bug confirmed in release24-maint. Patch looks good to me,
although I think the developers prefer unified diffs, not
contextual, just to keep in mind for the future. And also, I
had to manually patch the Lib/logging/config.py file because
for some reason, the paths in your patch all use lowercase
letters.

Thanks for the patch.
msg29445 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2007-01-11 20:30
Fix for SF #1632328 should cover this - checked into release24-maint.
msg29446 - (view) Author: Anthony Baxter (anthonybaxter) (Python triager) Date: 2007-01-12 09:08
Note, though, that there's no planned "next release" of 2.4. 

2.4 is in "emergency security fix mode" - that is, unless someone finds a critical security problem, I don't plan to make further 2.4.x releases.

If someone else wants to volunteer, of course, that's entirely fine.
History
Date User Action Args
2022-04-11 14:56:19adminsetgithub: 43778
2006-08-04 19:58:03mdbeachycreate