Re: [Django] #11407: --version weirdness

10 views
Skip to first unread message

Django

unread,
Dec 12, 2011, 6:43:52 PM12/12/11
to django-...@googlegroups.com
#11407: --version weirdness
-------------------------------------+-------------------------------------
Reporter: kmtracey | Owner: marclurr
Type: Bug | Status: assigned
Component: Core (Management | Version: SVN
commands) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by marclurr):

* owner: nobody => marclurr
* status: new => assigned
* ui_ux: => 0
* easy: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/11407#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 14, 2011, 6:51:58 PM12/14/11
to django-...@googlegroups.com
#11407: --version weirdness
-------------------------------------+-------------------------------------
Reporter: kmtracey | Owner: marclurr
Type: Bug | Status: assigned
Component: Core (Management | Version: SVN
commands) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by marclurr):

Explanation of changes in command_parser.diff:

1. Modified _process_args on LaxOptionParser so that it doesn't catch the
SystemExit thrown by the exit() function
2. Modified print_help on LaxOptionParser to print the help message,
rather than doing nothing
3. Renamed LaxOptionParser to ManagementUtilityOptionParser, as it is
pretty specific to the management utility and isn't used anywhere else
4. Removed --version, --help and -h logic from ManagementUtility.execute
5. Removed exception handling for the call to LaxOptionParser.parse_args()
as it's only purpose seemed to be to catch SystemExit throw when --version
or --help are specified on the commandline, so allow the specific logic
below to run. Since this logic has now been removed the exception handling
is not required

--
Ticket URL: <https://code.djangoproject.com/ticket/11407#comment:4>

Django

unread,
Dec 14, 2011, 6:52:47 PM12/14/11
to django-...@googlegroups.com
#11407: --version weirdness
-------------------------------------+-------------------------------------
Reporter: kmtracey | Owner: marclurr
Type: Bug | Status: assigned
Component: Core (Management | Version: SVN
commands) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by marclurr):

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/11407#comment:5>

Django

unread,
Feb 4, 2012, 12:58:44 PM2/4/12
to django-...@googlegroups.com
#11407: --version weirdness
-------------------------------------+-------------------------------------
Reporter: kmtracey | Owner: marclurr
Type: Bug | Status: assigned
Component: Core (Management | Version: SVN
commands) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 1
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by jezdez):

* needs_better_patch: 0 => 1


Comment:

This breaks the admin_scripts tests currently.

--
Ticket URL: <https://code.djangoproject.com/ticket/11407#comment:6>

Django

unread,
Mar 29, 2013, 5:05:15 PM3/29/13
to django-...@googlegroups.com
#11407: --version weirdness
-------------------------------------+-------------------------------------
Reporter: kmtracey | Owner:
Type: Bug | Status: new
Component: Core (Management | Version: master

commands) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0

Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by claudep):

* status: assigned => new
* needs_better_patch: 1 => 0
* owner: marclurr =>


Comment:

Just uploaded a new patch. It's somewhat similar to the one marclurr
posted, except I didn't rename the subclassed parser. All tests pass with
sqlite3.

--
Ticket URL: <https://code.djangoproject.com/ticket/11407#comment:7>

Django

unread,
Nov 27, 2013, 12:25:14 PM11/27/13
to django-...@googlegroups.com
#11407: --version weirdness
-------------------------------------+-------------------------------------
Reporter: kmtracey | Owner:
Type: Bug | Status: new
Component: Core (Management | Version: master
commands) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: management django- | Needs documentation: 0
admin.py manage.py | Patch needs improvement: 0
Has patch: 1 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by Siecje):

* keywords: => management django-admin.py manage.py


--
Ticket URL: <https://code.djangoproject.com/ticket/11407#comment:8>

Django

unread,
Jun 14, 2014, 8:07:10 AM6/14/14
to django-...@googlegroups.com
#11407: --version weirdness
-------------------------------------+-------------------------------------
Reporter: kmtracey | Owner:
Type: Bug | Status: new
Component: Core (Management | Version: master
commands) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: management django- | Needs documentation: 0
admin.py manage.py | Patch needs improvement: 0
Has patch: 1 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by claudep):

After the partial rewrite needed by the conversion to `argparse` (#19973),
only the first "weirdness" partially subsists:

{{{
$ ./manage.py --version --help
Unknown command: '--version'
Type 'manage.py help' for usage.
}}}
or
{{{
$ ./manage.py --help --version
Unknown command: '--help'
Type 'manage.py help' for usage.
}}}

While individually using `--help` or `--version` produces the expected
output. Do we want to specifically support that sort of combination?

--
Ticket URL: <https://code.djangoproject.com/ticket/11407#comment:9>

Django

unread,
Jun 14, 2014, 8:40:17 AM6/14/14
to django-...@googlegroups.com
#11407: --version weirdness
-------------------------------------+-------------------------------------
Reporter: kmtracey | Owner:
Type: Bug | Status: closed

Component: Core (Management | Version: master
commands) | Resolution: fixed

Severity: Normal | Triage Stage: Accepted
Keywords: management django- | Needs documentation: 0
admin.py manage.py | Patch needs improvement: 0
Has patch: 1 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* status: new => closed
* resolution: => fixed


Comment:

That wouldn't be a good use of your time. I don't see the use case for
asking for both help and version at the same time.

--
Ticket URL: <https://code.djangoproject.com/ticket/11407#comment:10>

Reply all
Reply to author
Forward
0 new messages