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.

Author zach.ware
Recipients Michael.Wu, ghazel, terry.reedy, zach.ware
Date 2014-06-23.01:30:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1403487000.75.0.849636608117.issue3423@psf.upfronthosting.co.za>
In-reply-to
Content
Sorry, Terry; I updated the resolution because the issue was not closed, and the versions to match the currently acceptable branches after a discussion at the Bloomberg sprint, but failed to elaborate on what the actual bug here is that came out of that discussion.

The actual problem is with any warning raised by exec'ing a string:

C:\Temp>type exectest.py
# line 1

import os

os.listdir(b'.') # line 5

exec("os.listdir(b'.')") # line 7
C:\Temp>py -3.4 -Wall exectest.py
exectest.py:5: DeprecationWarning: The Windows bytes API has been deprecated, use Unicode filenames instead
  os.listdir(b'.') # line 5
exectest.py:1: DeprecationWarning: The Windows bytes API has been deprecated, use Unicode filenames instead
  # line 1

C:\Temp>type exectest-2.7.py
# line 1

"test" > 3 # line 3

exec("'test' > 3") # line 5

C:\Temp>py -2.7 -3 -Wall exectest-2.7.py
exectest-2.7.py:3: DeprecationWarning: comparing unequal types not supported in 3.x
  "test" > 3 # line 3
exectest-2.7.py:1: DeprecationWarning: comparing unequal types not supported in 3.x
  # line 1
History
Date User Action Args
2014-06-23 01:30:00zach.waresetrecipients: + zach.ware, terry.reedy, ghazel, Michael.Wu
2014-06-23 01:30:00zach.waresetmessageid: <1403487000.75.0.849636608117.issue3423@psf.upfronthosting.co.za>
2014-06-23 01:30:00zach.warelinkissue3423 messages
2014-06-23 01:30:00zach.warecreate