Re: [Django] #32177: ManagementUtility instantiates CommandParser without passing already-computed prog argument

2020-12-28 Thread Django
#32177: ManagementUtility instantiates CommandParser without passing already-
computed prog argument
-+-
 Reporter:  William Schwartz |Owner:  William
 |  Schwartz
 Type:  Bug  |   Status:  closed
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  freezers | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * keywords:   => freezers


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.f736b6a6118964894b7106f18a3efd44%40djangoproject.com.


Re: [Django] #32177: ManagementUtility instantiates CommandParser without passing already-computed prog argument

2020-11-10 Thread Django
#32177: ManagementUtility instantiates CommandParser without passing already-
computed prog argument
-+-
 Reporter:  William Schwartz |Owner:  William
 |  Schwartz
 Type:  Bug  |   Status:  closed
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Mariusz Felisiak ):

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


Comment:

 In [changeset:"cc2269350548307e3fe31723ff4e40a879a7a173" cc226935]:
 {{{
 #!CommitTicketReference repository=""
 revision="cc2269350548307e3fe31723ff4e40a879a7a173"
 Fixed #32177 -- Made execute_from_command_line() use program name from the
 argv argument.

 This caused crash in environments where sys.argv[0] is incorrectly set
 to None.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.1fda96d56eeb18d950429990863ca44b%40djangoproject.com.


Re: [Django] #32177: ManagementUtility instantiates CommandParser without passing already-computed prog argument

2020-11-09 Thread Django
#32177: ManagementUtility instantiates CommandParser without passing already-
computed prog argument
-+-
 Reporter:  William Schwartz |Owner:  William
 |  Schwartz
 Type:  Bug  |   Status:  assigned
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * needs_better_patch:  1 => 0
 * stage:  Accepted => Ready for checkin


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.57e9f4c75b86e6dd3aa5881da4cbeb84%40djangoproject.com.


Re: [Django] #32177: ManagementUtility instantiates CommandParser without passing already-computed prog argument

2020-11-09 Thread Django
#32177: ManagementUtility instantiates CommandParser without passing already-
computed prog argument
-+-
 Reporter:  William Schwartz |Owner:  William
 |  Schwartz
 Type:  Bug  |   Status:  assigned
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * owner:  Douglas Cueva => William Schwartz


Comment:

 Thanks for the patch.

 > Is this a backport candidate?

 No, this doesn't qualify for a backport.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.6f81cfedb6dcc45badd08c57e8a52942%40djangoproject.com.


Re: [Django] #32177: ManagementUtility instantiates CommandParser without passing already-computed prog argument

2020-11-09 Thread Django
#32177: ManagementUtility instantiates CommandParser without passing already-
computed prog argument
-+-
 Reporter:  William Schwartz |Owner:  Douglas
 |  Cueva
 Type:  Bug  |   Status:  assigned
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  1|UI/UX:  0
-+-
Changes (by William Schwartz):

 * needs_tests:  1 => 0


Comment:

 Replying to [comment:2 Mariusz Felisiak]:
 > ...I was not able to reproduce and invalid message (even with mocking
 `sys.argv`), so a regression test is crucial.

 I've created a patch with a test case in
 [https://github.com/django/django/pull/13658 PR]. (I didn't see Douglas
 Cueva's patch GH-13652 before I pushed mine. Sorry.) Is this a backport
 candidate?

 The
 
[https://github.com/wkschwartz/django/blob/c8a6dab82841abb43dfc7dc8859482d329c8334a/tests/admin_scripts/tests.py#L1868-L1882
 test I added] passes now, and failed like below before I applied the fix.

 {{{
 (venv) ➜  django git:(mgmt-argv0) ✗ tox -e py38 --
 admin_scripts.tests.ExecuteFromCommandLine
 
 py38 run-test: commands[0] | django/.tox/py38/bin/python runtests.py
 admin_scripts.tests.ExecuteFromCommandLine
 Testing against Django installed in 'django/django'
 System check identified no issues (0 silenced).
 E
 ==
 ERROR: test_prog_name_from_argv0
 (admin_scripts.tests.ExecuteFromCommandLine)
 Program name is computed once from argv argument, not sys.argv (#32177).
 --
 Traceback (most recent call last):
   File "django/tests/admin_scripts/tests.py", line 1882, in
 test_prog_name_from_argv0
 execute_from_command_line([''] + args)
   File "django/django/core/management/__init__.py", line 414, in
 execute_from_command_line
 utility.execute()
   File "django/django/core/management/__init__.py", line 347, in execute
 parser = CommandParser(usage='%(prog)s subcommand [options] [args]',
 add_help=False, allow_abbrev=False)
   File "django/django/core/management/base.py", line 54, in __init__
 super().__init__(**kwargs)
   File
 
"/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/argparse.py",
 line 1660, in __init__
 prog = _os.path.basename(_sys.argv[0])
   File
 
"/usr/local/opt/python@3.8/bin/../Frameworks/Python.framework/Versions/3.8/lib/python3.8/posixpath.py",
 line 142, in basename
 p = os.fspath(p)
 TypeError: expected str, bytes or os.PathLike object, not NoneType

 --
 Ran 1 test in 0.005s

 FAILED (errors=1)
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.29ec97610c6c3f5995c9f8f62c867efc%40djangoproject.com.


Re: [Django] #32177: ManagementUtility instantiates CommandParser without passing already-computed prog argument

2020-11-08 Thread Django
#32177: ManagementUtility instantiates CommandParser without passing already-
computed prog argument
-+-
 Reporter:  William Schwartz |Owner:  Douglas
 |  Cueva
 Type:  Bug  |   Status:  assigned
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * needs_better_patch:  0 => 1
 * needs_tests:  0 => 1
 * stage:  Unreviewed => Accepted


Comment:

 Tentatively accepted, looks valid but I was not able to reproduce and
 invalid message (even with mocking `sys.argv`), so a regression test is
 crucial.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.d5f7dd75a040f67e3186ce730abd34c8%40djangoproject.com.


Re: [Django] #32177: ManagementUtility instantiates CommandParser without passing already-computed prog argument

2020-11-07 Thread Django
#32177: ManagementUtility instantiates CommandParser without passing already-
computed prog argument
-+-
 Reporter:  William Schwartz |Owner:  Douglas
 |  Cueva
 Type:  Bug  |   Status:  assigned
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Douglas Cueva):

 * owner:  nobody => Douglas Cueva
 * status:  new => assigned


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.acc7381b5b42e1b49f9ca36482b9ba3f%40djangoproject.com.