From 57bb42886b57a37f1ba93a4d1b52651d978d049c Mon Sep 17 00:00:00 2001 From: Iwan Aucamp Date: Sun, 26 Mar 2023 12:53:29 +0200 Subject: fix: restore the 6.1.1 default bound namespaces (#2313) The namespaces bound by default by `rdflib.graph.Graph` and `rdflib.namespace.NamespaceManager` was reduced in version 6.2.0 of RDFLib, however, this also would cause code that worked with 6.1.1 to break, so this constituted a breaking change. This change restores the previous behaviour, binding the same namespaces as was bound in 6.1.1. To bind a reduced set of namespaces, the `bind_namespaces` parameter of `rdflib.graph.Graph` or `rdflib.namespace.NamespaceManager` can be used. - Closes . --- test/test_serializers/test_xmlwriter_qname.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/test_serializers/test_xmlwriter_qname.py') diff --git a/test/test_serializers/test_xmlwriter_qname.py b/test/test_serializers/test_xmlwriter_qname.py index 662d3f59..13ee84a0 100644 --- a/test/test_serializers/test_xmlwriter_qname.py +++ b/test/test_serializers/test_xmlwriter_qname.py @@ -10,7 +10,7 @@ TRIXNS = rdflib.Namespace("http://www.w3.org/2004/03/trix/trix-1/") def test_xmlwriter_namespaces(): - g = rdflib.Graph() + g = rdflib.Graph(bind_namespaces="core") with tempfile.TemporaryFile() as fp: xmlwr = XMLWriter(fp, g.namespace_manager, extra_ns={"": TRIXNS, "ex": EXNS}) @@ -32,7 +32,7 @@ def test_xmlwriter_namespaces(): def test_xmlwriter_decl(): - g = rdflib.Graph() + g = rdflib.Graph(bind_namespaces="core") with tempfile.TemporaryFile() as fp: xmlwr = XMLWriter(fp, g.namespace_manager, decl=0, extra_ns={"": TRIXNS}) -- cgit v1.2.1