Skip to content

Commit 9eeb9bf

Browse files
committed
v0.40.0 release bump
1 parent 68a76a3 commit 9eeb9bf

7 files changed

Lines changed: 1310 additions & 559 deletions

File tree

CHANGELOG.md

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,43 @@ and this project adheres to [Python PEP 440 Versioning](https://www.python.org/d
66

77
## [Unreleased]
88

9+
## [0.40.0] - 2026-07-08
10+
11+
### Added
12+
- Compatibility with Oxigraph stores.
13+
- PySHACL can now validate a graph that is loaded into a PyOxigraph `pyoxigraph.Store` instance.
14+
- New `DataGraph` graph abstraction layer that wraps RDFLib `Graph`/`Dataset` and, when installed, `pyoxigraph.Store`.
15+
- Validation and SHACL Rules expansion can use an Oxigraph-backed data graph for faster SPARQL execution.
16+
- Install with the new optional extra: `pip install pyshacl[oxigraph]`.
17+
- Pass a `pyoxigraph.Store` directly to `validate()` or `shacl_rules()`.
18+
- SHACL Functions and SHACL-JS Functions now register and execute on both RDFLib and Oxigraph SPARQL engines.
19+
- SPARQL constraints can invoke SHACL Functions as SPARQL extension functions when using an Oxigraph-backed data graph.
20+
- Python 3.13 support in the test matrix.
21+
- `pyduktape2` dependency is now version-split for Python 3.13+.
22+
23+
### Changed
24+
- Dropped `rdflib.ConjunctiveGraph` support throughout the codebase. **Breaking**
25+
- ConjunctiveGraph has been deprecatd in RDFLib for a long time, it will be gone in RDFLib 8. Removing it now from PySHACL to prevent compatibility issues later.
26+
- Multigraph inputs must be an `rdflib.Dataset`; bare `rdflib.Graph` remain supported for single-graph use.
27+
- Adapted to RDFLib 7.3+ API changes: `default_context` has been replaced with `default_graph`, and `contexts()` replaced with `graphs()`.
28+
- Resolves #316
29+
- Thanks @torsknod2
30+
- Updated minimum dependency versions:
31+
- `rdflib[html]>=7.3.0,<8.0`
32+
- `owlrl>=7.6.1,<8`
33+
- `validate_each()` now returns a dict keyed by input index (`int`) instead of by source identifier.
34+
- Internal validation and rules expansion now operate on the `DataGraph` wrapper rather than raw RDFLib graph objects.
35+
- SPARQL prefix resolution for shapes graphs stored in a `Dataset` now reads `sh:declare` blocks from the default graph.
36+
- DASH conformance checking now enumerates named graphs with `Dataset.graphs()` instead of the deprecated `contexts()` API.
37+
38+
### Fixed
39+
- OWL `owl:imports` over HTTP no longer leaves closed `HTTPResponse` objects that trigger finalizer errors during garbage collection.
40+
- Fixes #319
41+
- Thanks @gaoflow
42+
43+
### Removed
44+
- Support for `rdflib.ConjunctiveGraph` as a data graph, shapes graph, or ontology graph input type. **Breaking**
45+
946
## [0.31.0] - 2026-01-16
1047

1148
### Added
@@ -1250,8 +1287,9 @@ just leaves the files open. Now it is up to the command-line client to close the
12501287

12511288
- Initial version, limited functionality
12521289

1253-
[Unreleased]: https://github.com/RDFLib/pySHACL/compare/v0.31.0...HEAD
1254-
[0.31.0]: https://github.com/RDFLib/pySHACL/compare/v0.31.1...v0.31.0
1290+
[Unreleased]: https://github.com/RDFLib/pySHACL/compare/v0.40.0...HEAD
1291+
[0.40.0]: https://github.com/RDFLib/pySHACL/compare/v0.31.0...v0.40.0
1292+
[0.31.0]: https://github.com/RDFLib/pySHACL/compare/v0.30.1...v0.31.0
12551293
[0.30.1]: https://github.com/RDFLib/pySHACL/compare/v0.30.0...v0.30.1
12561294
[0.30.0]: https://github.com/RDFLib/pySHACL/compare/v0.29.1...v0.30.0
12571295
[0.29.1]: https://github.com/RDFLib/pySHACL/compare/v0.29.0...v0.29.1

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ authors:
88
given-names: "Nicholas"
99
orcid: "http://orcid.org/0000-0002-8742-7730"
1010
title: "pySHACL"
11-
version: 0.31.0
11+
version: 0.40.0
1212
doi: 10.5281/zenodo.4750840
1313
license: Apache-2.0
14-
date-released: 2025-03-15
14+
date-released: 2026-07-08
1515
url: "https://github.com/RDFLib/pySHACL"

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM docker.io/library/python:3.11-alpine
22
LABEL org.opencontainers.image.base.name="docker.io/library/python:3.11-alpine"
33
LABEL org.opencontainers.image.base.digest="sha256:d5e2fc72296647869f5eeb09e7741088a1841195059de842b05b94cb9d3771bb"
44
LABEL org.opencontainers.image.source="https://github.com/RDFLib/pySHACL"
5-
LABEL org.opencontainers.image.version="0.31.0"
5+
LABEL org.opencontainers.image.version="0.40.0"
66
LABEL maintainer="ashleysommer@gmail.com"
77
RUN apk add --no-cache --update tini-static cython
88
RUN apk add --no-cache --update --virtual build-dependencies build-base libffi-dev python3-dev py3-cffi

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ To exit the virtual enviornment:
3737
$ deactivate
3838
```
3939

40+
### Optional: Oxigraph backend
41+
To enable Oxigraph compatibility, install the optional `oxigraph` extra:
42+
```bash
43+
$ pip3 install pyshacl[oxigraph]
44+
```
45+
46+
This installs `pyoxigraph`, which lets pySHACL run validation and SHACL Rules
47+
against an Oxigraph store backend.
48+
4049
## Command Line Use
4150
For command line use:
4251
_(these example commandline instructions are for a Linux/Unix based OS)_
@@ -168,6 +177,26 @@ r = validate(data_graph,
168177
conforms, results_graph, results_text = r
169178
```
170179
180+
To validate using an Oxigraph-backed data graph:
181+
182+
```python
183+
from pyoxigraph import RdfFormat, Store
184+
from pyshacl import validate
185+
186+
data_store = Store()
187+
with open("some-data.ttl", "rb") as f:
188+
data_store.bulk_load(f.read(), format=RdfFormat.TURTLE)
189+
190+
conforms, results_graph, results_text = validate(
191+
data_store,
192+
shacl_graph="some-shacl.ttl",
193+
ont_graph="some-ontology.ttl",
194+
advanced=True,
195+
)
196+
```
197+
198+
The same Oxigraph store input is also supported by `shacl_rules(...)`.
199+
171200
To validate multiple data graphs in combine mode (default):
172201
```python
173202
from pyshacl import validate

0 commit comments

Comments
 (0)