Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable rtree support in SQLite #87606

Closed
zooba opened this issue Mar 9, 2021 · 11 comments
Closed

Enable rtree support in SQLite #87606

zooba opened this issue Mar 9, 2021 · 11 comments
Labels
3.10 only security fixes build The build process and cross-build OS-windows stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@zooba
Copy link
Member

zooba commented Mar 9, 2021

BPO 43440
Nosy @pfmoore, @tjguk, @berkerpeksag, @zware, @zooba, @erlend-aasland
PRs
  • bpo-43440 : Enable SQLite R*Tree support for windows builds #24797
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2021-03-09.21:01:17.589>
    created_at = <Date 2021-03-09.00:24:08.861>
    labels = ['3.10', 'type-feature', 'library', 'OS-windows', 'build']
    title = 'Enable rtree support in SQLite'
    updated_at = <Date 2021-03-09.21:56:46.087>
    user = 'https://github.com/zooba'

    bugs.python.org fields:

    activity = <Date 2021-03-09.21:56:46.087>
    actor = 'erlendaasland'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-03-09.21:01:17.589>
    closer = 'steve.dower'
    components = ['Build', 'Library (Lib)', 'Windows']
    creation = <Date 2021-03-09.00:24:08.861>
    creator = 'steve.dower'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 43440
    keywords = ['patch']
    message_count = 11.0
    messages = ['388320', '388329', '388330', '388340', '388341', '388343', '388348', '388383', '388384', '388385', '388392']
    nosy_count = 7.0
    nosy_names = ['paul.moore', 'ghaering', 'tim.golden', 'berker.peksag', 'zach.ware', 'steve.dower', 'erlendaasland']
    pr_nums = ['24797']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue43440'
    versions = ['Python 3.10']

    @zooba
    Copy link
    Member Author

    zooba commented Mar 9, 2021

    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

    @zooba zooba added 3.10 only security fixes build The build process and cross-build stdlib Python modules in the Lib dir OS-windows type-feature A feature request or enhancement labels Mar 9, 2021
    @erlend-aasland
    Copy link
    Contributor

    Unless I’m mistaken, that’s enabled simply by compiling with SQLITE_ENABLE_RTREE defined.

    @erlend-aasland
    Copy link
    Contributor

    I can put up a PR for it. I don’t see any reason not to enable it.

    @erlend-aasland
    Copy link
    Contributor

    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?

    @erlend-aasland
    Copy link
    Contributor

    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.

    @erlend-aasland
    Copy link
    Contributor

    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.

    @erlend-aasland
    Copy link
    Contributor

    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.

    @zooba
    Copy link
    Member Author

    zooba commented Mar 9, 2021

    New changeset 31818e9 by Erlend Egeberg Aasland in branch 'master':
    bpo-43440 : Enable SQLite R*Tree support for windows builds (GH-24797)
    31818e9

    @zooba
    Copy link
    Member Author

    zooba commented Mar 9, 2021

    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.

    @zooba zooba closed this as completed Mar 9, 2021
    @erlend-aasland
    Copy link
    Contributor

    Anytime :)

    I'll create an issue for rtree callbacks.

    @erlend-aasland
    Copy link
    Contributor

    I've opened bpo-43454 for R*Tree callbacks.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.10 only security fixes build The build process and cross-build OS-windows stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants