[Django] #31076: dbshell crashes on Windows and Python < 3.8.

668 views
Skip to first unread message

Django

unread,
Dec 9, 2019, 5:36:21 AM12/9/19
to django-...@googlegroups.com
#31076: dbshell crashes on Windows and Python < 3.8.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: nobody
Type: Bug | Status: new
Component: Database | Version: master
layer (models, ORM) |
Severity: Release | Keywords:
blocker |
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
`subprocess.run()`'s `args` parameter accepts a path-like object on
Windows since Python 3.8 (see
[https://docs.python.org/3/library/subprocess.html documentation]), so
26554cf5d1e96db10d0d5f4b69683a22fb82fdf8 broke using `manage.py dbshell`
(maybe sth more) on Windows and Python < 3.8.
{{{
File "C:\Python37\lib\subprocess.py", line 472, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Python37\lib\subprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "C:\Python37\lib\subprocess.py", line 1119, in _execute_child
args = list2cmdline(args)
File "C:\Python37\lib\subprocess.py", line 530, in list2cmdline
needquote = (" " in arg) or ("\t" in arg) or not arg
TypeError: argument of type 'WindowsPath' is not iterable
}}}

Regression in 26554cf5d1e96db10d0d5f4b69683a22fb82fdf8.

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

Django

unread,
Dec 10, 2019, 3:48:38 AM12/10/19
to django-...@googlegroups.com
#31076: dbshell crashes on Windows and Python < 3.8.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/31076#comment:1>

Django

unread,
Dec 10, 2019, 3:51:36 AM12/10/19
to django-...@googlegroups.com
#31076: dbshell crashes on Windows and Python < 3.8.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* stage: Ready for checkin => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/31076#comment:2>

Django

unread,
Dec 10, 2019, 5:38:30 AM12/10/19
to django-...@googlegroups.com
#31076: dbshell crashes on Windows and Python < 3.8.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson):

Grrr. OK, this is an annoying one. Path is such a nice touch, by
preference, I´d rather guard against this at the call point (casting with
`str()`) than revert the change here.

--
Ticket URL: <https://code.djangoproject.com/ticket/31076#comment:1>

Django

unread,
Dec 13, 2019, 11:02:20 AM12/13/19
to django-...@googlegroups.com
#31076: dbshell crashes on Windows and Python < 3.8.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: zeynel
Type: Bug | Status: assigned

Component: Database layer | Version: master
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by zeynel):

* owner: nobody => zeynel
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/31076#comment:2>

Django

unread,
Dec 14, 2019, 6:29:08 PM12/14/19
to django-...@googlegroups.com
#31076: dbshell crashes on Windows and Python < 3.8.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: zeynel
Type: Bug | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by zeynel):

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/31076#comment:3>

Django

unread,
Dec 15, 2019, 1:34:16 AM12/15/19
to django-...@googlegroups.com
#31076: dbshell crashes on Windows and Python < 3.8.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: zeynel
Type: Bug | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* needs_tests: 0 => 1


Comment:

[https://github.com/django/django/pull/12220 PR]

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

Django

unread,
Dec 16, 2019, 4:35:15 AM12/16/19
to django-...@googlegroups.com
#31076: dbshell crashes on Windows and Python < 3.8.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: zeynel
Type: Bug | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* needs_tests: 1 => 0


* stage: Accepted => Ready for checkin


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

Django

unread,
Dec 16, 2019, 5:22:48 AM12/16/19
to django-...@googlegroups.com
#31076: dbshell crashes on Windows and Python < 3.8.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: zeynel
Type: Bug | Status: closed

Component: Database layer | Version: master
(models, ORM) |
Severity: Release blocker | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

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


Comment:

In [changeset:"9d40b6bbf44d0de4d446dde5b9b51cadb60a24a3" 9d40b6bb]:
{{{
#!CommitTicketReference repository=""
revision="9d40b6bbf44d0de4d446dde5b9b51cadb60a24a3"
Fixed #31076 -- Fixed dbshell crash on Windows with Python < 3.8.

subprocess.run()'s args parameter accepts path-like objects on Windows
since Python 3.8.
}}}

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

Reply all
Reply to author
Forward
0 new messages