On Wed, Sep 29, 2010 at 9:03 AM, Jesus Cea <jcea at jcea.es> wrote: > About converting the deprecation warning to a py3k warning... Would a > py3k warning be converted to an error when python is invoked as "-We"?. > If that is the case, we are in the same situation. To unpack Guido's response slightly, Py3k specific deprecation warnings are only triggered if you pass the "-3" flag on the command line. So "-We" won't cause them to throw an exception, but "-We -3" will. (Python 2.6.5, started with "-We") >>> warnings.warnpy3k("Test") >>> sys.py3kwarning = True >>> warnings.warnpy3k("Test") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.6/warnings.py", line 22, in warnpy3k warn(message, category, stacklevel+1) DeprecationWarning: Test Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
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