From 612662ff76365dc7a4baf16c3076986cf9ab15f1 Mon Sep 17 00:00:00 2001 From: Prakhar54-byte Date: Mon, 6 Jul 2026 02:03:52 +0530 Subject: [PATCH 1/2] fix(download): replace sparql.method attr with sparql.setMethod('POST') Using direct attribute assignment on SPARQLWrapper is silently ignored; the wrapper defaults to GET for all queries. Large SPARQL queries (e.g. those returned by collection endpoints) exceed GET URL-length limits and fail. The correct API is setMethod(). Also add setMethod() to the DummySPARQL test stub in conftest.py so the unit test suite does not break when the real API call is made. Closes # --- databusclient/api/download.py | 2 +- tests/conftest.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/databusclient/api/download.py b/databusclient/api/download.py index 312af450..b3d5eda0 100644 --- a/databusclient/api/download.py +++ b/databusclient/api/download.py @@ -590,7 +590,7 @@ def _query_sparql_endpoint(endpoint_url, query, databus_key=None) -> dict: Dictionary containing the query results. """ sparql = SPARQLWrapper(endpoint_url) - sparql.method = "POST" + sparql.setMethod("POST") sparql.setQuery(query) sparql.setReturnFormat(JSON) if databus_key is not None: diff --git a/tests/conftest.py b/tests/conftest.py index 5f4c0a2e..df626dcc 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -10,6 +10,9 @@ class DummySPARQL: def __init__(self, *args, **kwargs): pass + def setMethod(self, method): + self._method = method + def setQuery(self, q): self._q = q From a769251abf2443ae07f1d835765be22e83559d4d Mon Sep 17 00:00:00 2001 From: Integer-Ctrl Date: Mon, 23 Nov 2026 13:33:42 +0100 Subject: [PATCH 2/2] chore: bump version to 1.2.3 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 958b7b65..06f61f68 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "databusclient" -version = "1.2.2" +version = "1.2.3" description = "A simple client for submitting, downloading, and deleting data on the DBpedia Databus" authors = ["DBpedia Association"] license = "Apache-2.0 License"