#26613: SQLite3 DB backend should remove dependency on sqlite3 module
----------------------------------------------+--------------------
     Reporter:  Gatzy118                      |      Owner:  nobody
         Type:  Bug                           |     Status:  new
    Component:  Database layer (models, ORM)  |    Version:  1.9
     Severity:  Normal                        |   Keywords:
 Triage Stage:  Unreviewed                    |  Has patch:  0
Easy pickings:  1                             |      UI/UX:  0
----------------------------------------------+--------------------
 Given Django tries to use pysqlite2 by default anyway, would it be
 reasonably to change in django.db.backends.sqlite3.schema this:

 {{{
    35     def quote_value(self, value):
    36         # The backend "mostly works" without this function and there
 are use
    37         # cases for compiling Python without the sqlite3 libraries
 (e.g.
    38         # security hardening).
    39         import sqlite3
    40         try:
    41             value = sqlite3.adapt(value)
    42         except sqlite3.ProgrammingError:
    43             pass
    44         # Manual emulation of SQLite parameter quoting
    45         if isinstance(value, type(True)):
 ...
 }}}

 Into this:

 {{{
  41         try:
  42             import sqlite3
  43             value = sqlite3.adapt(value)
  44         except ImportError:
  45             pass
  46         except sqlite3.ProgrammingError:
  47             pass
  48         # Manual emulation of SQLite parameter quoting
  49         if isinstance(value, type(True)):
 ...
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26613>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.c2a1d0f0295ef614b4a1bfc0925cb870%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to