Skip to content

Commit

Permalink
chore: prepare for release 6.3.2 (#2315)
Browse files Browse the repository at this point in the history
  • Loading branch information
aucampia committed Mar 26, 2023
1 parent af17916 commit 0593c75
Show file tree
Hide file tree
Showing 4 changed files with 182 additions and 4 deletions.
180 changes: 179 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,183 @@
# 2023-03-18 RELEASE 6.3.1
# 2023-03-26 RELEASE 6.3.2

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

Commit [af17916](https://github.com/RDFLib/rdflib/commit/af17916), closes [#2314](https://github.com/RDFLib/rdflib/issues/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.

- Closes <https://github.com/RDFLib/rdflib/issues/2151>.


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

Commit [fe1a8f8](https://github.com/RDFLib/rdflib/commit/fe1a8f8), closes [#2292](https://github.com/RDFLib/rdflib/issues/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.

- Closes <https://github.com/RDFLib/rdflib/issues/2281>.
- Closes <https://github.com/RDFLib/rdflib/issues/2242>.


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

Commit [d7883eb](https://github.com/RDFLib/rdflib/commit/d7883eb), closes [#2310](https://github.com/RDFLib/rdflib/issues/2310).


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

- Closes <https://github.com/RDFLib/rdflib/issues/2138>.


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

Commit [adf8eb2](https://github.com/RDFLib/rdflib/commit/adf8eb2), closes [#2294](https://github.com/RDFLib/rdflib/issues/2294).


<https://github.com/RDFLib/rdflib/pull/1686> inadvertently removed the `wgs` prefix.
This change adds it back.

- Closes <https://github.com/RDFLib/rdflib/issues/2196>.


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

Commit [3faa01b](https://github.com/RDFLib/rdflib/commit/3faa01b), closes [#2312](https://github.com/RDFLib/rdflib/issues/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](https://github.com/RDFLib/rdflib/commit/394fb50), closes [#2289](https://github.com/RDFLib/rdflib/issues/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](https://github.com/RDFLib/rdflib/commit/dfa4054), closes [#2304](https://github.com/RDFLib/rdflib/issues/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](https://datatracker.ietf.org/doc/html/rfc3986).

The new behavior is heavily inspired by

[`werkzeug.urls.iri_to_uri`](https://github.com/pallets/werkzeug/blob/92c6380248c7272ee668e1f8bbd80447027ccce2/src/werkzeug/urls.py#L926-L931)
though there are some differences.

- Closes <https://github.com/RDFLib/rdflib/issues/2120>.

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

Commit [832e693](https://github.com/RDFLib/rdflib/commit/832e693), closes [#2306](https://github.com/RDFLib/rdflib/issues/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.

- Closes <https://github.com/RDFLib/rdflib/issues/2303>.


## fix: reference to global inside `get_target_namespace_elements` (#2311)

Commit [4da67f9](https://github.com/RDFLib/rdflib/commit/4da67f9), closes [#2311](https://github.com/RDFLib/rdflib/issues/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.

- Closes <https://github.com/RDFLib/rdflib/issues/2072>.


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

Commit [57bb428](https://github.com/RDFLib/rdflib/commit/57bb428), closes [#2313](https://github.com/RDFLib/rdflib/issues/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>.


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

Commit [cfe6e37](https://github.com/RDFLib/rdflib/commit/cfe6e37), closes [#2295](https://github.com/RDFLib/rdflib/issues/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`.

- Closes <https://github.com/RDFLib/rdflib/issues/2293>.

## chore: Update CONTRIBUTORS from commit history (#2305)

Commit [1ab4fc0](https://github.com/RDFLib/rdflib/commit/1ab4fc0), closes [#2305](https://github.com/RDFLib/rdflib/issues/2305).


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

## docs: fix typo in NamespaceManager documentation (#2291)

Commit [7a05c15](https://github.com/RDFLib/rdflib/commit/7a05c15), closes [#2291](https://github.com/RDFLib/rdflib/issues/2291).


Changed `cdterms` to `dcterms`, see <https://github.com/RDFLib/rdflib/issues/2196> for more info.


# 2023-03-18 RELEASE 6.3.1

This is a patch release that includes a singular user facing fix, which is the
inclusion of the `test` directory in the `sdist` release artifact.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The stable release of RDFLib may be installed with Python's package management t
Alternatively manually download the package from the Python Package
Index (PyPI) at https://pypi.python.org/pypi/rdflib

The current version of RDFLib is 6.3.1, see the ``CHANGELOG.md`` file for what's new in this release.
The current version of RDFLib is 6.3.2, see the ``CHANGELOG.md`` file for what's new in this release.

### Installation of the current main branch (for developers)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "rdflib"
version = "6.4.0a0"
version = "6.3.2"
description = """RDFLib is a Python library for working with RDF, \
a simple yet powerful language for representing information."""
authors = ["Daniel 'eikeon' Krech <eikeon@eikeon.com>"]
Expand Down
2 changes: 1 addition & 1 deletion rdflib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
__docformat__ = "restructuredtext en"

__version__: str = _DISTRIBUTION_METADATA["Version"]
__date__ = "2023-03-18"
__date__ = "2023-03-26"

__all__ = [
"URIRef",
Expand Down

0 comments on commit 0593c75

Please sign in to comment.