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 Conrad Ho
Recipients Conrad Ho, CuriousLearner, berker.peksag, demian.brecht, erynofwales, msosey, r.david.murray, sloonz, xgdomingo
Date 2018-08-01.23:16:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1533165382.09.0.56676864532.issue24255@psf.upfronthosting.co.za>
In-reply-to
Content
Hi,

I have referenced the original patch and created an updated patch that uses the logging module + f-strings in place of the print statements in the http.client module. Also updated the relevant tests for print/logging in test_httplib to reflect these changes.

The HTTPHandlerTest testcase from test_logging was also affected. In the testcase, it gets a logger with name 'http' and adds a logging.HTTPHandler to it. In our patch, we create a http.client logger, which happens to be considered a child of this testcase logger under the logger naming hierarchy.

This causes http.client logging events to propagate up to the 'http' logger and for the testcase to loop infinitely (ie. the HTTPHandler calls http.client functions internally. These functions log events using the http.client logger, which propagate up to the testcase http logger which calls HttpHandler again).

I have simply changed the testcase getLogger name to not be 'http' and clash with that http.client module logger.
History
Date User Action Args
2018-08-01 23:16:22Conrad Hosetrecipients: + Conrad Ho, r.david.murray, berker.peksag, demian.brecht, erynofwales, CuriousLearner, xgdomingo, sloonz, msosey
2018-08-01 23:16:22Conrad Hosetmessageid: <1533165382.09.0.56676864532.issue24255@psf.upfronthosting.co.za>
2018-08-01 23:16:22Conrad Holinkissue24255 messages
2018-08-01 23:16:22Conrad Hocreate