<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/rdflib.git/rdflib, branch dependabot/docker/docker/unstable/library/python-286f2f1</title>
<subtitle>github.com: rdflib/rdflib.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/rdflib.git/'/>
<entry>
<title>fix: eliminate bare `except:` (#2350)</title>
<updated>2023-04-12T20:11:02+00:00</updated>
<author>
<name>Iwan Aucamp</name>
<email>aucampia@gmail.com</email>
</author>
<published>2023-04-12T20:11:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/rdflib.git/commit/?id=4ea14367ffa2c05e5c288842982dcc3cdd194dd6'/>
<id>4ea14367ffa2c05e5c288842982dcc3cdd194dd6</id>
<content type='text'>
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](https://github.com/flakeheaven/flakeheaven), as it no longer
supports the latest version of flake8
[[ref](https://github.com/flakeheaven/flakeheaven/issues/132)]. But it also is
just the right thing to do as bare exceptions can cause problems.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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](https://github.com/flakeheaven/flakeheaven), as it no longer
supports the latest version of flake8
[[ref](https://github.com/flakeheaven/flakeheaven/issues/132)]. But it also is
just the right thing to do as bare exceptions can cause problems.</pre>
</div>
</content>
</entry>
<entry>
<title>fix: correct imports and `__all__` (#2340)</title>
<updated>2023-04-12T20:10:43+00:00</updated>
<author>
<name>Iwan Aucamp</name>
<email>aucampia@gmail.com</email>
</author>
<published>2023-04-12T20:10:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/rdflib.git/commit/?id=7df77cd3fa0381ae2b309981230eaa0d42e90b79'/>
<id>7df77cd3fa0381ae2b309981230eaa0d42e90b79</id>
<content type='text'>
Disable
[`implicit_reexport`](https://mypy.readthedocs.io/en/stable/config_file.html#confval-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.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Disable
[`implicit_reexport`](https://mypy.readthedocs.io/en/stable/config_file.html#confval-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.</pre>
</div>
</content>
</entry>
<entry>
<title>feat: add optional `target_graph` argument to `Graph.cbd` and use it  for DESCRIBE queries (#2322)</title>
<updated>2023-04-11T21:12:27+00:00</updated>
<author>
<name>Matt Goldberg</name>
<email>59745812+mgberg@users.noreply.github.com</email>
</author>
<published>2023-04-11T21:12:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/rdflib.git/commit/?id=81d13d432b7e49b557b5de11691bdeaed31a9b06'/>
<id>81d13d432b7e49b557b5de11691bdeaed31a9b06</id>
<content type='text'>
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.

Co-authored-by: Iwan Aucamp &lt;aucampia@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.

Co-authored-by: Iwan Aucamp &lt;aucampia@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: eliminate inheritance from object (#2339)</title>
<updated>2023-04-10T10:08:55+00:00</updated>
<author>
<name>Iwan Aucamp</name>
<email>aucampia@gmail.com</email>
</author>
<published>2023-04-10T10:08:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/rdflib.git/commit/?id=20f1235d5f3b639a47cad59967fe93ed9e41dd90'/>
<id>20f1235d5f3b639a47cad59967fe93ed9e41dd90</id>
<content type='text'>
This change removes the redundant inheritance from `object` (i.e. `class
Foo(object): pass`) that is no longer needed in Python 3 and is a relic from
Python 2.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change removes the redundant inheritance from `object` (i.e. `class
Foo(object): pass`) that is no longer needed in Python 3 and is a relic from
Python 2.</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: narrow imports (#2338)</title>
<updated>2023-04-10T10:07:29+00:00</updated>
<author>
<name>Iwan Aucamp</name>
<email>aucampia@gmail.com</email>
</author>
<published>2023-04-10T10:07:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/rdflib.git/commit/?id=61f8a8d16a0812a6ebbe13ccaa3557f9fc4d0618'/>
<id>61f8a8d16a0812a6ebbe13ccaa3557f9fc4d0618</id>
<content type='text'>
This change narrows import so that things are imported from the Python module
where they are defined instead of importing them from a module that re-exports
them, e.g. change import of `Graph` to import from the `rdflib.graph` module
instead of from the `rdflib` module. This helps avoid problems with circular
imports.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change narrows import so that things are imported from the Python module
where they are defined instead of importing them from a module that re-exports
them, e.g. change import of `Graph` to import from the `rdflib.graph` module
instead of from the `rdflib` module. This helps avoid problems with circular
imports.</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: eliminate unused imports (#2337)</title>
<updated>2023-04-10T10:06:21+00:00</updated>
<author>
<name>Iwan Aucamp</name>
<email>aucampia@gmail.com</email>
</author>
<published>2023-04-10T10:06:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/rdflib.git/commit/?id=b2f3987240ebb9edf03fea9bd94f8760ef99f419'/>
<id>b2f3987240ebb9edf03fea9bd94f8760ef99f419</id>
<content type='text'>
`XMLNS` was seen as unused in `rdflib/__init__.py` but this change adds it to
`__all__` in that module so that it is not unused.

This change also removes actual unused imports in
`rdflib/namespace/__init__.py`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`XMLNS` was seen as unused in `rdflib/__init__.py` but this change adds it to
`__all__` in that module so that it is not unused.

This change also removes actual unused imports in
`rdflib/namespace/__init__.py`.</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: eliminate unneeded `rdflib.compat` imports (#2336)</title>
<updated>2023-04-09T19:47:26+00:00</updated>
<author>
<name>Iwan Aucamp</name>
<email>aucampia@gmail.com</email>
</author>
<published>2023-04-09T19:47:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/rdflib.git/commit/?id=6e544f5afc365b8e0fc8ad7f98c4c27b9daa755d'/>
<id>6e544f5afc365b8e0fc8ad7f98c4c27b9daa755d</id>
<content type='text'>
Compatibility handling for `collections.abc.Mapping` and
`collections.abc.MutableMapping` is not needed as RDFLib currently only support
Python 3.7 and newer, and those classes are available from `collections.abc` in
Python 3.7.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Compatibility handling for `collections.abc.Mapping` and
`collections.abc.MutableMapping` is not needed as RDFLib currently only support
Python 3.7 and newer, and those classes are available from `collections.abc` in
Python 3.7.</pre>
</div>
</content>
</entry>
<entry>
<title>fix: eliminate some mutable default arguments in SPARQL code (#2301)</title>
<updated>2023-04-07T11:39:43+00:00</updated>
<author>
<name>Charles Tapley Hoyt</name>
<email>cthoyt@gmail.com</email>
</author>
<published>2023-04-07T11:39:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/rdflib.git/commit/?id=89982f836780650389fb893d7d94e57a0d512cf5'/>
<id>89982f836780650389fb893d7d94e57a0d512cf5</id>
<content type='text'>
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`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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`.</pre>
</div>
</content>
</entry>
<entry>
<title>fix: widen `Graph.__contains__` type-hints to accept `Path` values (#2323)</title>
<updated>2023-04-03T08:29:03+00:00</updated>
<author>
<name>Elliot Ford</name>
<email>elliot.ford@astrazeneca.com</email>
</author>
<published>2023-04-03T08:29:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/rdflib.git/commit/?id=1c45ec4e46d6257011b6e55888c5efb8470e4049'/>
<id>1c45ec4e46d6257011b6e55888c5efb8470e4049</id>
<content type='text'>
Change the type-hints for `Graph.__contains__` to also accept `Path`
values as the parameter is passed to the `Graph.triples` function,
which accepts `Path` values.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change the type-hints for `Graph.__contains__` to also accept `Path`
values as the parameter is passed to the `Graph.triples` function,
which accepts `Path` values.</pre>
</div>
</content>
</entry>
<entry>
<title>fix: eliminate file intermediary in translate algebra (#2267)</title>
<updated>2023-03-27T21:52:28+00:00</updated>
<author>
<name>Jeffrey C. Lerman</name>
<email>jeff@sironamedical.com</email>
</author>
<published>2023-03-27T21:52:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/rdflib.git/commit/?id=ae6b859c9dbf08d3385f44fc348454891dbf520c'/>
<id>ae6b859c9dbf08d3385f44fc348454891dbf520c</id>
<content type='text'>
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()`).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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()`).</pre>
</div>
</content>
</entry>
</feed>
