summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* build(deps): bump berkeleydb from 18.1.5 to 18.1.6 (#2388)HEADmaindependabot[bot]2023-05-171-2/+2
| | | | | | | | | | | | | Bumps [berkeleydb](https://www.jcea.es/programacion/pybsddb.htm) from 18.1.5 to 18.1.6. --- updated-dependencies: - dependency-name: berkeleydb dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps-dev): bump types-setuptools from 67.6.0.7 to 67.7.0.2 (#2387)dependabot[bot]2023-05-171-3/+3
| | | | | | | | | | | | | | Bumps [types-setuptools](https://github.com/python/typeshed) from 67.6.0.7 to 67.7.0.2. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-setuptools dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps-dev): bump mypy from 1.2.0 to 1.3.0 (#2386)dependabot[bot]2023-05-171-27/+27
| | | | | | | | | | | | | | Bumps [mypy](https://github.com/python/mypy) from 1.2.0 to 1.3.0. - [Commits](https://github.com/python/mypy/compare/v1.2.0...v1.3.0) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps-dev): bump setuptools from 67.6.1 to 67.7.2 (#2377)dependabot[bot]2023-05-171-3/+3
| | | | | | | | | | | | | | | | Bumps [setuptools](https://github.com/pypa/setuptools) from 67.6.1 to 67.7.2. - [Release notes](https://github.com/pypa/setuptools/releases) - [Changelog](https://github.com/pypa/setuptools/blob/main/CHANGES.rst) - [Commits](https://github.com/pypa/setuptools/compare/v67.6.1...v67.7.2) --- updated-dependencies: - dependency-name: setuptools dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps-dev): bump coverage from 7.2.3 to 7.2.5 (#2376)dependabot[bot]2023-05-171-52/+52
| | | | | | | | | | | | | | | | Bumps [coverage](https://github.com/nedbat/coveragepy) from 7.2.3 to 7.2.5. - [Release notes](https://github.com/nedbat/coveragepy/releases) - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst) - [Commits](https://github.com/nedbat/coveragepy/compare/7.2.3...7.2.5) --- updated-dependencies: - dependency-name: coverage dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix: HTTP 308 Permanent Redirect status code handling (#2389)Iwan Aucamp2023-05-1715-52/+1121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the handling of HTTP status code 308 to behave more like `urllib.request.HTTPRedirectHandler`, most critically, the new 308 handling will create a new `urllib.request.Request` object with the new URL, which will prevent state from being carried over from the original request. One case where this is important is when the domain name changes, for example, when the original URL is `http://www.w3.org/ns/adms.ttl` and the redirect URL is `https://uri.semic.eu/w3c/ns/adms.ttl`. With the previous behaviour, the redirect would contain a `Host` header with the value `www.w3.org` instead of `uri.semic.eu` because the `Host` header is placed in `Request.unredirected_hdrs` and takes precedence over the `Host` header in `Request.headers`. Other changes: - Only handle HTTP status code 308 on Python versions before 3.11 as Python 3.11 will handle 308 by default [[ref](https://docs.python.org/3.11/whatsnew/changelog.html#id128)]. - Move code which uses `http://www.w3.org/ns/adms.ttl` and `http://www.w3.org/ns/adms.rdf` out of `test_guess_format_for_parse` into a separate parameterized test, which instead uses the embedded http server. This allows the test to fully control the `Content-Type` header in the response instead of relying on the value that the server is sending. This is needed because the server is sending `Content-Type: text/plain` for the `adms.ttl` file, which is not a valid RDF format, and the test is expecting `Content-Type: text/turtle`. Fixes: - <https://github.com/RDFLib/rdflib/issues/2382>.
* build(deps): bump importlib-metadata from 6.3.0 to 6.6.0 (#2370)dependabot[bot]2023-05-171-3/+3
| | | | | | | | | | | | | | | | Bumps [importlib-metadata](https://github.com/python/importlib_metadata) from 6.3.0 to 6.6.0. - [Release notes](https://github.com/python/importlib_metadata/releases) - [Changelog](https://github.com/python/importlib_metadata/blob/main/CHANGES.rst) - [Commits](https://github.com/python/importlib_metadata/compare/v6.3.0...v6.6.0) --- updated-dependencies: - dependency-name: importlib-metadata dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump library/python in /docker/latest (#2362)dependabot[bot]2023-05-171-1/+1
| | | | | | | | | | | | | Bumps library/python from `5a67c38` to `286f2f1`. --- updated-dependencies: - dependency-name: library/python dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps-dev): bump sphinx-autodoc-typehints from 1.22 to 1.23.0 (#2361)dependabot[bot]2023-05-171-5/+5
| | | | | | | | | | | | | | | | Bumps [sphinx-autodoc-typehints](https://github.com/tox-dev/sphinx-autodoc-typehints) from 1.22 to 1.23.0. - [Release notes](https://github.com/tox-dev/sphinx-autodoc-typehints/releases) - [Changelog](https://github.com/tox-dev/sphinx-autodoc-typehints/blob/main/CHANGELOG.md) - [Commits](https://github.com/tox-dev/sphinx-autodoc-typehints/compare/1.22...1.23.0) --- updated-dependencies: - dependency-name: sphinx-autodoc-typehints dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump library/python in /docker/unstable (#2360)dependabot[bot]2023-05-171-1/+1
| | | | | | | | | | | | | Bumps library/python from `5a67c38` to `286f2f1`. --- updated-dependencies: - dependency-name: library/python dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps-dev): bump flakeheaven from 3.2.1 to 3.3.0 (#2358)dependabot[bot]2023-05-171-3/+3
| | | | | | | | | | | | | | | | Bumps [flakeheaven](https://github.com/flakeheaven/flakeheaven) from 3.2.1 to 3.3.0. - [Release notes](https://github.com/flakeheaven/flakeheaven/releases) - [Changelog](https://github.com/flakeheaven/flakeheaven/blob/main/CHANGELOG.md) - [Commits](https://github.com/flakeheaven/flakeheaven/compare/3.2.1...3.3.0) --- updated-dependencies: - dependency-name: flakeheaven dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps-dev): bump pytest from 7.3.0 to 7.3.1 (#2359)dependabot[bot]2023-05-171-3/+3
| | | | | | | | | | | | | | | | Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.3.0 to 7.3.1. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/7.3.0...7.3.1) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* test: Eliminate flake8 errors in tests (#2353)Iwan Aucamp2023-04-1419-51/+27
| | | | | | | | | | | | | | | | | | | | | Eliminate some occurrences of the following flake8 errors in tests: * E265 block comment should start with '# ' * E266 too many leading '#' for block comment * E402 module level import not at top of file * E712 comparison to False should be 'if cond is False:' or 'if not cond:' * E712 comparison to True should be 'if cond is True:' or 'if cond:' * E722 do not use bare 'except' * F401 ... imported but unused * F403 ... used; unable to detect undefined names * F405 ... may be undefined, or defined from star imports: ... * F541 f-string is missing placeholders * F841 local variable 'result' is assigned to but never used * N806 variable 'TEST_DIR' in function should be lowercase This is 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)].
* fix: eliminate bare `except:` (#2350)Iwan Aucamp2023-04-1210-15/+15
| | | | | | | | | | | 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.
* fix: correct imports and `__all__` (#2340)Iwan Aucamp2023-04-1225-72/+143
| | | | | | | | 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.
* feat: add optional `target_graph` argument to `Graph.cbd` and use it for ↵Matt Goldberg2023-04-113-5/+36
| | | | | | | | | 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. Co-authored-by: Iwan Aucamp <aucampia@gmail.com>
* build(deps): bump library/python in /docker/unstable (#2347)dependabot[bot]2023-04-101-1/+1
| | | | | | | | | | | | | Bumps library/python from 3.11.2-slim to 3.11.3-slim. --- updated-dependencies: - dependency-name: library/python dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps-dev): bump types-setuptools from 67.6.0.6 to 67.6.0.7 (#2345)dependabot[bot]2023-04-101-3/+3
| | | | | | | | | | | | | | | Bumps [types-setuptools](https://github.com/python/typeshed) from 67.6.0.6 to 67.6.0.7. - [Release notes](https://github.com/python/typeshed/releases) - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-setuptools dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps-dev): bump mypy from 1.1.1 to 1.2.0 (#2346)dependabot[bot]2023-04-101-27/+27
| | | | | | | | | | | | | | | Bumps [mypy](https://github.com/python/mypy) from 1.1.1 to 1.2.0. - [Release notes](https://github.com/python/mypy/releases) - [Commits](https://github.com/python/mypy/compare/v1.1.1...v1.2.0) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps-dev): bump pytest from 7.2.2 to 7.3.0 (#2344)dependabot[bot]2023-04-101-24/+4
| | | | | | | | | | | | | | | | Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.2.2 to 7.3.0. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/7.2.2...7.3.0) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump importlib-metadata from 6.1.0 to 6.3.0 (#2343)dependabot[bot]2023-04-101-3/+3
| | | | | | | | | | | | | | | | Bumps [importlib-metadata](https://github.com/python/importlib_metadata) from 6.1.0 to 6.3.0. - [Release notes](https://github.com/python/importlib_metadata/releases) - [Changelog](https://github.com/python/importlib_metadata/blob/main/CHANGES.rst) - [Commits](https://github.com/python/importlib_metadata/compare/v6.1.0...v6.3.0) --- updated-dependencies: - dependency-name: importlib-metadata dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump library/python in /docker/latest (#2342)dependabot[bot]2023-04-101-1/+1
| | | | | | | | | | | | | Bumps library/python from 3.11.2-slim to 3.11.3-slim. --- updated-dependencies: - dependency-name: library/python dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps-dev): bump coverage from 7.2.2 to 7.2.3 (#2341)dependabot[bot]2023-04-101-52/+52
| | | | | | | | | | | | | | | | Bumps [coverage](https://github.com/nedbat/coveragepy) from 7.2.2 to 7.2.3. - [Release notes](https://github.com/nedbat/coveragepy/releases) - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst) - [Commits](https://github.com/nedbat/coveragepy/compare/7.2.2...7.2.3) --- updated-dependencies: - dependency-name: coverage dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* refactor: eliminate inheritance from object (#2339)Iwan Aucamp2023-04-1032-50/+50
| | | | | 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.
* refactor: narrow imports (#2338)Iwan Aucamp2023-04-103-6/+5
| | | | | | | 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.
* refactor: eliminate unused imports (#2337)Iwan Aucamp2023-04-102-2/+1
| | | | | | | `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`.
* refactor: eliminate unneeded `rdflib.compat` imports (#2336)Iwan Aucamp2023-04-092-8/+1
| | | | | | 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.
* build(deps-dev): bump black from 23.1.0 to 23.3.0 (#2328)dependabot[bot]2023-04-093-30/+30
| | | | | | | | | | | | | | | | | Bumps [black](https://github.com/psf/black) from 23.1.0 to 23.3.0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/23.1.0...23.3.0) --- updated-dependencies: - dependency-name: black dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Iwan Aucamp <aucampia@gmail.com>
* build: unify poetry version source (#2334)Iwan Aucamp2023-04-094-20/+16
| | | | | | | Change the GitHub actions workflows to use the Poetry version specified in `devtools/requirements-poetry.in` so that it becomes simpler to upgrade Poetry. Also upgrade the version of Poetry from 1.4.0 to 1.4.2
* fix: eliminate some mutable default arguments in SPARQL code (#2301)Charles Tapley Hoyt2023-04-073-18/+26
| | | | | 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`.
* build(deps-dev): bump setuptools from 67.6.0 to 67.6.1 (#2326)dependabot[bot]2023-04-071-3/+3
| | | | | | | | | | | | | | | | Bumps [setuptools](https://github.com/pypa/setuptools) from 67.6.0 to 67.6.1. - [Release notes](https://github.com/pypa/setuptools/releases) - [Changelog](https://github.com/pypa/setuptools/blob/main/CHANGES.rst) - [Commits](https://github.com/pypa/setuptools/compare/v67.6.0...v67.6.1) --- updated-dependencies: - dependency-name: setuptools dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps-dev): bump types-setuptools from 67.6.0.5 to 67.6.0.6 (#2325)dependabot[bot]2023-04-071-3/+3
| | | | | | | | | | | | | | | Bumps [types-setuptools](https://github.com/python/typeshed) from 67.6.0.5 to 67.6.0.6. - [Release notes](https://github.com/python/typeshed/releases) - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-setuptools dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* docs: fix typo in security considerations documentationElliot Ford2023-04-071-1/+1
| | | Replaced "access" with "accessed".
* fix: widen `Graph.__contains__` type-hints to accept `Path` values (#2323)Elliot Ford2023-04-031-5/+3
| | | | | 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.
* build(deps): bump importlib-metadata from 4.13.0 to 6.1.0 (#2318)dependabot[bot]2023-03-272-6/+6
| | | | | | | | | | | | | | | | Bumps [importlib-metadata](https://github.com/python/importlib_metadata) from 4.13.0 to 6.1.0. - [Release notes](https://github.com/python/importlib_metadata/releases) - [Changelog](https://github.com/python/importlib_metadata/blob/main/CHANGES.rst) - [Commits](https://github.com/python/importlib_metadata/compare/v4.13.0...v6.1.0) --- updated-dependencies: - dependency-name: importlib-metadata dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump library/python in /docker/unstable (#2319)dependabot[bot]2023-03-271-1/+1
| | | | | | | | | | | | | Bumps library/python from `1d2b710` to `2f749ef`. --- updated-dependencies: - dependency-name: library/python dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix: eliminate file intermediary in translate algebra (#2267)Jeffrey C. Lerman2023-03-271-189/+265
| | | | | 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()`).
* chore: post release cleanup (#2317)Iwan Aucamp2023-03-263-3/+3
| | | Prepares the main branch for normal usage.
* chore: prepare for release 6.3.2 (#2315)6.3.2Iwan Aucamp2023-03-264-4/+182
|
* fix: `ROUND`, `ENCODE_FOR_URI` and `SECONDS` SPARQL functions (#2314)Iwan Aucamp2023-03-262-4/+196
| | | | | | | | | `ROUND` was not correctly rounding negative numbers towards positive infinity, `ENCODE_FOR_URI` incorrectly treated `/` as safe, and `SECONDS` did not include fractional seconds. This change corrects these issues. - Closes <https://github.com/RDFLib/rdflib/issues/2151>.
* fix: restore the 6.1.1 default bound namespaces (#2313)Iwan Aucamp2023-03-267-20/+121
| | | | | | | | | | | | The namespaces bound by default by `rdflib.graph.Graph` and `rdflib.namespace.NamespaceManager` was reduced in version 6.2.0 of RDFLib, however, this also would cause code that worked with 6.1.1 to break, so this constituted a breaking change. This change restores the previous behaviour, binding the same namespaces as was bound in 6.1.1. To bind a reduced set of namespaces, the `bind_namespaces` parameter of `rdflib.graph.Graph` or `rdflib.namespace.NamespaceManager` can be used. - Closes <https://github.com/RDFLib/rdflib/issues/2103>.
* fix: reference to global inside `get_target_namespace_elements` (#2311)Iwan Aucamp2023-03-252-1/+16
| | | | | | | `get_target_namespace_elements` references the `args` global, which is not defined if the function is called from outside the module. This commit fixes that instead referencing the argument passed to the function. - Closes <https://github.com/RDFLib/rdflib/issues/2072>.
* fix: Add `to_dict` method to the JSON-LD `Context` class. (#2310)Iwan Aucamp2023-03-253-2/+130
| | | | | | | | | | `Context.to_dict` is used in JSON-LD serialization, but it was not implemented. This change adds the method. - Closes <https://github.com/RDFLib/rdflib/issues/2138>. --------- Co-authored-by: Marc-Antoine Parent <maparent@acm.org>
* fix: change the prefix for `https://schema.org/` back to `schema` (#2312)Iwan Aucamp2023-03-252-6/+6
| | | | | | | The default prefix for `https://schema.org/` registered with `rdflib.namespace.NamespaceManager` was inadvertently changed to `sdo` in 6.2.0, this however constitutes a breaking change, as code that was using the `schema` prefix would no longer have the same behaviour. This change changes the prefix back to `schema`.
* test: remove xfail on SPARQL DESCRIBE test (#2309)Iwan Aucamp2023-03-251-3/+0
| | | | | SPARQL DESCRIBE was implemented in <https://github.com/RDFLib/rdflib/pull/2221> so there should be no `xfail` on it tests for it. This change removes one such `xfail` that was in place.
* fix: JSON-LD context construction from a `dict` (#2306)Iwan Aucamp2023-03-242-1/+22
| | | | | | | | | | A variable was only being initialized for string-valued inputs, but if a `dict` input was passed the variable would still be accessed, resulting in a `UnboundLocalError`. This change initializes the variable always, instead of only when string-valued input is used to construct a JSON-LD context. - Closes <https://github.com/RDFLib/rdflib/issues/2303>.
* chore: Update CONTRIBUTORS from commit history (#2305)Graham Higgins2023-03-232-7/+232
| | | This ensures contributors are credited. Also added .mailmap to fix early misattributed contributions.
* fix: IRI to URI conversion (#2304)Iwan Aucamp2023-03-235-19/+169
| | | | | | | | | | | | | | | | | The URI to IRI conversion was percentage-quoting characters that should not have been quoted, like equals in the query string. It was also not quoting things that should have been quoted, like the username and password components of a URI. This change improves the conversion by only quoting characters that are not allowed in specific parts of the URI and quoting previously unquoted components. The safe characters for each segment are taken from [RFC3986](https://datatracker.ietf.org/doc/html/rfc3986). The new behavior is heavily inspired by [`werkzeug.urls.iri_to_uri`](https://github.com/pallets/werkzeug/blob/92c6380248c7272ee668e1f8bbd80447027ccce2/src/werkzeug/urls.py#L926-L931) though there are some differences. - Closes <https://github.com/RDFLib/rdflib/issues/2120>.
* test: add `webtest` marker to tests that use the internet (#2295)Iwan Aucamp2023-03-2110-4/+80
| | | | | | | | | | | This is being done so that it is easier for downstream packagers to run the test suite without requiring internet access. To run only tests that does not use the internet, run `pytest -m "not webtest"`. The validation workflow validates that test run without internet access by running the tests inside `firejail --net=none`. - Closes <https://github.com/RDFLib/rdflib/issues/2293>.
* fix: add the `wgs` namespace binding back (#2294)Iwan Aucamp2023-03-212-1/+53
| | | | | | <https://github.com/RDFLib/rdflib/pull/1686> inadvertently removed the `wgs` prefix. This change adds it back. - Closes <https://github.com/RDFLib/rdflib/issues/2196>.