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: Add sanity-check else case to regrtest option parsing
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.2, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: r.david.murray Nosy List: brett.cannon, pitrou, r.david.murray
Priority: low Keywords: patch

Created on 2009-11-14 18:43 by r.david.murray, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
regrtest-detect-bad-option.patch r.david.murray, 2009-11-14 18:43
Messages (4)
msg95249 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-11-14 18:43
In forward porting a patch to py3k I noticed that there is a 'g' option
in the optparse argument list in regrtest in 2.x that is not present in
3.x.  But the surprising thing was that there are no docs for this
option, nor any option handler in the 2.x regrtest.

I propose to add an 'else' case to the option parsing loop that asks the
user to report a bug if it is handed an unknown option.  Patch attached.

My one question is whether this might have been intentional for backward
compatibility reasons: let -g be passed and ignore it silently.  I'm
guessing it was just a deletion oversight, though.
msg95254 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-11-14 19:03
That should have been 'getopt option list'.
msg95255 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2009-11-14 19:17
I bet it was an option oversight. Since regrtest is an internal tool we 
don't really need to fret about backwards-compatibility for anyone.
msg95267 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-11-15 00:41
Committed in r76276 through r76281, along with removing 'g' from the
getopt list in 2.6.  3.1 still has other traces of the -g option; I
haven't cleaned that up.
History
Date User Action Args
2022-04-11 14:56:54adminsetgithub: 51573
2009-11-15 00:41:56r.david.murraysetstatus: open -> closed

assignee: r.david.murray
keywords: patch, patch
messages: + msg95267
type: enhancement -> behavior
resolution: fixed
stage: patch review -> resolved
2009-11-14 19:17:06brett.cannonsetkeywords: patch, patch
nosy: + brett.cannon
messages: + msg95255

2009-11-14 19:03:29r.david.murraysetkeywords: patch, patch

messages: + msg95254
2009-11-14 18:43:09r.david.murraycreate