Issue 14490: abitype.py wrong raise format (original) (raw)

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:28 admin set github: 58695
2012-04-05 05:51:42 serhiy.storchaka set messages: +
2012-04-05 02:19:08 eric.araujo set nosy: + eric.araujomessages: +
2012-04-05 01:32:12 r.david.murray set status: open -> closedresolution: fixedmessages: + stage: test needed -> resolved
2012-04-05 01:19:35 r.david.murray set messages: +
2012-04-04 19:34:59 serhiy.storchaka set nosy: + serhiy.storchakamessages: +
2012-04-04 15:19:24 Claudiu.Popa set messages: +
2012-04-04 15:07:55 r.david.murray set files: + tools_sundry.patchmessages: +
2012-04-04 14:25:58 r.david.murray set nosy: + r.david.murraymessages: + stage: test needed
2012-04-04 11:45:22 Claudiu.Popa create