[issue40270] activation json1 extension in sqlite

Big Stone report at bugs.python.org
Mon Apr 13 05:37:52 EDT 2020


New submission from Big Stone <stonebig34 at gmail.com>:

hi all. On Windows/Mac, isn't sqlite3 module compiled with "json1" extension on recent Python releases ?

I thought it was, but fails to use it.

Python 3.9.0a5 (tags/v3.9.0a5:dcd4c4f, Mar 23 2020, 20:39:59) [MSC v.1924 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> import sqlite3
>>> conn = sqlite3.connect(":memory:")
>>> cursor = conn.cursor()
>>> cursor.execute("select sqlite_version()").fetchall()
[('3.31.1',)]
>>> cursor.execute("select json_object('a',2,'c',4)").fetchall()

Traceback (most recent call last):
  File "<pyshell#5>", line 1, in <module>
    cursor.execute("select json_object('a',2,'c',4)").fetchall()
sqlite3.OperationalError: no such function: json_object
>>>

----------
messages: 366290
nosy: Big Stone
priority: normal
severity: normal
status: open
title: activation json1 extension in sqlite

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40270>
_______________________________________


More information about the Python-bugs-list mailing list