Skip to content

Failures with Python 3.14 #3083

Open
Open
@nphilipp

Description

@nphilipp

Hi!

I maintain rdflib as a package in Fedora, and my colleagues are attempting to rebuild Python packages using a pre-release of Python 3.14, the final version is slated for inclusion in Fedora 43, which failed with rdflib.

I’ve found two reasons:

  • Directly accessing __annotations__ doesn’t work as expected in Python 3.14, it should use get_annotations() (from annotationlib or inspect) instead. I’ll submit a PR for this.
  • The sparql plugin uses NotImplemented in boolean contexts, i.e. it relies on that it evaluates as True for comparison (and sorting). This was deprecated in Python 3.9 and fails now, resulting in TypeError: '<' not supported between instances of 'Literal' and 'Literal' . I have no idea how to fix it, all my attempts at workarounds failed.
Summary of failing sparql tests
====================================== short test summary info =======================================
FAILED test/test_w3c_spec/test_sparql10_w3c.py::test_entry_sparql10[http://www.w3.org/2001/sw/DataAccess/tests/data-r2/solution-seq/manifest#slice-3] - TypeError: '<' not supported between instances of 'Literal' and 'Literal'
FAILED test/test_w3c_spec/test_sparql11_w3c.py::test_entry_sparql11[http://www.w3.org/2009/sparql/docs/tests/data-sparql11/csv-tsv-res/manifest#csv01] - TypeError: '<' not supported between instances of 'Literal' and 'Literal'
FAILED test/test_w3c_spec/test_sparql11_w3c.py::test_entry_sparql11[http://www.w3.org/2009/sparql/docs/tests/data-sparql11/csv-tsv-res/manifest#tsv01] - TypeError: '<' not supported between instances of 'Literal' and 'Literal'
FAILED test/test_w3c_spec/test_sparql11_w3c.py::test_entry_sparql11[http://www.w3.org/2009/sparql/docs/tests/data-sparql11/csv-tsv-res/manifest#csv02] - TypeError: '<' not supported between instances of 'Literal' and 'Literal'
FAILED test/test_w3c_spec/test_sparql11_w3c.py::test_entry_sparql11[http://www.w3.org/2009/sparql/docs/tests/data-sparql11/csv-tsv-res/manifest#tsv02] - TypeError: '<' not supported between instances of 'Literal' and 'Literal'
FAILED test/test_w3c_spec/test_sparql11_w3c.py::test_entry_sparql11[http://www.w3.org/2009/sparql/docs/tests/data-sparql11/csv-tsv-res/manifest#csv03] - TypeError: '<' not supported between instances of 'Literal' and 'Literal'
FAILED test/test_w3c_spec/test_sparql11_w3c.py::test_entry_sparql11[http://www.w3.org/2009/sparql/docs/tests/data-sparql11/csv-tsv-res/manifest#tsv03] - TypeError: '<' not supported between instances of 'Literal' and 'Literal'
FAILED test/test_w3c_spec/test_sparql11_w3c.py::test_entry_sparql11[http://www.w3.org/2009/sparql/docs/tests/data-sparql11/functions/manifest#plus-1] - TypeError: '<' not supported between instances of 'Literal' and 'Literal'
FAILED test/test_w3c_spec/test_sparql11_w3c.py::test_entry_sparql11[http://www.w3.org/2009/sparql/docs/tests/data-sparql11/functions/manifest#plus-2] - TypeError: '<' not supported between instances of 'Literal' and 'Literal'
FAILED test/test_w3c_spec/test_sparql11_w3c.py::test_entry_sparql11[http://www.w3.org/2009/sparql/docs/tests/data-sparql11/json-res/manifest#jsonres01] - TypeError: '<' not supported between instances of 'Literal' and 'Literal'
FAILED test/test_w3c_spec/test_sparql11_w3c.py::test_entry_sparql11[http://www.w3.org/2009/sparql/docs/tests/data-sparql11/json-res/manifest#jsonres02] - TypeError: '<' not supported between instances of 'Literal' and 'Literal'
=== 11 failed, 7649 passed, 52 skipped, 330 xfailed, 36 xpassed, 7561 warnings in 97.16s (0:01:37) ===

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions