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: Patches to logging
Type: Stage:
Components: Library (Lib) Versions: Python 2.3
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: nnorwitz Nosy List: nnorwitz, vinay.sajip
Priority: normal Keywords: patch

Created on 2003-02-17 00:22 by vinay.sajip, last changed 2022-04-10 16:06 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
__init__.patch vinay.sajip, 2003-02-17 00:25 Patch to Lib\logging\__init__.py
handlers.patch vinay.sajip, 2003-02-17 00:28 Patch to Lib\logging\handlers.py
liblogging.patch vinay.sajip, 2003-02-17 00:56 Patch to Doc\lib\liblogging.tex
Messages (4)
msg42869 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2003-02-17 00:22
Patches to logging as discussed in recent post to python-
dev.
msg42870 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-02-17 16:24
Logged In: YES 
user_id=33168

I had to update the expected output for the change from WARN
to WARNING.  I also modified the test to use WARNING in 2
places.

The test is successful, but hangs after printing 1 test OK.
 This is the only problem I have.
Could the problem be that hdlr.close() is commented on in
__init__.py:1013?
Some other nits are below.  

I modified the hasattr(sys, "version_info") condition (4
lines) for _verinfo in __init__.py to the equivalent:

  _verinfo = getattr(sys, "version_info", None)
Since _verinfo is only used in handlers.py, does it really
belong in there?
Actually, since _verinfo is only used to determine if a
socket has sendall(), wouldn't it be better to just do a
hasattr(self.sock, 'sendall') check?
Vinay, when you make a patch, can you put all the files in a
single patch from the src/ directory?  It's easier to
download & apply.  Thanks.
msg42871 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-02-17 16:25
Logged In: YES 
user_id=33168

Uncommenting the hdlr.close() (ie calling it) did fix the hang.
msg42872 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-02-18 14:31
Logged In: YES 
user_id=33168

I left hdlr.close() commented out as in the original patch
per Vinay's private mail.  Instead modified the test to
close the handler in the two places where removeHandler was
called.  This also fixed the hang.

Checked in as:
 Doc/lib/liblogging.tex 1.8
 Lib/logging/__init__.py 1.5
 Lib/logging/handlers.py 1.5
 Lib/test/test_logging.py 1.5
 Lib/test/output/test_logging 1.3
History
Date User Action Args
2022-04-10 16:06:52adminsetgithub: 37998
2003-02-17 00:22:41vinay.sajipcreate