strawberry-graphql / strawberry-django

Strawberry GraphQL Django extension
MIT License
393 stars 115 forks source link

Documentation/Contributing doesn't mention the need for python to be configured to allow SQLite Extension loading #390

Closed thepapermen closed 8 months ago

thepapermen commented 9 months ago

Documentation/Contributing doesn't mention the need for python to be configured to allow SQLite Extension loading. All tests fail without it. So python should be built with --enable-loadable-sqlite-extensions which is not mentioned in the docs.

PYTHON_CONFIGURE_OPTS="--enable-loadable-sqlite-extensions" pyenv install 3.12.0

    def get_new_connection(self, conn_params):
        conn = super().get_new_connection(conn_params)
        # Enabling extension loading on the SQLite connection.
        try:
            conn.enable_load_extension(True)
        except AttributeError:
            raise ImproperlyConfigured(
>              "SpatiaLite requires SQLite to be configured to allow "
                "extension loading."

Upvote & Fund

Fund with Polar