Opened 5 years ago
Closed 5 years ago
#31076 closed Bug (fixed)
dbshell crashes on Windows and Python < 3.8.
Reported by: | Mariusz Felisiak | Owned by: | zeynel |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Release blocker | Keywords: | |
Cc: | Jon Dufresne, Carlton Gibson | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
subprocess.run()
's args
parameter accepts a path-like object on Windows since Python 3.8 (see 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.
Change History (6)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 5 years ago
Has patch: | set |
---|
comment:5 by , 5 years ago
Needs tests: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
Note:
See TracTickets
for help on using tickets.
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.