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 terry.reedy
Recipients ghazel, terry.reedy
Date 2010-06-09.23:42:36
SpamBayes Score 0.00040556572
Marked as misclassified No
Message-id <1276126958.93.0.402761511433.issue3423@psf.upfronthosting.co.za>
In-reply-to
Content
In 3.1, I get
>>> exec("1/0")
Traceback (most recent call last):
  File "<pyshell#5>", line 1, in <module>
    exec("1/0")
  File "<string>", line 1, in <module>
ZeroDivisionError: int division or modulo by zero

In your example, would you really prefer that the warning message start with "<string>1" (or the 2.x equivalent) instead of "t.py1"? If I were running a multi-file app with warnings turned on, I would prefer the latter. The message "DeprecationWarning: raising a string exception is deprecated" is certainly enough to suggest that one search the file for 'raise'.

In any case, this would only be a bug if it disagreed with docs or if this were different from the usual behavior with deprecation warnings. It is too late for new features in 2.x and this does not apply to 3.x.
History
Date User Action Args
2010-06-09 23:42:39terry.reedysetrecipients: + terry.reedy, ghazel
2010-06-09 23:42:38terry.reedysetmessageid: <1276126958.93.0.402761511433.issue3423@psf.upfronthosting.co.za>
2010-06-09 23:42:37terry.reedylinkissue3423 messages
2010-06-09 23:42:36terry.reedycreate