Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqlite3 Cursor.description doesn't set type_code #55900

Closed
wesclemens mannequin opened this issue Mar 27, 2011 · 3 comments
Closed

sqlite3 Cursor.description doesn't set type_code #55900

wesclemens mannequin opened this issue Mar 27, 2011 · 3 comments
Labels
docs Documentation in the Doc dir stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@wesclemens
Copy link
Mannequin

wesclemens mannequin commented Mar 27, 2011

BPO 11691
Files
  • sqlite3_type_code_py27.diff: This patch adds type_code to Cursor.description Python 2.7
  • sqlite3_type_code_py33.diff: This patch adds type_code to Cursor.description Python 3.3
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2015-08-19.09:43:29.994>
    created_at = <Date 2011-03-27.04:16:14.523>
    labels = ['type-bug', 'library', 'docs']
    title = "sqlite3 Cursor.description doesn't set type_code"
    updated_at = <Date 2015-08-19.09:43:29.992>
    user = 'https://bugs.python.org/wesclemens'

    bugs.python.org fields:

    activity = <Date 2015-08-19.09:43:29.992>
    actor = 'ghaering'
    assignee = 'ghaering'
    closed = True
    closed_date = <Date 2015-08-19.09:43:29.994>
    closer = 'ghaering'
    components = ['Documentation', 'Library (Lib)']
    creation = <Date 2011-03-27.04:16:14.523>
    creator = 'wesclemens'
    dependencies = []
    files = ['21421', '21422']
    hgrepos = []
    issue_num = 11691
    keywords = ['patch']
    message_count = 3.0
    messages = ['132289', '132290', '248824']
    nosy_count = 3.0
    nosy_names = ['ghaering', 'docs@python', 'wesclemens']
    pr_nums = []
    priority = 'normal'
    resolution = 'wont fix'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue11691'
    versions = ['Python 2.7', 'Python 3.3']

    @wesclemens
    Copy link
    Mannequin Author

    wesclemens mannequin commented Mar 27, 2011

    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.

    @wesclemens wesclemens mannequin added the type-bug An unexpected behavior, bug, or error label Mar 27, 2011
    @wesclemens
    Copy link
    Mannequin Author

    wesclemens mannequin commented Mar 27, 2011

    The patch for version 3.3 has a one line difference.

    @wesclemens wesclemens mannequin added docs Documentation in the Doc dir stdlib Python modules in the Lib dir labels Mar 27, 2011
    @wesclemens wesclemens mannequin assigned docspython Mar 27, 2011
    @ghaering ghaering mannequin assigned ghaering and unassigned docspython Jan 11, 2015
    @ghaering
    Copy link
    Mannequin

    ghaering mannequin commented Aug 19, 2015

    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.

    @ghaering ghaering mannequin closed this as completed Aug 19, 2015
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    docs Documentation in the Doc dir stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants