classification
Title: sqlite3 Cursor.description doesn't set type_code
Type: behavior Stage:
Components: Documentation, Library (Lib) Versions: Python 3.3, Python 2.7
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: ghaering Nosy List: docs@python, ghaering, wesclemens
Priority: normal Keywords: patch

Created on 2011-03-27 04:16 by wesclemens, last changed 2015-08-19 09:43 by ghaering. This issue is now closed.

Files
File name Uploaded Description Edit
sqlite3_type_code_py27.diff wesclemens, 2011-03-27 04:16 This patch adds type_code to Cursor.description Python 2.7 review
sqlite3_type_code_py33.diff wesclemens, 2011-03-27 04:53 This patch adds type_code to Cursor.description Python 3.3 review
Messages (3)
msg132289 - (view) Author: William Edward Stuart Clemens (wesclemens) * Date: 2011-03-27 04:16
The DB API Spec 2.0 (PEP 249) clearly requires that column name and type_code be set as the first two values in Cursor.description the other 5 attributes are optional. The sqlite3 module doesn't set type_code.
msg132290 - (view) Author: William Edward Stuart Clemens (wesclemens) * Date: 2011-03-27 04:53
The patch for version 3.3 has a one line difference.
msg248824 - (view) Author: Gerhard Häring (ghaering) * (Python committer) Date: 2015-08-19 09:43
There is no guarantee that all any column in a SQlite resultset always has the same type. That's why I decided to err on the side of setting the type code to "undefined".

Closing as wontfix.
History
Date User Action Args
2018-07-26 14:25:51berker.peksaglinkissue32083 superseder
2015-08-19 09:43:29ghaeringsetstatus: open -> closed
resolution: wont fix
messages: + msg248824
2015-01-11 02:04:30ghaeringsetassignee: docs@python -> ghaering
2011-03-27 04:53:04wesclemenssetfiles: + sqlite3_type_code_py33.diff

assignee: docs@python
components: + Documentation, Library (Lib), - None
versions: + Python 3.3
nosy: + docs@python

messages: + msg132290
2011-03-27 04:18:19ned.deilysetnosy: + ghaering
2011-03-27 04:16:14wesclemenscreate