diff options
author | Iwan Aucamp <aucampia@gmail.com> | 2023-03-26 12:53:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-26 12:53:29 +0200 |
commit | 57bb42886b57a37f1ba93a4d1b52651d978d049c (patch) | |
tree | ac75957fa29dc49c39618b01fcc9dda29bcb4ea9 /test/test_serializers/test_xmlwriter_qname.py | |
parent | 4da67f9a17ffe8fa128afcdd2259e337bccafaa3 (diff) | |
download | rdflib-57bb42886b57a37f1ba93a4d1b52651d978d049c.tar.gz |
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 <https://github.com/RDFLib/rdflib/issues/2103>.
Diffstat (limited to 'test/test_serializers/test_xmlwriter_qname.py')
-rw-r--r-- | test/test_serializers/test_xmlwriter_qname.py | 4 |
1 files changed, 2 insertions, 2 deletions
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}) |