Skip to content

RDFlib 6.3.2

Compare
Choose a tag to compare
@aucampia aucampia released this 26 Mar 11:51
· 280 commits to main since this release
0593c75

2023-03-26 RELEASE 6.3.2

This is a patch release that fixes some bugs, including regressions introduced in release 6.2.0 and 6.3.0.

fix: ROUND, ENCODE_FOR_URI and SECONDS SPARQL functions (#2314)

Commit af17916, closes #2314.

ROUND was not correctly rounding negative numbers towards positive infinity,
ENCODE_FOR_URI incorrectly treated / as safe, and SECONDS did not include
fractional seconds.

This change corrects these issues.

fix: add __hash__ and __eq__ back to rdflib.paths.Path (#2292)

Commit fe1a8f8, closes #2292.

These methods were removed when @total_ordering was added, but
@total_ordering does not add them, so removing them essentially
removes functionality.

This change adds the methods back and adds tests to ensure they work
correctly.

All path related tests are also moved into one file.

fix: Add to_dict method to the JSON-LD Context class. (#2310)

Commit d7883eb, closes #2310.

Context.to_dict is used in JSON-LD serialization, but it was not implemented.
This change adds the method.

fix: add the wgs namespace binding back (#2294)

Commit adf8eb2, closes #2294.

#1686 inadvertently removed the wgs prefix.
This change adds it back.

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

Commit 3faa01b, closes #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.

fix: include docs and examples in the sdist tarball (#2289)

Commit 394fb50, closes #2289.

The sdists generated by setuptools included the docs and examples
directories, and they are needed for building docs and running tests using the
sdist.

This change includes these directories in the sdist tarball.

A test:sdist task is also added to Taskfile.yml which uses the sdists to run
pytest and build docs.

fix: IRI to URI conversion (#2304)

Commit dfa4054, closes #2304.

The URI to IRI conversion was percentage-quoting characters that should not have
been quoted, like equals in the query string. It was also not quoting things
that should have been quoted, like the username and password components of a
URI.

This change improves the conversion by only quoting characters that are not
allowed in specific parts of the URI and quoting previously unquoted components.
The safe characters for each segment are taken from
RFC3986.

The new behavior is heavily inspired by

werkzeug.urls.iri_to_uri
though there are some differences.

fix: JSON-LD context construction from a dict (#2306)

Commit 832e693, closes #2306.

A variable was only being initialized for string-valued inputs, but if a dict
input was passed the variable would still be accessed, resulting in a
UnboundLocalError.

This change initializes the variable always, instead of only when string-valued
input is used to construct a JSON-LD context.

fix: reference to global inside get_target_namespace_elements (#2311)

Commit 4da67f9, closes #2311.

get_target_namespace_elements references the args global, which is not
defined if the function is called from outside the module. This commit fixes
that instead referencing the argument passed to the function.

fix: restore the 6.1.1 default bound namespaces (#2313)

Commit 57bb428, closes #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.

test: add webtest marker to tests that use the internet (#2295)

Commit cfe6e37, closes #2295.

This is being done so that it is easier for downstream packagers to run the test
suite without requiring internet access.

To run only tests that does not use the internet, run pytest -m "not webtest".

The validation workflow validates that test run without internet access by
running the tests inside firejail --net=none.

chore: Update CONTRIBUTORS from commit history (#2305)

Commit 1ab4fc0, closes #2305.

This ensures contributors are credited. Also added .mailmap to fix early misattributed contributions.

docs: fix typo in NamespaceManager documentation (#2291)

Commit 7a05c15, closes #2291.

Changed cdterms to dcterms, see #2196 for more info.