Skip to content

Commit

Permalink
fix: change the prefix for https://schema.org/ back to schema`
Browse files Browse the repository at this point in the history
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 behavior. This change changes the prefix
back to `schema`.
  • Loading branch information
aucampia committed Mar 25, 2023
1 parent 832e693 commit 641ad7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions rdflib/namespace/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -906,7 +906,7 @@ def get_longest_namespace(trie: Dict[str, Any], value: str) -> Optional[str]:
"prof": PROF,
"prov": PROV,
"qb": QB,
"sdo": SDO,
"schema": SDO,
"sh": SH,
"skos": SKOS,
"sosa": SOSA,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
Expand Down

0 comments on commit 641ad7c

Please sign in to comment.