Issue 34018: SQLite converters are documented to be sensitive to the case of type names, but they're not (original) (raw)
Issue34018
Created on 2018-07-02 08:23 by sir-sigurd, last changed 2022-04-11 14:59 by admin. This issue is now closed.
Pull Requests | |||
---|---|---|---|
URL | Status | Linked | Edit |
PR 8042 | merged | sir-sigurd,2018-07-02 08:47 | |
PR 8065 | merged | miss-islington,2018-07-03 12:00 | |
PR 8066 | merged | miss-islington,2018-07-03 12:01 | |
PR 8067 | merged | miss-islington,2018-07-03 12:02 |
Messages (7) | ||
---|---|---|
msg320855 - (view) | Author: Sergey Fedoseev (sir-sigurd) * | Date: 2018-07-02 08:23 |
SQLite converters are documented to be sensitive to the case of type names, but they're not. In [50]: import sqlite3 ...: ...: sqlite3.converters.clear() ...: sqlite3.register_converter('T', lambda x: 'UPPER') ...: sqlite3.register_converter('t', lambda x: 'lower') ...: ...: con = sqlite3.connect(':memory:', detect_types=sqlite3.PARSE_DECLTYPES) ...: cur = con.cursor() ...: cur.execute('create table test(upper T, lower t)') ...: cur.execute('insert into test values (?, ?)', ('X', 'x')) ...: cur.execute('select * from test') ...: cur.fetchone() ...: Out[50]: ('lower', 'lower') In [51]: sqlite3.converters Out[51]: {'T': <function __main__.>} Original commit in pysqlite that makes converters case insensitive: https://github.com/ghaering/pysqlite/commit/1e8bd36be93b7d7425910642b72e4152c77b0dfd | ||
msg320969 - (view) | Author: Tal Einat (taleinat) * ![]() |
Date: 2018-07-03 11:49 |
It's worth noting that the referenced commit where this change was made is from 2006... | ||
msg320972 - (view) | Author: Tal Einat (taleinat) * ![]() |
Date: 2018-07-03 11:59 |
New changeset 831c29721dcb1b768c6315a4b8a4059c4c97ee8b by Tal Einat (Sergey Fedoseev) in branch 'master': bpo-34018: Doc'd that type names of SQLite converters are case-insensitive. (GH-8042) https://github.com/python/cpython/commit/831c29721dcb1b768c6315a4b8a4059c4c97ee8b | ||
msg320973 - (view) | Author: Tal Einat (taleinat) * ![]() |
Date: 2018-07-03 12:02 |
I tested and indeed this is case-insensitive even on 2.7. | ||
msg320977 - (view) | Author: Tal Einat (taleinat) * ![]() |
Date: 2018-07-03 12:37 |
New changeset 6699386231d326c50439b9e1df752e1aed7ca6b4 by Tal Einat (Miss Islington (bot)) in branch '3.7': bpo-34018: Doc'd that type names of SQLite converters are case-insensitive. (GH-8042) (GH-8065) https://github.com/python/cpython/commit/6699386231d326c50439b9e1df752e1aed7ca6b4 | ||
msg320978 - (view) | Author: Tal Einat (taleinat) * ![]() |
Date: 2018-07-03 12:37 |
New changeset f55a818954212e8e6c97e3d66cf1478120a3220f by Tal Einat (Miss Islington (bot)) in branch '3.6': bpo-34018: Doc'd that type names of SQLite converters are case-insensitive. (GH-8042) (GH-8067) https://github.com/python/cpython/commit/f55a818954212e8e6c97e3d66cf1478120a3220f | ||
msg320979 - (view) | Author: Tal Einat (taleinat) * ![]() |
Date: 2018-07-03 12:37 |
New changeset 292ce153fcc2d991164d19ad3f3deb86157898d5 by Tal Einat (Miss Islington (bot)) in branch '2.7': bpo-34018: Doc'd that type names of SQLite converters are case-insensitive. (GH-8042) (GH-8066) https://github.com/python/cpython/commit/292ce153fcc2d991164d19ad3f3deb86157898d5 |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:59:02 | admin | set | github: 78199 |
2018-07-03 12:38:11 | taleinat | set | status: open -> closedresolution: fixedstage: patch review -> resolved |
2018-07-03 12:37:38 | taleinat | set | messages: + |
2018-07-03 12:37:29 | taleinat | set | messages: + |
2018-07-03 12:37:19 | taleinat | set | messages: + |
2018-07-03 12:02:42 | miss-islington | set | pull_requests: + <pull%5Frequest7676> |
2018-07-03 12:02:10 | taleinat | set | messages: + versions: + Python 2.7, Python 3.6, Python 3.7, Python 3.8 |
2018-07-03 12:01:45 | miss-islington | set | pull_requests: + <pull%5Frequest7675> |
2018-07-03 12:00:44 | miss-islington | set | pull_requests: + <pull%5Frequest7674> |
2018-07-03 11:59:34 | taleinat | set | messages: + |
2018-07-03 11:49:45 | taleinat | set | nosy: + taleinatmessages: + |
2018-07-02 08:47:08 | sir-sigurd | set | keywords: + patchstage: patch reviewpull_requests: + <pull%5Frequest7651> |
2018-07-02 08:23:53 | sir-sigurd | create |