Skip to content

Releases: RDFLib/rdflib

2026-02-13 RELEASE 7.6.0

13 Feb 07:37
8b32146

Choose a tag to compare

This release introduces a new major feature: GraphDB integration via the Python GraphDB Client. Users can now manage GraphDB instances and perform administrative tasks directly from Python. As GraphDB also supports the RDF4J REST API, users may utilize the recently released RDF4J Client and Store with GraphDB instances. For more details, see the new RDFLib GraphDB documentation under the extras section of the RDFLib documentation.

This release also includes a number of fixes to Graph.cbd() and Turtle-related serializers. Thanks to @mgberg and @lisat-dstg, the affected code is now more standards-compliant.

At the request of users, the recently introduced CLI tool sq has been renamed to sparqlquery to avoid conflicts with existing well-known packages.

Other maintenance tasks include updating all CI actions to the latest versions and adding a compatibility layer for pyparsing v3 to remove deprecation warnings.

See the CHANGELOG.md for more details.

2025-11-28 RELEASE 7.5.0

28 Nov 06:13
689e8fd

Choose a tag to compare

This release introduces a new major feature to RDFLib: RDF4J Store integration and RDF4J Client. Users can use this to connect to RDF4J database servers through RDFLib's Graph and Dataset classes, as well as manage repositories and transactions using the RDF4J Client. A comprehensive user guide for the new RDF4J features is available under the extras section of the RDFLib documentation.

We've also added a new CLI tool, sq (the script is rdflib/tools/sparqlquery.py), for executing SPARQL queries against local files or remote SPARQL endpoints with custom serialization. This provides a convenient way to query RDF data straight from the command line.

Other enhancements include documentation improvements that fix crosslinking issues between modules, and new documentation content for RDFLib plugins, parsers, and serializers.

For RDFLib developers, this release introduces httpx as an optional dependency to support the new RDF4J functionality. The RDF4J test suite now also uses testcontainers on Linux environments running Python 3.9.2 or later.

See the CHANGELOG.md for more details.

2025-10-30 RELEASE 7.4.0

30 Oct 12:59
c2c94e5

Choose a tag to compare

This release addresses a couple of bugs and improves the testing matrix by adding python 3.12, 3.13 and 3.14 to the test matrix.

This is also the first RDFLib release to use MkDocs for documentation.

See the CHANGELOG.md for more details.

Full Changelog: 7.3.0...7.4.0

2025-10-24 RELEASE 7.3.0

24 Oct 07:20
3b67ea7

Choose a tag to compare

This release delivers several important fixes and enhancements to RDFLib’s Dataset implementation, resolving long-standing issues and improving consistency across serialization and SPARQL operations. It also introduces new deprecation notices for certain Dataset methods and attributes, which will be removed in the next major release. In addition, this version includes a range of improvements to SPARQL result parsing, typing, and literal handling.

Features

  • Added Dataset.__iadd__ support
  • Dataset's default serialize format is now trig
  • Datasets can now add graphs backed by different stores

Fixes and Improvements

  • Fixed an issue where the RecursiveSerializer would output undeclared prefixes for predicates that contained the base as a substring
  • Prevented prefix generation for predicates corresponding to the base namespace
  • SPARQL Update now correctly inserts into the default graph
  • Dataset.parse now returns Self
  • N-Quads serialization no longer includes the RDFLib internal default graph identifier
  • Static type checkers can now infer the type of Term.__new__
  • Removed automatic date conversion for gYear and gYearMonth literals
  • Optional clauses in SPARQL queries can now bind variables
  • Fixed reevaluation logic in SPARQL Update between update loops

Maintenance

  • Added deprecation notices to certain Dataset methods and attributes
    • Use Dataset.graphs instead of Dataset.contexts method
    • Use Dataset.default_graph instead of Dataset.default_context
    • Deprecate Dataset.identifier entirely.
  • Updated type hints for Graph.open() with SPARQLUpdateStore configuration
  • SPARQL Result Parsing Improvements
    • Simplified and modernized the SPARQL result parsing system:
    • These changes maintain backward compatibility while making the SPARQL API more flexible and extensible.

See the CHANGELOG.md for more details.

Full Changelog: 7.2.1...7.3.0

2025-09-19 RELEASE 7.2.1

19 Sep 02:39
856c1af

Choose a tag to compare

New features:

  • Canonicalization is now optional in the longturtle serializer. When serializing with the longturtle format, set canon=True to enable canonicalization.
  • General type hints enhancements

Fixes:

  • Fixed deskolemization of literals
  • Fixed round-tripping of floats in N3 - floating point and scientific notation handling
  • Fixed CI validation workflow, including regressions in tests
  • Fixed Literal.toPython date conversion for gYear/gYearMonth
  • Fixed namespace prefixes in longturtle serialization
  • Fixed missing dot in RDF patch serialization
  • Previous RDFLib releases required all downstream projects to specify <4.0.0. This release relaxes this requirement to allow Python 3.8.1 and later.

See the CHANGELOG.md for more details.

2025-03-29 RELEASE 7.1.4

29 Mar 02:25

Choose a tag to compare

A tidy-up release with no major updates over 7.1.3. This may be the last 7.x release as we move to a version 8 with breaking changes to Dataset and a few APIs.

Interesting PRs merged:

  • 2025-03-24 - remove old hacks against 2to3
    PR #3095
  • 2025-03-24 - Allow multi subjects & objects in graph funcs
    PR #3086
  • 2025-03-24 - Reduce test warnings
    PR #3085
  • 2025-03-22 - Downgrade log message about plugin
    PR #3063
  • 2025-03-22 - remove old hacks against 2to3
    PR #3076
  • 2025-03-22 - Cope with Namespace annotations in Python 3.14
    PR #3084
  • 2025-01-18 - small docco update
    PR #3053

... and lots of boring dependency bump PRs merged!

2025-01-18 RELEASE 7.1.3

18 Jan 04:41
006949a

Choose a tag to compare

A fix-up release that re-adds support for Python 3.8 after it was accidentally
removed in Release 7.1.2.

This release cherrypicks many additions to 7.1.2 added to 7.1.1 but leaves out
typing changes that are not compatible
with Python 3.8.

Also not carried over from 7.1.2 is the change from Poetry 1.x to 2.0.

Included are PRs such as Defined Namespace warnings fix, sort longturtle
blank nodes
, deterministic longturtle serialisation and Dataset documentation
improvements
.

2024-10-29 RELEASE 7.1.1

28 Oct 00:53
eef28e0

Choose a tag to compare

This minor release removes the dependency on some only Python packages, in particular
six which is a problem for some Linux distributions that ship RDFLib.

Other than that, there are a few minor PRs that improve testing and to do with making releases - no
new RDFLib core work.

Merged PRs:

  • 2024-10-28 - Replace html5lib with html5rdf, make it an optional dependency
    PR #2951

  • 2024-10-23 - Prevent crash when comparing ill-typed numeric types.
    PR #2949

  • 2024-10-23 - Fix parser bug and add test
    PR #2943

  • 2024-10-23 - Fix import ordering in get_merged_prs.
    PR #2947

  • 2024-10-17 - post 7.1.0 release PR
    PR #2934

  • 2024-10-17 - 7.1.0 release
    PR #2933

  • 2024-10-24 - build(deps): bump poetry from 1.8.3 to 1.8.4 in /devtools
    PR #2938

  • 2024-10-24 - build(deps-dev): bump poetry from 1.8.3 to 1.8.4
    PR #2941

  • 2024-10-24 - build(deps): bump orjson from 3.10.7 to 3.10.10
    PR #2950

  • 2024-10-23 - build(deps-dev): bump ruff from 0.6.9 to 0.7.0
    PR #2942

2024-10-17 RELEASE 7.1.0

17 Oct 02:40
ac03f37

Choose a tag to compare

This minor release incorporates just over 100 substantive PRs - interesting things submitted by people - and around 140 auto-generated update PRs from dependabot and similar.

There are no major changes in this release over 7.0.0 and this release can be used in place of 7.0.0 without much worry about altered behaviour.

Since the previous release, we have updated the way auto-generated PRs are handled to ease the job of maintainers.

Due to the large numbers of PRs contained in this release, an abbreviated listing of them only is provided in the release notes in the Changelog file entry for this release.

RDFlib 7.0.0

01 Aug 21:17
708aecd

Choose a tag to compare

2023-08-02 RELEASE 7.0.0

This is a major release with relatively slight breaking changes, new
features and bug fixes.

The most notable breaking change relates to how RDFLib handles the
publicID parameter of the Graph.parse and Dataset.parse methods.
Most users should not be affected by this change.

Instructions on adapting existing code to the breaking changes can be
found in the upgrade guide from Version 6 to Version 7 which should be
available here.

It is likely that the next couple of RDFLib releases will all be major
versions, mostly because there are some more shortcomings of RDFLib's
public interface that should be addressed.

If you use RDFLib, please consider keeping an eye on
discussions,
issues and pull-requests labelled with "feedback
wanted"
.

A big thanks to everyone who contributed to this release.

BREAKING CHANGE: don't use publicID as the name for the default graph. (#2406)

Commit 4b96e9d, closes #2406.

When parsing data into a ConjunctiveGraph or Dataset, the triples in the
default graphs in the sources were loaded into a graph named publicID.

This behaviour has been changed, and now the triples from the default graph in
source RDF documents will be loaded into ConjunctiveGraph.default_context or
Dataset.default_context.

The publicID parameter to ConjunctiveGraph.parse and Dataset.parse
constructors will now only be used as the base URI for relative URI resolution.

BREAKING CHANGE: drop support for python 3.7 (#2436)

Commit 1e5f56b, closes #2436.

Python 3.7 will be end-of-life on the 27th of June 2023 and the next release of
RDFLib will be a new major version.

This changes the minimum supported version of Python to 3.8.1 as some of the
dependencies we use are not too fond of python 3.8.0. This change also removes
all accommodations for older python versions.

feat: add curie method to NamespaceManager (#2365)

Commit f200722, closes #2365.

Added a curie method to NamespaceManager, which can be used to generate a
CURIE from a URI.

Other changes:

  • Fixed NamespaceManager.expand_curie to work with CURIES that have blank
    prefixes (e.g. :something), which are valid according to CURIE Syntax
    1.0
    .
  • Added a test to confirm #2077.

Fixes #2348.

feat: add optional target_graph argument to Graph.cbd and use it for DESCRIBE queries (#2322)

Commit 81d13d4, closes #2322.

Add optional keyword only target_graph argument to rdflib.graph.Graph.cbd and use this new argument in evalDescribeQuery.

This makes it possible to compute a concise bounded description without creating a new graph to hold the result, and also without potentially having to copy it to another final graph.

feat: Don't generate prefixes for unknown URIs (#2467)

Commit bd797ac.

When serializing RDF graphs, URIs with unknown prefixes were assigned a
namespace like ns1:. While the result would be smaller files, it does
result in output that is not as readable.

This change removes this automatic assignment of namespace prefixes.

This is somewhat of an aesthetic choice, eventually we should have more
flexibility in this regard so that users can exercise more control over
how URIs in unknown namespaces are handled.

With this change, users can still manually create namespace prefixes for
URIs in unknown namespaces, but before it there was no way to avoid the
undesired behaviour, so this seems like the better default.

feat: Longturtle improvements (#2500)

Commit 5ee8bd7, closes #2500.

Improved the output of the longturtle serializer.

fix: SPARQL count with optionals (#2448)

Commit 46ff6cf, closes #2448.

Change SPARQL count aggregate to ignore optional that are unbound
instead of raising an exception when they are encountered.

fix: GROUP_CONCAT handling of empty separator (issue) (#2474)

Commit e94c252, closes #2474.

GROUP_CONCAT was handling an empty separator (i.e. "") incorrectly,
it would handle it as if the separator were not set, so essentially it was
treated as a single space (i.e. " ").

This change fixes it so that an empty separator with GROUP_CONCAT
results in a value with nothing between concatenated values.

Fixes #2473

fix: add NORMALIZE_LITERALS to rdflib.__all__ (#2489)

Commit 6981c28, closes #2489.

This gets Sphinx to generate documentation for it, and also clearly
indicates that it can be used from outside the module.

fix: bugs with rdflib.extras.infixowl (#2390)

Commit cd0b442, closes #2390.

Fix the following issues in rdflib.extras.infixowl:

  • getting and setting of max cardinality only considered identifiers and not other RDF terms.
  • The return value of manchesterSyntax was wrong for some cases.
  • The way that BooleanClass was generating its string representation (i.e. BooleanClass.__repr__) was wrong for some cases.

Other changes:

  • Added an example for using infixowl to create an ontology.
  • Updated infixowl tests.
  • Updated infixowl documentation.

This code is based on code from:

fix: correct imports and __all__ (#2340)

Commit 7df77cd, closes #2340.

Disable
implicit_reexport
and eliminate all errors reported by mypy after this.

This helps ensure that import statements import from the right module and that
the __all__ variable is correct.

fix: dbpedia URL to use https instead of http (#2444)

Commit ef25896, closes #2444.

The URL for the service keyword had the http address for the dbpedia endpoint, which no longer works. Changing it to https as that works.

fix: eliminate bare except: (#2350)

Commit 4ea1436, closes #2350.

Replace bare except: with except Exception, there are some cases where it
can be narrowed further, but this is already an improvement over the current
situation.

This is somewhat pursuant to eliminating
flakeheaven, as it no longer
supports the latest version of flake8
[ref]. But it also is
just the right thing to do as bare exceptions can cause problems.

fix: eliminate file intermediary in translate algebra (#2267)

Commit ae6b859, closes #2267.

Previously, rdflib.plugins.sparql.algebra.translateAlgebra() maintained state via a file, with a fixed filename query.txt. With this change, use of that file is eliminated; state is now maintained in memory so that multiple concurrent translateAlgebra() calls, for example, should no longer interfere with each other.

The change is accomplished with no change to the client interface. Basically, the actual functionality has been moved into a class, which is instantiated and used as needed (once per call to algrebra.translateAlgebra()).

fix: eliminate some mutable default arguments in SPARQL code (#2301)

Commit 89982f8, closes #2301.

This change eliminates some situations where a mutable object (i.e., a dictionary) was used as the default value for functions in the rdflib.plugins.sparql.processor module and related code. It replaces these situations with typing.Optinal that defaults to None, and is then handled within the function. Luckily, some of the code that the SPARQL Processor relied on already had this style, meaning not a lot of changes had to be made.

This change also makes a small update to the logic in the SPARQL Processor's query function to simplify the if/else statement. This better mirrors the implementation in the UpdateProcessor.

fix: formatting of SequencePath and AlternativePath (#2504)

Commit [9c73581](https://github.com/RDFLib...

Read more