New submission from Sergey Fedoseev <fedoseev.ser...@gmail.com>:
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__.<lambda>>} Original commit in pysqlite that makes converters case insensitive: https://github.com/ghaering/pysqlite/commit/1e8bd36be93b7d7425910642b72e4152c77b0dfd ---------- assignee: docs@python components: Documentation messages: 320855 nosy: docs@python, sir-sigurd priority: normal severity: normal status: open title: SQLite converters are documented to be sensitive to the case of type names, but they're not _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34018> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com