From 2c130d6343ffccd14ff7d6fc96ca05ce16b92cd4 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 7 Feb 2026 20:13:55 -0500 Subject: lv2specgen: Avoid deprecation warnings with rdflib >= 7.5 --- NEWS | 3 ++- lv2specgen/lv2specgen.py | 8 +++++++- 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 Sun, 08 Feb 2026 00:37:03 +0000 + -- David Robillard 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( -- cgit v1.2.1