homepage

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.

classification
Title: get rid of warnings in regrtest with -3
Type: behavior Stage:
Components: Interpreter Core, Tests Versions: Python 2.6
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, bethard, quentin.gallet-gilles
Priority: critical Keywords:

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) * (Python committer) 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) * (Python committer) 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) * (Python committer) 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) * (Python committer) 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) * (Python committer) Date: 2008年08月21日 14:52
Brett has been doing this.
History
Date User Action Args
2022年04月11日 14:56:32adminsetgithub: 46654
2008年08月21日 14:52:48benjamin.petersonsetstatus: open -> closed
resolution: duplicate
messages: + msg71645
2008年03月26日 14:15:20quentin.gallet-gillessetnosy: + quentin.gallet-gilles
2008年03月22日 23:23:27benjamin.petersonsetcomponents: + Tests
2008年03月22日 23:23:10benjamin.petersonsettype: behavior
2008年03月18日 21:35:51benjamin.petersonsetmessages: + msg63994
2008年03月18日 21:15:11bethardsetmessages: + msg63989
2008年03月18日 20:57:49benjamin.petersonsetnosy: + benjamin.peterson
messages: + msg63985
2008年03月18日 19:12:36bethardcreate

AltStyle によって変換されたページ (->オリジナル) /