[Python-Dev] Re-enable warnings in regrtest and/or unittest

Łukasz Langa lukasz at langa.pl
Tue Nov 23 01:43:21 CET 2010


Wiadomość napisana przez Michael Foord w dniu 2010-11-22, o godz. 23:01:

> On 22/11/2010 21:08, Guido van Rossum wrote:
>> On Mon, Nov 22, 2010 at 11:24 AM, Brett Cannon<brett at python.org>  wrote:
>>> The problem with that is it means developers who switch to Python 3.2
>>> or whatever are suddenly going to have their tests fail until they
>>> update their code to turn the warnings off.
>> That sounds like a feature to me... :-)
>> 
> I think Ezio was suggesting just turning warnings on by default when unittest is run, not turning them into errors. Ezio is suggesting that developers could explicitly turn warnings off again, but when you use the default test runner warnings would be shown. His logic is that warnings are for developers, and so are tests...

Then again, he is not against the idea to turn those warnings into errors, at least for regrtest.

If you agree to do that for regrtest I will clean up the tests for warnings. Already did that for zipfile so it doesn't raise ResourceWarnings anymore. I just need to correct multiprocessing and xmlrpc ResourceWarnings, silence some DeprecationWarnings in the tests and we're all set. Ah, I see a couple more with -uall but nothing scary.

Anyway, I find warnings as errors in regrtest a welcome feature. Let's make it happen :)

-- 
Best regards,
Łukasz Langa
tel. +48 791 080 144
WWW http://lukasz.langa.pl/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20101123/e6554e6f/attachment.html>


More information about the Python-Dev mailing list