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 thepublicID
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 usepublicID
as the name for the default graph. (#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
orDataset.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.
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.
curie
method to NamespaceManager
(#2365)
Added a curie
method to NamespaceManager
, which can be used to generate a
CURIE from a URI.
Other changes:
NamespaceManager.expand_curie
to work with CURIES that have blank:something
), which are valid according to CURIE SyntaxFixes #2348.
feat: add optionaltarget_graph
argument to Graph.cbd
and use it for DESCRIBE queries (#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.
Improved the output of the longturtle serializer.
fix: SPARQL count with optionals (#2448)Change SPARQL count aggregate to ignore optional that are unbound
instead of raising an exception when they are encountered.
GROUP_CONCAT
handling of empty separator (issue) (#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: addNORMALIZE_LITERALS
to rdflib.__all__
(#2489)
This gets Sphinx to generate documentation for it, and also clearly
indicates that it can be used from outside the module.
rdflib.extras.infixowl
(#2390)
Fix the following issues in rdflib.extras.infixowl
:
manchesterSyntax
was wrong for some cases.BooleanClass
was generating its string representation (i.e. BooleanClass.__repr__
) was wrong for some cases.Other changes:
This code is based on code from:
fix: correct imports and__all__
(#2340)
Disableimplicit_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.
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 bareexcept:
(#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.
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()
).
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
.
Commit [9c73581](https://github.com/RDFLib...
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4