Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: change the prefix for https://schema.org/ back to schema #2312

Merged
merged 1 commit into from
Mar 25, 2023

Conversation

aucampia
Copy link
Member

Summary of changes

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.

Checklist

  • Checked that there aren't other open pull requests for
    the same change.
  • Added tests for any changes that have a runtime impact.
  • Checked that all tests and type checking passes.
  • Considered granting push permissions to the PR branch,
    so maintainers can fix minor issues and keep your PR up to date.

@aucampia aucampia requested a review from a team March 25, 2023 11:08
@aucampia aucampia added review wanted This indicates that the PR is ready for review ready to merge The PR will be merged soon if no further feedback is provided. labels Mar 25, 2023
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`.
@aucampia aucampia force-pushed the iwana-20230325T1152-sdo_schema branch from 641ad7c to a65bfeb Compare March 25, 2023 11:10
@aucampia aucampia marked this pull request as ready for review March 25, 2023 11:11
@coveralls
Copy link

Coverage Status

Coverage: 90.792%. Remained the same when pulling a65bfeb on aucampia:iwana-20230325T1152-sdo_schema into 832e693 on RDFLib:main.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@aucampia aucampia merged commit 3faa01b into RDFLib:main Mar 25, 2023
@aucampia aucampia deleted the iwana-20230325T1152-sdo_schema branch April 9, 2023 15:04
@tobiasschweizer
Copy link

tobiasschweizer commented Apr 19, 2023

I really liked that you changed the default prefix back to sdo (no TLS) previous to RDFlib 6.3.2 ;-)

Is there an easy way to override the default? I got this hint once but never tried it (lazy me).

Background: We are still using (edited) http://schema.org (no TLS) in our SHACL shapes and Ontospy to document them. everything is fine in the RDF sense but schema1 simply looks odd in the docs.

@aucampia
Copy link
Member Author

I really liked that you changed the default prefix back to sdo (no TLS) previous to RDFlib 6.3.2 ;-)

Is there an easy way to override the default? I got this hint once but never tried it (lazy me).

Background: We are still using (edited) http://schema.org (no TLS) in our SHACL shapes and Ontospy to document them. everything is fine in the RDF sense but schema1 simply looks odd in the docs.

If you create a graph with Graph(bind_namespaces='none') then it won't bind schema, but it also won't bind many other things. There is also bind_namespaces='core'.

You can see more details here - the bind_namespaces from Graph(...) is passed to this class.

@tobiasschweizer
Copy link

@aucampia Great, thanks for the clarification!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge The PR will be merged soon if no further feedback is provided. review wanted This indicates that the PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants