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: Enable rtree support in SQLite
Type: enhancement Stage: resolved
Components: Build, Library (Lib), Windows Versions: Python 3.10
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: berker.peksag, erlendaasland, ghaering, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords: patch

Created on 2021-03-09 00:24 by steve.dower, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 24797 merged erlendaasland, 2021-03-09 10:30
Messages (11)
msg388320 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-03-09 00:24
I heard [1] that rtree support would be very useful in SQLite. We should see whether enabling it is safe/easy/cheap and then do it.

1: https://twitter.com/Jamieallencook/status/1368221499794976775?s=20
msg388329 - (view) Author: Erlend E. Aasland (erlendaasland) * (Python triager) Date: 2021-03-09 05:14
Unless I’m mistaken, that’s enabled simply by compiling with SQLITE_ENABLE_RTREE defined.
msg388330 - (view) Author: Erlend E. Aasland (erlendaasland) * (Python triager) Date: 2021-03-09 05:16
I can put up a PR for it. I don’t see any reason not to enable it.
msg388340 - (view) Author: Erlend E. Aasland (erlendaasland) * (Python triager) Date: 2021-03-09 10:07
Actually, the macOS build already builds with R*Tree support enabled, but it is missing from PCbuild/sqlite3.vcxproj. I'm not very familiar with the Windows build; does compile options set in setup.py propagate to the Windows build, or do we need to set it both places?
msg388341 - (view) Author: Erlend E. Aasland (erlendaasland) * (Python triager) Date: 2021-03-09 10:17
> does compile options set in setup.py propagate to the Windows build, or do we need to set it both places?

Seems like it doesn't; correct me if I'm wrong. PR coming up.
msg388343 - (view) Author: Erlend E. Aasland (erlendaasland) * (Python triager) Date: 2021-03-09 10:29
We should also consider adding support for R*Tree query callbacks using sqlite3_rtree_query_callback() for SQLite >= 3.8.5, and sqlite3_rtree_geometry_callback() for older versions.
msg388348 - (view) Author: Erlend E. Aasland (erlendaasland) * (Python triager) Date: 2021-03-09 10:46
> does compile options set in setup.py propagate to the Windows build, or do we need to set it both places?

Er, forget it. setup.py is of course only used to build the sqlite3 module, not sqlite3.
msg388383 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-03-09 20:59
New changeset 31818e98d3b845d815e9caf2a3d330341bdc1b33 by Erlend Egeberg Aasland in branch 'master':
bpo-43440 : Enable SQLite R*Tree support for windows builds (GH-24797)
https://github.com/python/cpython/commit/31818e98d3b845d815e9caf2a3d330341bdc1b33
msg388384 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-03-09 21:01
Perfect, thanks!

Callbacks are a bigger ask, but I don't have any fundamental opposition to them. Probably worth opening a new issue, as it'll affect all platforms (I assume).

And yeah, the setup.py in the CPython repo doesn't impact any of the Windows build at all. It needs to go into PCbuild somewhere as well.
msg388385 - (view) Author: Erlend E. Aasland (erlendaasland) * (Python triager) Date: 2021-03-09 21:08
Anytime :)

I'll create an issue for rtree callbacks.
msg388392 - (view) Author: Erlend E. Aasland (erlendaasland) * (Python triager) Date: 2021-03-09 21:56
I've opened bpo-43454 for R*Tree callbacks.
History
Date User Action Args
2022-04-11 14:59:42adminsetgithub: 87606
2021-03-09 21:56:46erlendaaslandsetmessages: + msg388392
2021-03-09 21:08:46erlendaaslandsetmessages: + msg388385
2021-03-09 21:01:17steve.dowersetstatus: open -> closed
resolution: fixed
messages: + msg388384

stage: patch review -> resolved
2021-03-09 20:59:50steve.dowersetmessages: + msg388383
2021-03-09 10:46:13erlendaaslandsetmessages: + msg388348
2021-03-09 10:30:05erlendaaslandsetkeywords: + patch
stage: patch review
pull_requests: + pull_request23565
2021-03-09 10:29:33erlendaaslandsetmessages: + msg388343
2021-03-09 10:17:22erlendaaslandsetmessages: + msg388341
2021-03-09 10:07:02erlendaaslandsetmessages: + msg388340
2021-03-09 05:16:12erlendaaslandsetmessages: + msg388330
2021-03-09 05:14:29erlendaaslandsetmessages: + msg388329
2021-03-09 03:07:30zach.waresetnosy: + berker.peksag, erlendaasland
2021-03-09 00:24:17steve.dowersetnosy: + ghaering
2021-03-09 00:24:08steve.dowercreate