RDFlib 6.2.0
This is a minor release that includes bug fixes and features.
User facing changes
This section lists changes that have a potential impact on users of RDFLib,
changes with no user impact are not included in this section.
- SPARQL: Fixed handing of
HAVINGclause with variable composition. Closed
issue #936 and issue
#935, PR
#1093. - JSON-LD parser: better support for content negotiation. Closed issue
#1423, PR
#1436. - Removed the following functions that were marked as deprecated and scheduled
for removal in version 6.0.0:Graph.load,Graph.seq,Graph.comment,
Graph.label. PR #1527. - Use
functools.total_orderingto implement most comparison operations for
rdflib.paths.Path. Closed issue
#685, PR
#1528. - Fixed error handling for invalid URIs. Closed issue
#821, PR
#1529. - InfixOWL: Fixed handling of cardinality 0. Closed issue
#1453 and issue
#944, PR
#1530. - Added quad support to handling to
rdflib.graph.ReadOnlyGraphAggregate.quads.
Closed issue #430, PR
#1590 - Fixed base validation used when joining URIs. PR
#1607. - Add GEO defined namespace for GeoSPARQL. Closed issue
#1371, PR
#1622. - Explicitly raise exception when
rdflib.plugins.stores.sparqlstore.SPARQLStore.updateis called. Closed
issue #1032, PR
#1623. - Added
rdflib.plugins.sparql.processor.prepareUpdate. Closed issue
#272 and discussion
#1581, PR
#1624. - Added
rdflib.namespace.DefinedNamespaceMeta.__dir__. Closed issue
#1593, PR
#1626. - Removed
TypeCheckError,SubjectTypeError,PredicateTypeError,
ObjectTypeErrorandContextTypeErroras these exceptions are not raised by
RDFLib and their existence will only confuse users which may expect them to be
used. Also remove correspondingcheck_context,check_subject,
check_predicate,check_object,check_statement,check_patternthat is
unused. PR #1640. - Improved the population of the
AcceptHTTP header so that it is correctly
populated for all formats. PR
#1643. - Fixed some issues with SPARQL Algebra handling/translation. PR
#1645. - Add
nquadsto recognized file extensions.
PR #1653. - Fixed issues that prevented HexTuples roundtripping.
PR #1656. - Make
rdflib.plugins.sparql.operators.unregister_custom_functionidempotent.
Closed issue #1492,
PR #1659. - Fixed the handling of escape sequences in the N-Triples and N-Quads parsers.
These parsers will now correctly handle strings like"\\r". The time it
takes for these parsers to parse strings with escape sequences will be
increased, and the increase will be correlated with the amount of escape
sequences that occur in a string. For strings with many escape sequences the
parsing speed seems to be almost 4 times slower. Closed issue
#1655, PR
#1663.- Also marked
rdflib.compat.decodeStringEscapeas deprecated as this
function is not used anywhere in RDFLib anymore and the utility that it does
provide is not implemented correctly. It will be removed in RDFLib 7.0.0
- Also marked
- Added an abstract class
IdentifiedNodeas a superclass ofBNodeand
URIRef. Closed issue #1526,
PR #1680. - Fixed turtle serialization of
rdf:typein subject, object. Closed issue
#1649, PR
#1649. - Fixed turtle serialization of PNames that contain brackets. Closed issue
#1661, PR
#1678. - Added support for selecting which namespace prefixes to bind. Closed issue
#1679 and issue #1880, PR
#1686, PR
#1845 and PR
#2018.- Also added
ConjunctiveGraph.get_graph. - Also added an
overrideargument toStore.bindwhich behaves similarly to
theoverrideparameter forNamespaceManager.bind. - Also fixed handing of support of the
overrideparameter to
NamespaceManager.bindby passing.
- Also added
- Eliminated a
DeprecationWarningrelated to plugin loading issue
#1631, PR
#1694. - Removed the
rdflib.graph.ContextNodeandrdflib.graph.DatasetQuadtype
aliases. These were not being widely used in RDFLib and were also not correct.
PR #1695. - Added
DefinedNamespace.as_jsonld_context. PR
#1706. - Added
rdflib.namespace.WGSfor WGS84. Closed issue
#1709, PR
#1710. - Improved performance of
DefinedNamespaceby caching attribute values. PR
#1718. - Only configure python logging if
sys.stderrhas aisattyattribute. Closed
issue #1760, PR
#1761. - Removed unused
rdflib.compat.etree_register_namespace. PR
#1768. - Fixed numeric shortcut handling in
rdflib.util.from_n3. Closed issue
#1769, PR
#1771. - Add ability to detect and mark ill-typed literals. Closed issue
#1757 and issue
#848, PR
#1773 and PR
#2003. - Optimized
NamespaceManager.compute_qnameby caching validity. PR
#1779. - SPARQL: Fixed the handling of
EXISTSinsideBINDfor SPARQL. This was
raising an exception during evaluation before but is now correctly handled.
Closed issue #1472, PR
#1794. - Propagate exceptions from SPARQL TSV result parser. Closed issue
#1477, PR
#1809 - Eliminate usage of
rdflib.term.RDFLibGenidas a type as this caused issues
with querying. Closed issue
#1808, PR
#1821 - Fixed handing of
DefinedNamespacecontrol attributes so that
inspect.signatureworks correctly on defined namespaces. PR
#1825. - Fixed namespace rebinding in
Memory,SimpleMemoryandBerkelyDBstores.
Closed issue #1826, PR
#1843. - Fixed issues with the N3 serializer. Closed issue
#1701 and issue
#1807, PR
#1858:- The N3 serializer was incorrectly considers a subject as seralized if it is serialized in a quoted graph.
- The N3 serializer does not consider that the predicate of a triple can also
be a graph.
- Added
NamespaceManager.expand_curie. Closed issue
#1868, PR
#1869. - Added
Literal.__sub__and support for datetimes to bothLiteral.__add__
andLiteral.__sub__. PR #1870. - SPARQL: Fix
None/undefined handing inGROUP_CONCAT. Closed issue
#1467, PR
#1887. - SPARQL: Fixed result handling for
SERVICEdirective. Closed issue
#1278, PR
#1894. - Change the skolem default authority for RDFLib from
http://rdlib.net/to
https://rdflib.github.ioand also change other uses ofhttp://rdlib.net/
tohttps://rdflib.github.io. Closed issue
#1824, PR
#1901. - Fixes handling of non-ascii characters in IRIs. Closed issue
#1429, PR
#1902. - Pass
generatetoNamespaceManager.compute_qnamefrom
NamespaceManager.compute_qname_strictso it raises an error in the same
case as the "non-strict" version. PR
#1934. - Log warnings when encountering ill-typed literals.
PR #1944. - Fixed error handling in TriX serializer. PR
#1945. - Fixed QName generation in XML serializer.
PR #1951 - Remove unnecessary hex expansion for PN_LOCAL in SPARQL parser. Closed issue
#1957,
PR #1959. - Changed the TriX parser to support both
trixandTriXas root element. PR
#1966. - Fix SPARQL CSV result serialization of blank nodes.
PR #1979. - Added a
URIRef.fragmentproperty.
PR #1991. - Remove superfluous newline from N-Triples output. Closed issue
#1998, PR
#1999. - Added a bunch of type hints. The following modules have nearly complete type hints now:
rdflib.namespacerdflib.termrdflib.parser