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.

Author vinay.sajip
Recipients flox, python-dev, vinay.sajip
Date 2011-11-07.09:12:07
SpamBayes Score 7.0927153e-12
Marked as misclassified No
Message-id <1320657128.33.0.560379605435.issue13361@psf.upfronthosting.co.za>
In-reply-to
Content
@Florent: Sorry, I didn't see your patch, for some reason. But I would say:

1. I agree that where I put the check (logging.getLogger) does not catch the case where someone instantiates the logger directly (using logging.Logger(any)), but users aren't supposed to instantiate loggers directly anyway - this would not result in a working logger. The check is in the same place where (in 2.7) we check for Unicode and encode to bytes.

2. I don't want to be too liberal in accepting logger names, since they are intended to mean "a place in the application". So, accepting anything other than text does not seem right to me - so str for 3.x, str or unicode for 2.x.

3. I thought a single test (passing in a invalid type) would be sufficient for the logging code, ISTM adding tests with lots of types is actually testing isinstance ;-)

4. I didn't notice your patch, and hence goofed in raising a ValueError instead of (correctly as you had it) a TypeError. I will rectify this.
History
Date User Action Args
2011-11-07 09:12:08vinay.sajipsetrecipients: + vinay.sajip, flox, python-dev
2011-11-07 09:12:08vinay.sajipsetmessageid: <1320657128.33.0.560379605435.issue13361@psf.upfronthosting.co.za>
2011-11-07 09:12:07vinay.sajiplinkissue13361 messages
2011-11-07 09:12:07vinay.sajipcreate