This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: activate (or include) json1 extension in sqlite
Type: behavior Stage: resolved
Components: Extension Modules, Windows Versions: Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Big Stone, ammar2, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords: patch

Created on 2020-04-13 09:37 by Big Stone, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 19528 merged ammar2, 2020-04-14 23:25
Messages (4)
msg366290 - (view) Author: Big Stone (Big Stone) Date: 2020-04-13 09:37
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
>>>
msg366559 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2020-04-15 21:19
New changeset 58d6f2ee3aeb699156d4784acccd2910d27982e7 by Ammar Askar in branch 'master':
bpo-40270: Enable json extension in Windows sqlite extension (GH-19528)
https://github.com/python/cpython/commit/58d6f2ee3aeb699156d4784acccd2910d27982e7
msg366562 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2020-04-15 21:55
This has been done in the macOS installer since 9625bf520e08828e36bc3b1d043af679eb5f993d, so this is now done.  I won't backport it due to the inevitable confusion over which patch version of which branch started including it on Windows; it's much easier to just say "3.9" :)

Thanks to Ammar for the patch!
msg366657 - (view) Author: Big Stone (Big Stone) Date: 2020-04-17 14:51
You may also consider having it on Mac Python-3.8 and not on Windows Python-3.8 is a total abnormality. For example, in the context of a Classroom.
History
Date User Action Args
2022-04-11 14:59:29adminsetgithub: 84451
2020-04-17 14:51:47Big Stonesetmessages: + msg366657
2020-04-15 21:55:12zach.waresetstatus: open -> closed
resolution: fixed
messages: + msg366562

stage: patch review -> resolved
2020-04-15 21:19:30zach.waresetmessages: + msg366559
2020-04-14 23:25:49ammar2setkeywords: + patch
nosy: + ammar2

pull_requests: + pull_request18878
stage: test needed -> patch review
2020-04-13 09:48:03SilentGhostsetversions: + Python 3.9
nosy: + paul.moore, tim.golden, zach.ware, steve.dower

components: + Extension Modules, Windows
type: behavior
stage: test needed
2020-04-13 09:38:37Big Stonesettitle: activate json1 extension in sqlite -> activate (or include) json1 extension in sqlite
2020-04-13 09:38:23Big Stonesettitle: activation json1 extension in sqlite -> activate json1 extension in sqlite
2020-04-13 09:37:52Big Stonecreate