Issue16306
Created on 2012-10-23 23:47 by tweksteen, last changed 2022-04-11 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue16306.patch | hieu.nguyen, 2012-10-24 22:42 | review | ||
| issue16306_py3.patch | hieu.nguyen, 2012-10-25 21:29 | review | ||
| issue16306_py27.patch | hieu.nguyen, 2012-10-25 21:29 | review | ||
| test_unknown_option.patch | serhiy.storchaka, 2012-11-23 09:04 | Patch for 3.x | review | |
| test_unknown_option-2.7.patch | serhiy.storchaka, 2012-11-23 09:07 | Patch for 2.7 | review | |
| test_unknown_option_2.patch | serhiy.storchaka, 2012-11-23 15:50 | Patch for 3.x | review | |
| test_unknown_option_2-2.7.patch | serhiy.storchaka, 2012-11-23 15:51 | Patch for 2.7 | review | |
| Messages (17) | |||
|---|---|---|---|
| msg173649 - (view) | Author: ThiƩbaud Weksteen (tweksteen) | Date: 2012-10-23 23:47 | |
Hi, I've just came across an insignificant bug in the Python command line interface. When using an unknown parameter, the same error appears more than once: $ python3 -a -z Unknown option: -a Unknown option: -z Unknown option: -a usage: python3 [option] ... [-c cmd | -m mod | file | -] [arg] ... Try `python -h' for more information. $ python -a -z Unknown option: -a Unknown option: -z Unknown option: -a usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ... Try `python -h' for more information. |
|||
| msg173716 - (view) | Author: Hieu Nguyen (hieu.nguyen) * | Date: 2012-10-24 22:42 | |
I've attached the patch for this issue, including the test. |
|||
| msg173801 - (view) | Author: Hieu Nguyen (hieu.nguyen) * | Date: 2012-10-25 21:29 | |
Submitted another patchs for py3k and python 2.7 |
|||
| msg173805 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2012-10-25 22:50 | |
LGTM. |
|||
| msg174193 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2012-10-30 10:00 | |
Hieu Nguyen, can you please submit a contributor form? http://python.org/psf/contrib/contrib-form/ http://python.org/psf/contrib/ |
|||
| msg174199 - (view) | Author: Hieu Nguyen (hieu.nguyen) * | Date: 2012-10-30 10:25 | |
Serhiy, actually I have submitted my contributor form to Petri Lehtinen in a sprint here in Finland. |
|||
| msg175868 - (view) | Author: Roundup Robot (python-dev) | Date: 2012-11-18 12:07 | |
New changeset d2df83d7c649 by Ezio Melotti in branch '2.7': #16306: Fix multiple error messages when unknown command line parameters where passed to the interpreter. Patch by Hieu Nguyen. http://hg.python.org/cpython/rev/d2df83d7c649 New changeset 0153c077a0fd by Ezio Melotti in branch '3.2': #16306: Fix multiple error messages when unknown command line parameters where passed to the interpreter. Patch by Hieu Nguyen. http://hg.python.org/cpython/rev/0153c077a0fd New changeset 7f01121a660d by Ezio Melotti in branch '3.3': #16306: merge with 3.2. http://hg.python.org/cpython/rev/7f01121a660d New changeset 3a1bcb6de167 by Ezio Melotti in branch 'default': #16306: merge with 3.3. http://hg.python.org/cpython/rev/3a1bcb6de167 |
|||
| msg175869 - (view) | Author: Ezio Melotti (ezio.melotti) * | Date: 2012-11-18 12:08 | |
Fixed, thanks for the patch! |
|||
| msg176130 - (view) | Author: Antoine Pitrou (pitrou) * | Date: 2012-11-22 22:09 | |
You broke the Ubuntu Shared buildbot, could you fix it? http://buildbot.python.org/all/buildslaves/bolen-ubuntu |
|||
| msg176155 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2012-11-23 09:04 | |
Sorry, it's my fault. Here is a patch which should fix the bug. |
|||
| msg176156 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2012-11-23 09:07 | |
Actually 2.7 tests should not be broken, but this patch unify 2.7 and 3.x code. |
|||
| msg176175 - (view) | Author: Ezio Melotti (ezio.melotti) * | Date: 2012-11-23 15:02 | |
The new patch doesn't seem to be correct: without the patch: $ ./python -a -z Unknown option: -a Unknown option: -z usage: ./python [option] ... [-c cmd | -m mod | file | -] [arg] ... with the patch: $ ./python -a -z Unknown option: -a usage: ./python [option] ... [-c cmd | -m mod | file | -] [arg] ... A test case for this should also be added. |
|||
| msg176177 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2012-11-23 15:50 | |
Thanks, Ezio, for point. > without the patch: > $ ./python -a -z > Unknown option: -a > Unknown option: -z > usage: ./python [option] ... [-c cmd | -m mod | file | -] [arg] ... This behavior isn't correct. Try also "-E -a -z" and "-a -E -z" (also with 3.3.0). However I found an error in the test in my patch (actually previous test for 2.7 was correct, but not full). Patch updated, new tests added. |
|||
| msg176178 - (view) | Author: Ezio Melotti (ezio.melotti) * | Date: 2012-11-23 15:56 | |
> This behavior isn't correct. Shouldn't python report all the invalid flags passed? |
|||
| msg176179 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2012-11-23 15:59 | |
Should not. It happened unintentionally (and inconsistently). |
|||
| msg176185 - (view) | Author: Roundup Robot (python-dev) | Date: 2012-11-23 17:01 | |
New changeset 6a79e3beb854 by Ezio Melotti in branch '2.7': #16306: report only the first unknown option and add more tests. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/6a79e3beb854 New changeset 654a628f5f00 by Ezio Melotti in branch '3.2': #16306: report only the first unknown option and add more tests. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/654a628f5f00 New changeset 421a8a5ffbb2 by Ezio Melotti in branch '3.3': #16306: merge with 3.2. http://hg.python.org/cpython/rev/421a8a5ffbb2 New changeset 51caa0820fad by Ezio Melotti in branch 'default': #16306: merge with 3.3. http://hg.python.org/cpython/rev/51caa0820fad |
|||
| msg176215 - (view) | Author: Ezio Melotti (ezio.melotti) * | Date: 2012-11-23 19:14 | |
Buildbots are happy, closing. Thanks Serhiy for the patches! |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:37 | admin | set | github: 60510 |
| 2012-11-23 19:14:32 | ezio.melotti | set | status: open -> closed messages: + msg176215 |
| 2012-11-23 17:01:56 | python-dev | set | messages: + msg176185 |
| 2012-11-23 15:59:01 | serhiy.storchaka | set | messages: + msg176179 |
| 2012-11-23 15:56:24 | ezio.melotti | set | messages: + msg176178 |
| 2012-11-23 15:51:29 | serhiy.storchaka | set | files: + test_unknown_option_2-2.7.patch |
| 2012-11-23 15:50:40 | serhiy.storchaka | set | files:
+ test_unknown_option_2.patch messages: + msg176177 |
| 2012-11-23 15:02:54 | ezio.melotti | set | messages: + msg176175 |
| 2012-11-23 09:07:08 | serhiy.storchaka | set | files:
+ test_unknown_option-2.7.patch messages: + msg176156 |
| 2012-11-23 09:04:25 | serhiy.storchaka | set | files:
+ test_unknown_option.patch nosy: + skrah messages: + msg176155 |
| 2012-11-22 23:42:48 | ezio.melotti | link | issue16536 superseder |
| 2012-11-22 22:09:49 | pitrou | set | status: closed -> open nosy: + pitrou messages: + msg176130 |
| 2012-11-18 12:08:36 | ezio.melotti | set | status: open -> closed messages: + msg175869 assignee: ezio.melotti |
| 2012-11-18 12:07:14 | python-dev | set | nosy:
+ python-dev messages: + msg175868 |
| 2012-10-30 10:25:01 | hieu.nguyen | set | messages: + msg174199 |
| 2012-10-30 10:00:41 | serhiy.storchaka | set | messages: + msg174193 |
| 2012-10-25 22:50:41 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka messages:
+ msg173805 |
| 2012-10-25 21:29:55 | hieu.nguyen | set | files: + issue16306_py27.patch |
| 2012-10-25 21:29:44 | hieu.nguyen | set | files:
+ issue16306_py3.patch messages: + msg173801 |
| 2012-10-24 22:42:15 | hieu.nguyen | set | files:
+ issue16306.patch nosy:
+ hieu.nguyen keywords: + patch |
| 2012-10-24 21:26:35 | ezio.melotti | set | nosy:
+ ezio.melotti |
| 2012-10-24 01:09:00 | r.david.murray | set | keywords:
+ easy components: + Interpreter Core, - None versions: + Python 3.3, Python 3.4 |
| 2012-10-23 23:47:11 | tweksteen | create | |