diff options
| author | David Robillard <d@drobilla.net> | 2026-02-07 20:13:55 -0500 |
|---|---|---|
| committer | David Robillard <d@drobilla.net> | 2026-02-07 20:41:31 -0500 |
| commit | 2c130d6343ffccd14ff7d6fc96ca05ce16b92cd4 (patch) | |
| tree | 309d403d6268ada5ec11670ef3ba30518f5eff89 /lv2specgen/lv2specgen.py | |
| parent | aa3e3e1ca5d5524094fde4a45b4f72c6f023689a (diff) | |
| download | lv2-2c130d6343ffccd14ff7d6fc96ca05ce16b92cd4.tar.xz | |
lv2specgen: Avoid deprecation warnings with rdflib >= 7.5
Diffstat (limited to 'lv2specgen/lv2specgen.py')
| -rwxr-xr-x | lv2specgen/lv2specgen.py | 8 |
1 files changed, 7 insertions, 1 deletions
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( |