aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2026-02-07 20:13:55 -0500
committerDavid Robillard <d@drobilla.net>2026-02-07 20:41:31 -0500
commit2c130d6343ffccd14ff7d6fc96ca05ce16b92cd4 (patch)
tree309d403d6268ada5ec11670ef3ba30518f5eff89
parentaa3e3e1ca5d5524094fde4a45b4f72c6f023689a (diff)
downloadlv2-2c130d6343ffccd14ff7d6fc96ca05ce16b92cd4.tar.xz
lv2specgen: Avoid deprecation warnings with rdflib >= 7.5
-rw-r--r--NEWS3
-rwxr-xr-xlv2specgen/lv2specgen.py8
2 files changed, 9 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 03db3ff..f2e71d0 100644
--- a/NEWS
+++ b/NEWS
@@ -9,10 +9,11 @@ lv2 (1.18.11) unstable; urgency=medium
* Override pkg-config dependency within meson
* Remove troublesome lv2_atom_assert_double_fits_in_64_bits
* eg-metro: Fix memory leak
+ * lv2specgen: Avoid deprecation warnings with rdflib >= 7.5
* lv2specgen: Fix offline XHTML validation and make it optional
* ui: Add types for Gtk4UI and Qt6UI
- -- David Robillard <d@drobilla.net> Sun, 08 Feb 2026 00:37:03 +0000
+ -- David Robillard <d@drobilla.net> Sun, 08 Feb 2026 01:13:31 +0000
lv2 (1.18.10) stable; urgency=medium
diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py
index 5cc5f0c..be6ef91 100755
--- a/lv2specgen/lv2specgen.py
+++ b/lv2specgen/lv2specgen.py
@@ -1188,7 +1188,13 @@ def specgen(
# Load code documentation link map from tags file
linkmap = load_tags(tags, docdir)
- m = rdflib.ConjunctiveGraph()
+ # Create a new empty dataset
+ rdflib_major = int(rdflib.__version__.split(".")[0])
+ rdflib_minor = int(rdflib.__version__.split(".")[1])
+ if rdflib_major > 7 or rdflib_major == 7 and rdflib_minor >= 5:
+ m = rdflib.Dataset()
+ else:
+ m = rdflib.ConjunctiveGraph()
# RDFLib adds its own prefixes, so kludge around "time" prefix conflict
m.namespace_manager.bind(