On Wed, Sep 29, 2010 at 9:03 AM, Jesus Cea <j...@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 | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com