diff options
author | Iwan Aucamp <aucampia@gmail.com> | 2023-03-25 18:46:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-25 18:46:05 +0100 |
commit | 3faa01bf169166afa68be8084f16b537d850a070 (patch) | |
tree | 660c4c71d3d9aebe837cbce5c92390f280c9fe71 | |
parent | 47e6c37f9a0a1930447f120902ff276aa7fe48e8 (diff) | |
download | rdflib-3faa01bf169166afa68be8084f16b537d850a070.tar.gz |
fix: change the prefix for `https://schema.org/` back to `schema` (#2312)
The default prefix for `https://schema.org/` registered with
`rdflib.namespace.NamespaceManager` was inadvertently changed to `sdo` in 6.2.0,
this however constitutes a breaking change, as code that was using the `schema`
prefix would no longer have the same behaviour. This change changes the prefix
back to `schema`.
-rw-r--r-- | rdflib/namespace/__init__.py | 6 | ||||
-rw-r--r-- | test/test_namespace/test_namespacemanager.py (renamed from test/test_namespacemanager.py) | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/rdflib/namespace/__init__.py b/rdflib/namespace/__init__.py index a68526e1..fb6d845b 100644 --- a/rdflib/namespace/__init__.py +++ b/rdflib/namespace/__init__.py @@ -364,8 +364,8 @@ class NamespaceManager(object): * rdflib: * binds all the namespaces shipped with RDFLib as DefinedNamespace instances * all the core namespaces and all the following: brick, csvw, dc, dcat - * dcmitype, dcterms, dcam, doap, foaf, geo, odrl, org, prof, prov, qb, sdo - * sh, skos, sosa, ssn, time, vann, void, wgs + * dcmitype, dcterms, dcam, doap, foaf, geo, odrl, org, prof, prov, qb, schema + * sh, skos, sosa, ssn, time, vann, void * see the NAMESPACE_PREFIXES_RDFLIB object for the up-to-date list * none: * binds no namespaces to prefixes @@ -906,7 +906,7 @@ _NAMESPACE_PREFIXES_RDFLIB = { "prof": PROF, "prov": PROV, "qb": QB, - "sdo": SDO, + "schema": SDO, "sh": SH, "skos": SKOS, "sosa": SOSA, diff --git a/test/test_namespacemanager.py b/test/test_namespace/test_namespacemanager.py index d688834e..d79f0419 100644 --- a/test/test_namespacemanager.py +++ b/test/test_namespace/test_namespacemanager.py @@ -17,8 +17,8 @@ if TYPE_CHECKING: sys.path.append(str(Path(__file__).parent.parent.absolute())) -from rdflib import Graph -from rdflib.namespace import ( +from rdflib import Graph # noqa: E402 +from rdflib.namespace import ( # noqa: E402 _NAMESPACE_PREFIXES_CORE, _NAMESPACE_PREFIXES_RDFLIB, OWL, @@ -196,7 +196,7 @@ def test_nman_bind_namespaces( "qb": "http://purl.org/linked-data/cube#", "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "rdfs": "http://www.w3.org/2000/01/rdf-schema#", - "sdo": "https://schema.org/", + "schema": "https://schema.org/", "sh": "http://www.w3.org/ns/shacl#", "skos": "http://www.w3.org/2004/02/skos/core#", "sosa": "http://www.w3.org/ns/sosa/", |