[Python-Dev] Pronouncement needed in issue9675 (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Wed Sep 29 14:04:24 CEST 2010
- Previous message: [Python-Dev] Pronouncement needed in issue9675
- Next message: [Python-Dev] Pronouncement needed in issue9675
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 "", line 1, in 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
- Previous message: [Python-Dev] Pronouncement needed in issue9675
- Next message: [Python-Dev] Pronouncement needed in issue9675
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]