[Python-Dev] [Python-checkins] r85902 - in python/branches/py3k/Lib: os.py test/test_os.py (original) (raw)
Victor Stinner victor.stinner at haypocalc.com
Tue Nov 2 13:55:40 CET 2010
- Previous message: [Python-Dev] On breaking modules into packages Was: [issue10199] Move Demo/turtle under Lib/
- Next message: [Python-Dev] [Python-checkins] r85902 - in python/branches/py3k/Lib: os.py test/test_os.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I don't know how to ignore the BytesWarning without importing warning. How can I do that?
Victor
Le vendredi 29 octobre 2010 04:31:42, Benjamin Peterson a écrit :
2010/10/28 victor.stinner <python-checkins at python.org>: > Author: victor.stinner > Date: Fri Oct 29 02:38:58 2010 > New Revision: 85902 > > Log: > Issue #10210: os.getexecpath() ignores BytesWarning warnings > > > Modified: > python/branches/py3k/Lib/os.py > python/branches/py3k/Lib/test/testos.py > > Modified: python/branches/py3k/Lib/os.py > ========================================================================= > ===== --- python/branches/py3k/Lib/os.py (original) > +++ python/branches/py3k/Lib/os.py Fri Oct 29 02:38:58 2010 > @@ -382,18 +382,32 @@ > env must be an environment variable dict or None. If env is > None, os.environ will be used. > """ > + # Use a local import instead of a global import to avoid bootstrap > issue: + # the os module is used to build Python extensions. > + import warnings
This sort of function import should be avoided.
- Previous message: [Python-Dev] On breaking modules into packages Was: [issue10199] Move Demo/turtle under Lib/
- Next message: [Python-Dev] [Python-checkins] r85902 - in python/branches/py3k/Lib: os.py test/test_os.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]