Opened 9 years ago
Closed 9 years ago
#26613 closed Bug (fixed)
SQLite3 DB backend should remove dependency on sqlite3 module
Reported by: | Gatzy118 | Owned by: | Philip Liberato |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.9 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
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)): ...
Change History (6)
comment:1 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:3 by , 9 years ago
Resolution: | fixed |
---|---|
Status: | closed → new |
comment:4 by , 9 years ago
Sorry. Here's a link to the branch:
Version 0, edited 9 years ago by (next)
comment:5 by , 9 years ago
Has patch: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
Note:
See TracTickets
for help on using tickets.
Please don't mark a ticket as fixed until the respective patch has been committed. Thank you.