#34535: dbshell management command can crash if DATABASES["name"] is a PosixPath
-------------------------------------+-------------------------------------
     Reporter:  Jan Pieter           |                    Owner:  Jan
  Waagmeester                        |  Pieter Waagmeester
         Type:  Bug                  |                   Status:  closed
    Component:  Core (Management     |                  Version:  4.2
  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:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Adam Johnson):

 I also just hit this. Thanks for the fix.

 For completeness, the "sometimes" depends on the exit code of SQLite,
 which is non-zero if the last run query was an error, for example:

 {{{
 $ ./manage.py dbshell
 SQLite version 3.39.5 2022-10-14 20:58:05
 Enter ".help" for usage hints.
 sqlite> select;
 Parse error: near ";": syntax error
   select;
         ^--- error here
 sqlite> ^D
 Traceback (most recent call last):
 ...
 TypeError: sequence item 1: expected str instance, PosixPath found
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34535#comment:7>
Django <https://code.djangoproject.com/>
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701885484f547-9036fa9c-c071-4165-9371-a12e96f3a313-000000%40eu-central-1.amazonses.com.

Reply via email to