Skip to content

RDFlib 6.3.0

Compare
Choose a tag to compare
@aucampia aucampia released this 16 Mar 22:29
· 446 commits to main since this release
309848b

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 in ConjunctiveGraph's method get_context().
    The get_context() method will now pass the NamespaceManager of ConjunctiveGraph to the namespace_manager attribute of the newly created context graph, instead of the ConjunctiveGraph object itself. This cleans up an old FIXME comment.
    PR #2073.

  • InfixOWL fixes and cleanup.
    Closed issue #2030.
    PR #2024,
    and PR #2033.

    • rdflib.extras.infixowl.Restriction.__init__ will now raise a ValueError
      if there is no restriction value instead of an AssertionError.
    • 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 in rdflib.plugins.parsers.trix so that it
    no longer tries to import it from xml.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 with lxml installed and with XML documents that
      are not utf-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.
  • Added type hints to the following modules:

  • Removed pre python 3.7 compatibility code.
    PR #2066.

    • Removed fallback in case the shutil module does not have the move
      function.
  • Improve file-URI and path handling in Graph.serialize and Result.serialize to
    address problems with windows path handling in Result.serialize and to make
    the behavior between Graph.serialize and Result.serialie more consistent.
    Closed issue #2067.
    PR #2065.

    • String values for the destination argument will now only be treated as
      file URIs if urllib.parse.urlparse returns their schema as file.
    • Simplified file writing to avoid a temporary file.
  • 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 from Optional[str] to Optional[URIRef] now
    that all non-URIRef str values will be converted to URIRef.
    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 the berkeleydb 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 of rdflib.path.eval_path which is
    PEP-8 compliant. PR #2046

  • Added charset=UTF-8 to the Content-Type header sent when doing an update
    with SPARQLConnector. 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 from SPARQLConnector.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 a GROUP BY clause.
    PR #2188.

  • Fixed a bug that occurred when using SELECT * inside another SELECT *.
    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
    multiple rdfs:comment were present on one resource.
    PR #2254.

  • Fixed rdflib.util._iri2uri() to not quote the netloc 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 * inside SELECT * 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 a Match
    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 to pytest
    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 to IdentifiedNode
    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 and rdflib.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