RDFlib 6.3.0
2023-03-16 RELEASE 6.3.0
This is a minor release that includes bug fixes and features.
Important Information
- RDFLib will drop support for Python 3.7 when it becomes EOL on 2023-06-27,
this will not be considered a breaking change, and RDFLib's major version
number will not be changed solely on the basis of Python 3.7 support being
dropped.
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.
-
Add chunk serializer that facilitates the encoding of a graph into multiple
N-Triples encoded chunks.
PR #1968. -
Fixes passing
NamespaceManager
inConjunctiveGraph
's methodget_context()
.
Theget_context()
method will now pass theNamespaceManager
ofConjunctiveGraph
to thenamespace_manager
attribute of the newly created context graph, instead of theConjunctiveGraph
object itself. This cleans up an oldFIXME
comment.
PR #2073. -
InfixOWL fixes and cleanup.
Closed issue #2030.
PR #2024,
and PR #2033.rdflib.extras.infixowl.Restriction.__init__
will now raise aValueError
if there is no restriction value instead of anAssertionError
.- Fixed numerous issues with
rdflib.extras.infixowl.Restriction.restrictionKind
which was essentially
not working at all. - Fixed how
rdflib.extras.infixowl.Property.__repr__
uses
rdflib.namespace.OWL
. - Removed
rdflib.extras.infixowl.Infix.__ror__
and
rdflib.extras.infixowl.Infix.__or__
as they were broken. - Removed unused
rdflib.extras.infixowl.termDeletionDecorator
. - Added
rdflib.extras.infixowl.MalformedClassError
which will replace
rdflib.extras.infixowl.MalformedClass
(which is an exception) in the next
major version. - Eliminated the use of mutable data structures in some argument defaults.
-
Fixed some cross-referencing issues in RDFLib documentation.
Closed issue #1878.
PR #2036. -
Fixed import of
xml.sax.handler
inrdflib.plugins.parsers.trix
so that it
no longer tries to import it fromxml.sax.saxutils
.
PR #2041. -
Removed a pre python 3.5 regex related workaround in the REPLACE SPARQL
function.
PR #2042. -
Fixed some issues with SPARQL XML result parsing that caused problems with
lxml
. Closed issue #2035,
issue #1847.
PR #2044.- Result parsing from
TextIO
streams now work correctly withlxml
installed and with XML documents that
are notutf-8
encoded. - Elements inside
<results>
that are not<result>
are now ignored. - Elements inside
<result>
that are not<binding>
are now ignored. - Also added type hints to
rdflib.plugins.sparql.results.xmlresults
.
- Result parsing from
-
Added type hints to the following modules:
rdflib.store
.
PR #2057.rdflib.graph
.
PR #2080.rdflib.plugins.sparql.*
.
PR #2094,
PR #2133,
PR #2265,
PR #2097,
PR #2268.rdflib.query
.
PR #2265.rdflib.parser
andrdflib.plugins.parsers.*
.
PR #2232.rdflib.exceptions
.
PR #2232rdflib.shared.jsonld.*
.
PR #2232.rdflib.collection
.
PR #2263.rdflib.util
.
PR #2262.rdflib.path
.
PR #2261.
-
Removed pre python 3.7 compatibility code.
PR #2066.- Removed fallback in case the
shutil
module does not have themove
function.
- Removed fallback in case the
-
Improve file-URI and path handling in
Graph.serialize
andResult.serialize
to
address problems with windows path handling inResult.serialize
and to make
the behavior betweenGraph.serialize
andResult.serialie
more consistent.
Closed issue #2067.
PR #2065.- String values for the
destination
argument will now only be treated as
file URIs ifurllib.parse.urlparse
returns their schema asfile
. - Simplified file writing to avoid a temporary file.
- String values for the
-
Narrow the type of context-identifiers/graph-names from
rdflib.term.Node
to
rdflib.term.IdentifiedNode
as no supported abstract syntax allows for other
types of context-identifiers.
PR #2069. -
Always parse HexTuple files as utf-8.
PR #2070. -
Fixed handling of
Literal
datatype
to correctly differentiate between
blank string values and undefined values, also changed the datatype of
rdflib.term.Literal.datatype
fromOptional[str]
toOptional[URIRef]
now
that all non-URIRef
str
values will be converted toURIRef
.
PR #2076. -
Fixed the generation of VALUES block for federated queries.
The values block was including non-variable values like BNodes which resulted
in invalid queries. Closed issue #2079.
PR #2084. -
Only register the
rdflib.plugins.stores.berkeleydb.BerkeleyDB
as a store
plugin if theberkeleydb
module is present.
Closed issue #1816.
PR #2096. -
Fixed serialization of BNodes in TriG.
The TriG serializer was only considering BNode references inside a single
graph and not counting the BNodes subjects as references when considering if a
BNode should be serialized as unlabeled blank nodes (i.e.[ ]
), and as a
result it was serializing BNodes as unlabeled if they were in fact referencing
BNodes in other graphs.
PR #2085. -
Deprecated
rdflib.path.evalPath
in favor ofrdflib.path.eval_path
which is
PEP-8 compliant. PR #2046 -
Added
charset=UTF-8
to theContent-Type
header sent when doing an update
withSPARQLConnector
. Closed issue
#2095. PR
#2112. -
Removed the
rdflib.plugins.sparql.parserutils.plist
class as it served no
discernible purpose. PR #2143 -
Changed the TriG serializer to not generate prefixes for empty graph IDs.
Closed issue #2154.
PR #2160. -
Fixed handling of relative context files in the JSON-LD parser.
Closed issue #2164.
PR #2165. -
Improved failure handling in when computing QName for an unbound namespace.
PR #2169. -
Fixed a typo in the default bound namespace for
DCTERMS
.
PR #2173. -
Add support for supplying a custom namespace manager to
n3()
methods.
PR #2174. -
Fixed the query string parameters for
SPARQLConnector
when using POST method.
PR #2180. -
Fixed extra keyword argument and header handling in
SPARQLConnector
that
resulted in headers fromSPARQLConnector.update
polluting headers from
SPARQLConnector.query
vice versa.
PR #2183 -
Added version restrictions for dependencies.
PR #2187 -
Switch to using
importlib
for getting the version of RDFLib instead of
hard-coding it in__version__
.
PR #2187. -
Removed non-runtime extras, for building documentation, running tests and
other development operations the versions and dependencies are now
managed with Poetry.
PR #2187. -
Fixed a bug that occurred when
VALUES
was used outside aGROUP BY
clause.
PR #2188. -
Fixed a bug that occurred when using
SELECT *
inside anotherSELECT *
.
Closed issue #1722.
PR #2190. -
Added SPARQL DESCRIBE query implementation.
Closes issue #479.
PR #2221. -
Fixed a bug in
rdflib.tools.defined_namespace_creator
that occurred when
multiplerdfs:comment
were present on one resource.
PR #2254. -
Fixed
rdflib.util._iri2uri()
to not quote thenetloc
parameter.
PR #2255. -
Fixed the HexTuple parser's handling of input sources to works for more input sources.
PR #2255. -
Fixed the creation of input source objects from IO stream sources.
PR #2255. -
Eliminated the use of the deprecated
rdflib.path.evalPath
function.
PR #2266 -
Added documentation for security considerations and available mitigations.
Closed issue #1844.
PR #2267.
PRs merged since last release
- fix: validation issues with examples
PR #2269 - feat: more type hints for
rdflib.plugins.sparql
PR #2268 - fix: eliminate use of deprecated
rdflib.path.evalPath
PR #2266 - more type-hinting for SPARQL plugin
PR #2265 - feat: add diverse type hints
PR #2264 - feat: add type hints to
rdflib.collection
PR #2263 - feat: add type hints to
rdflib.util
PR #2262 - feat: add type hints to
rdflib.path
PR #2261 - test: fix deprecation warnings
PR #2260 - docs: update test reports
PR #2259 - fix: small InputSource related issues
PR #2255 - defined_namespace_creator: concatenate several rdfs:comments
PR #2254 - feat: add parser type hints
PR #2232 - build: bump versions
PR #2231 - Add SPARQL DESCRIBE query implementation
PR #2221 - build: rename minimum constraints file to evade dependabot
PR #2209 - Fix for
SELECT *
insideSELECT *
bug
PR #2190 - Fixing bug applying VALUES outside of a GROUP BY
PR #2188 - move to poetry for dependency management; consolidate more settings into pyproject.toml
PR #2187 - build: update black to 22.12.0
PR #2186 - Issue2179 incorrect headers
PR #2183 - Fix missing query string params in sparqlconnector when using POST method
PR #2180 - [pre-commit.ci] pre-commit autoupdate
PR #2178 - Add namespace_manager argument for n3 method on Paths
PR #2174 - fix DCTERMS prefix typo
PR #2173 - compute_qname handle case where name could be unbound
PR #2169 - Issue 2164
PR #2165 - build: update black to 22.10.0
PR #2163 - ci: switch to python 3.11 release
PR #2162 - fix: type errors resulting from new mypy
PR #2161 - do not write prefix for empty graph id, fix #2154
PR #2160 - Remove redundant class
PR #2143 - Pass
service_query
to_buildQueryStringForServiceCall
instead of aMatch
PR #2134 - Add type hint to part in evalServiceQuery
PR #2133 - Remove outdated comment
PR #2129 - fix: type ignore compatibility with latest mypy
PR #2127 - Remove redundant PR template
PR #2126 - build: use 3.11.0-rc.2
PR #2119 - build: docker images for latest release and main branch
PR #2116 - add charset encoding to SPARQLConnector.update() request.
PR #2112 - Add test for issue #2011
PR #2107 - chore: rename default branch to
main
PR #2101 - Correct a typo in test_roundtrip.py
PR #2100 - feat: add type hints to
rdflib.query
and related
PR #2097 - fix: Don't register berkelydb as a store if it is not available on the system
PR #2096 - feat: add type hints to
rdflib.plugins.sparql.{algebra,operators}
PR #2094 - test: Fix
exclude_lines
for coverage
PR #2093 - test: content-type handling with SPARQLStore + CONSTRUCT queries
PR #2092 - ci: publish test reports for mypy and pytest
PR #2091 - test: convert more test from unittest to pytest
PR #2089 - ci: switch from 3.11.0-beta.4 to 3.11.0-rc.1
PR #2087 - fix: issue with trig reference counting across graphs
PR #2085 - Generate VALUES block for federated queries with variables only
PR #2084 - docs: Add a contributing guide
PR #2082 - feat: Add type hints to rdflib.graph
PR #2080 - fix: handling of Literal datatype
PR #2076 - test: convert some
unittest
based tests topytest
PR #2075 - test: honour lax cardinality from test manifests
PR #2074 - Fix passing ConjunctiveGraph as namespace_manager
PR #2073 - fix: always parse HexTuple files as utf-8
PR #2070 - fix: narrow the context identifier type from
Node
toIdentifiedNode
PR #2069 - build: set a minimum version for flakeheaven
PR #2068 - chore: remove pre Python 3.7 compatibility code for shutil
PR #2066 - fix: issues with string destination handling in
{Graph,Result}.serialize
PR #2065 - build: fix Taskfile.yml for Windows
PR #2064 - test: convert
test/test_sparql/test_sparql_parser.py
to pytest
PR #2063 - test: convert
test/test_sparql/test_construct_bindings.py
to pytest
PR #2062 - test: convert
test/test_parsers/test_nquads.py
to pytest
PR #2061 - test: convert
test/test_namespace/test_namespace.py
to pytest
PR #2060 - docs: add DOI for RDFLib
PR #2058 - feat: add type hints for
rdflib.store
andrdflib.plugins.stores
PR #2057 - Toplevel n80x
PR #2046 - docs: add some additional badges
PR #2045 - fix: SPARQL XML result parsing
PR #2044 - chore: remove pre python 3.5 regex related workaround
PR #2042 - fix: import xml.sax.handler from the right place
PR #2041 - test: remove python 2.4 specific behaviour in test
PR #2040 - build: remove drone config
PR #2037 - docs: fix sphinx nitpicky issues
PR #2036 - build: Gitpod integration and Google Cloud Shell Button
PR #2034 - Infixowl cleanup iii
PR #2033 - build: Taskfile improvements
PR #2032 - docs: removed "Other changes" from CHANGELOG.md
PR #2031 - Infixowl coverage ii
PR #2024 - add chunk serializer & tests
PR #1968