A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-August/081894.html below:

[Python-Dev] Why does httplib import from test_support?

[Python-Dev] Why does httplib import from test_support?Nick Coghlan ncoghlan at gmail.com
Tue Aug 19 17:46:14 CEST 2008
Brett Cannon wrote:
> On Mon, Aug 18, 2008 at 11:55 AM, Fred Drake <fdrake at acm.org> wrote:
>> On Aug 18, 2008, at 2:43 PM, Antoine Pitrou wrote:
>>> If it's about silencing warnings, then how about putting it in the
>>> warnings
>>> module?
>>
>> That sounds good to me, and would be very reasonable.  This would make a
>> nice context manager.
>>
> 
> That works for me as well; just move catch_warning() to 'warnings' and
> leave test.test_support as-is. If we did that, though, I would want to
> make 'record' False by default so that it had more reasonable defaults
> for non-testing purposes.

Moving this single context manager over to warnings definitely makes
more sense to me than moving the whole test_support module.

It would also be easy enough to add a "catch_warning" factory function
in test_support that switched the default back to record=True so we
didn't have to change all of the invocations in the test suite.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
            http://www.boredomandlaziness.org
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4