[issue43454] [sqlite3] Add support for R*Tree callbacks

2021-03-24 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Attached is a patch that auto-detects R*Tree support. Tested on macOS only, but I'd guess it should work fine on any OS. -- Added file: https://bugs.python.org/file49914/patch.diff ___ Python tracker

[issue43454] [sqlite3] Add support for R*Tree callbacks

2021-03-11 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Unfortunately, there's no way to detect R*Tree support in sqlite3.h. We could run a script that dumps the compile options, and generate a config.h file from that: $ for L in $(sqlite3 ":memory:" "pragma compile_options"); do echo #define SQLITE_$L

[issue43454] [sqlite3] Add support for R*Tree callbacks

2021-03-10 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Test run output (see attached test file): $ ./python.exe test_rtree.py ARGS: ((-80.77490234375, -80.77469635009766, 35.377593994140625, 35.377803802490234), (45.3, 22.9, 5.0)) KWARGS: {'num_queued': [0, 1], 'context': None, 'level': 0, 'max_level':

[issue43454] [sqlite3] Add support for R*Tree callbacks

2021-03-10 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: FYI, PoC patch attached. Lacks tests and some #ifdefs. Let me know if I should create a PR out of it. -- keywords: +patch Added file: https://bugs.python.org/file49866/patch.diff ___ Python tracker

[issue43454] [sqlite3] Add support for R*Tree callbacks

2021-03-09 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : Ref. bpo-43440 Now that both Windows and macOS builds compile SQLite with R*Tree support, we should consider adding support for R*Tree callbacks. SQLite has two API's: - sqlite3_rtree_query_callback() for SQLite 3.8.5 and newer. -