Issue 2402: get rid of warnings in regrtest with -3
Created on 2008-03-18 19:12 by bethard, last changed 2022-04-11 14:56 by admin. This issue is now closed.
| Messages (5) | |||
|---|---|---|---|
| msg63967 - (view) | Author: Steven Bethard (bethard) * ![]() |
Date: 2008-03-18 19:12 | |
Running the test suite with -3 enabled issues a load of warnings. The Python 2.6 library should not issue any py3k warnings. |
|||
| msg63985 - (view) | Author: Benjamin Peterson (benjamin.peterson) * ![]() |
Date: 2008-03-18 20:57 | |
No, *correct usage* of the stdlib should not result in Py3k warnings. Old APIs should still be tested, which I suppose is part of the reason that there are so many warnings from testing. |
|||
| msg63989 - (view) | Author: Steven Bethard (bethard) * ![]() |
Date: 2008-03-18 21:15 | |
Fair enough. I agree that the deprecated APIs should still be tested. But there are a lot of other warnings, e.g. where the standard lib uses ``has_key`` instead of ``in``. These should be removed. The only warnings should be those that are actively testing deprecated APIs. Testing of deprecated APIs should probably temporarily suppress the Py3K warnings while they're executing, though that's not really crucial. Reducing the flood of warnings is really worthwhile -- I just fixed a bug in test_atexit which only appeared when -3 was supplied. |
|||
| msg63994 - (view) | Author: Benjamin Peterson (benjamin.peterson) * ![]() |
Date: 2008-03-18 21:35 | |
I made a little decorator which silences py3k warnings. It could be
useful for test.test_support.
def silence_py3k(func):
def decorator(*args, **kwargs):
warnings.simplefilter("ignore", warnings.DeprecationWarning)
func(*args, **kwargs)
warnings.simplefilter("default", warnings.DeprecationWarning)
if sys.flags_py3kwarning:
return decorator
else:
return func
|
|||
| msg71645 - (view) | Author: Benjamin Peterson (benjamin.peterson) * ![]() |
Date: 2008-08-21 14:52 | |
Brett has been doing this. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:32 | admin | set | github: 46654 |
| 2008-08-21 14:52:48 | benjamin.peterson | set | status: open -> closed resolution: duplicate messages: + msg71645 |
| 2008-03-26 14:15:20 | quentin.gallet-gilles | set | nosy: + quentin.gallet-gilles |
| 2008-03-22 23:23:27 | benjamin.peterson | set | components: + Tests |
| 2008-03-22 23:23:10 | benjamin.peterson | set | type: behavior |
| 2008-03-18 21:35:51 | benjamin.peterson | set | messages: + msg63994 |
| 2008-03-18 21:15:11 | bethard | set | messages: + msg63989 |
| 2008-03-18 20:57:49 | benjamin.peterson | set | nosy:
+ benjamin.peterson messages: + msg63985 |
| 2008-03-18 19:12:36 | bethard | create | |
