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.

classification
Title: abitype.py wrong raise format
Type: behavior Stage: resolved
Components: Demos and Tools Versions: Python 3.2, Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Claudiu.Popa, eric.araujo, r.david.murray, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2012-04-04 11:45 by Claudiu.Popa, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
abitype.patch Claudiu.Popa, 2012-04-04 11:45
tools_sundry.patch r.david.murray, 2012-04-04 15:07 review
Messages (9)
msg157467 - (view) Author: PCManticore (Claudiu.Popa) * (Python triager) Date: 2012-04-04 11:45
In Tools/abitype.py an exception is raised using the old format:

raise Exception, '%s has no PyVarObject_HEAD_INIT' % name

The attached patch fixes this problem.
msg157481 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012-04-04 14:25
Thanks for the patch.

Do you have an interest in trying your hand at writing a test for this to go into Lib/test/test_tools.py?
msg157485 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012-04-04 15:07
Nevermind, it occurred to me that what we really need is a 'test_sundry' style test for the tools.  Here's a patch that adds that.  I'll apply it after I fix the other bugs it reveals (which include the other two you pointed out as a subset...).
msg157489 - (view) Author: PCManticore (Claudiu.Popa) * (Python triager) Date: 2012-04-04 15:19
Oh, ok then. That makes the last file added in 14491 irrelevant.
msg157499 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2012-04-04 19:34
Hmm. I came across this error yesterday in the tests, when broke utf-16 decoder. The error was introduced in the module atexit. Until it all tests passed successfully, and this branch will not run.

A simple search

find -name '*.py' -exec egrep '\braise +\w+[^(]*,' '{}' +

showed more than a thousand of problem lines.
msg157523 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012-04-05 01:19
Serhiy: I'm not sure what you are talking about.  Does it relate to this specific issue (abitype.py)?
msg157527 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012-04-05 01:32
Fixed in 62dde5dd475e and 696cb524322a.  Thanks for the patch.
msg157531 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-04-05 02:19
Serhiy is talking about the same syntax issue, but in other files, such as Tools/msi.  The regex given sprouts a lot of false positives from comments or docstrings; for the msi one, I presume it is not a bug (it’s probably run with Python 2), otherwise Martin would have noticed it when making releases.
msg157538 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2012-04-05 05:51
Because of some error in my source tree was a lot of Python2 files, which gave a false result (see issue 14497). After cleaning, old-style raise was only in Mac/BuildScript/build-installer.py and Tools/msi/.
History
Date User Action Args
2022-04-11 14:57:28adminsetgithub: 58695
2012-04-05 05:51:42serhiy.storchakasetmessages: + msg157538
2012-04-05 02:19:08eric.araujosetnosy: + eric.araujo
messages: + msg157531
2012-04-05 01:32:12r.david.murraysetstatus: open -> closed
resolution: fixed
messages: + msg157527

stage: test needed -> resolved
2012-04-05 01:19:35r.david.murraysetmessages: + msg157523
2012-04-04 19:34:59serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg157499
2012-04-04 15:19:24Claudiu.Popasetmessages: + msg157489
2012-04-04 15:07:55r.david.murraysetfiles: + tools_sundry.patch

messages: + msg157485
2012-04-04 14:25:58r.david.murraysetnosy: + r.david.murray

messages: + msg157481
stage: test needed
2012-04-04 11:45:22Claudiu.Popacreate