Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 35 additions & 42 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,30 @@ about it.

## [Unreleased]

## [0.3.0] - 2026-09-11

Two kinds of change here, and the difference matters when you upgrade.

**Calls that used to return now raise.** These are breaking, and each replaces
silent data loss with an error naming the term and a format that can carry it:

- `Dataset` and `ConjunctiveGraph` arguments raise `TypeError` at both entry
points, instead of one arbitrary graph being serialized as if it were the
whole input.
- `nt` and `nquads` raise `ValueError` for a graph holding a term N-Triples
cannot write, instead of returning text no parser will read.
- `xml` raises `ValueError` for a character XML 1.0 cannot represent, and
degraded JSON-LD raises for a generalized term the interoperable subset
cannot express.
- `deterministic_json` raises `ValueError` for two dict keys that encode to the
same JSON name.
- Output that fails its own round-trip check raises rather than being returned.

If your input is standard RDF and your keys are strings, none of these fire.

**Output bytes change** on the paths below. Each is a one-time diff: regenerate
the affected artifact, commit it once, and subsequent runs are stable again.

### Changed

- **Turtle-family output declares a generated prefix only where the serializer
Expand All @@ -27,7 +51,6 @@ about it.
position, bind it — `well_known_prefix_map()` supplies the standard names.
RDF/XML, JSON-LD, N-Triples and N-Quads output is byte-identical, as is
Turtle whose namespaces are all bound.

- `wl_blank_node_labels` and `wl_relabel_quads` now reject embedded
`pyoxigraph.Triple` terms with `ValueError`. They operate on supported
top-level quad terms only; direction-tagged literals remain supported.
Expand All @@ -41,47 +64,6 @@ about it.
- Degraded JSON-LD rejects a relative subject or object identifier exactly
matching `@[A-Za-z]+`. JSON-LD reserves these strings, so returning them in an `@id`
value can change or discard a graph term.

### Fixed

- **Valid IRIs that have no prefixed name are serialized instead of refused.**
A subject, object or datatype IRI whose namespace split is not itself a valid
IRI — `<http://a.example/%25>` splits into `http://a.example/%` plus `25` —
made `deterministic_turtle` raise, because the declaration it produced could
not be read back. Such IRIs are now written in full. A *predicate* in that
shape is still refused: the namespace there is the RDFLib serializer's own
choice, and `canonicalize_rdf_graph`, which writes predicates in full,
serializes those graphs.
- **Multiline Turtle literals preserve a terminal quote after any backslash
run.** The emitted long-string spelling keeps the literal's exact lexical
text and remains parseable for Turtle-family output.

## [0.3.0] - 2026-09-10

Two kinds of change here, and the difference matters when you upgrade.

**Calls that used to return now raise.** These are breaking, and each replaces
silent data loss with an error naming the term and a format that can carry it:

- `Dataset` and `ConjunctiveGraph` arguments raise `TypeError` at both entry
points, instead of one arbitrary graph being serialized as if it were the
whole input.
- `nt` and `nquads` raise `ValueError` for a graph holding a term N-Triples
cannot write, instead of returning text no parser will read.
- `xml` raises `ValueError` for a character XML 1.0 cannot represent, and
degraded JSON-LD raises for a generalized term the interoperable subset
cannot express.
- `deterministic_json` raises `ValueError` for two dict keys that encode to the
same JSON name.
- Output that fails its own round-trip check raises rather than being returned.

If your input is standard RDF and your keys are strings, none of these fire.

**Output bytes change** on the paths below. Each is a one-time diff: regenerate
the affected artifact, commit it once, and subsequent runs are stable again.

### Changed

- **Typed literals in `deterministic_turtle` keep their exact lexical form.**
An `xsd:integer` is now written `"42"^^xsd:integer` rather than `42`, and
likewise for booleans and other typed values. Turtle's numeric short form
Expand Down Expand Up @@ -192,6 +174,17 @@ the affected artifact, commit it once, and subsequent runs are stable again.

### Fixed

- **Valid IRIs that have no prefixed name are serialized instead of refused.**
A subject, object or datatype IRI whose namespace split is not itself a valid
IRI — `<http://a.example/%25>` splits into `http://a.example/%` plus `25` —
made `deterministic_turtle` raise, because the declaration it produced could
not be read back. Such IRIs are now written in full. A *predicate* in that
shape is still refused: the namespace there is the RDFLib serializer's own
choice, and `canonicalize_rdf_graph`, which writes predicates in full,
serializes those graphs.
- **Multiline Turtle literals preserve a terminal quote after any backslash
run.** The emitted long-string spelling keeps the literal's exact lexical
text and remains parseable for Turtle-family output.
- **A graph whose `base` contains a fragment no longer serializes to something
rdflib reads back differently.** `canonicalize_rdf_graph` relativized
`http://ex.org/d#a` to `<#a>` under base `http://ex.org/d#`, which is correct
Expand Down
Loading