Bug 2343978 - python-rdflib fails to build with Python 3.14: AttributeError: term 'value' not in namespace 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'
Summary: python-rdflib fails to build with Python 3.14: AttributeError: term 'value' n...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-rdflib
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nils Philippsen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.14
TreeView+ depends on / blocked
 
Reported: 2025-02-05 14:32 UTC by Karolina Surma
Modified: 2025-06-15 21:21 UTC (History)
7 users (show)

Fixed In Version: python-rdflib-7.1.4-3.fc43
Clone Of:
Environment:
Last Closed: 2025-06-15 21:21:52 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github RDFLib rdflib issues 3083 0 None open Failures with Python 3.14 2025-03-20 23:57:24 UTC
Github RDFLib rdflib pull 3084 0 None open Cope with Namespace annotations in Python 3.14 2025-03-20 23:57:24 UTC

Description Karolina Surma 2025-02-05 14:32:20 UTC
python-rdflib fails to build with Python 3.14.0a4.
+ sphinx-build-3 -b html -d docs/_build/doctree docs docs/_build/html
Running Sphinx v8.1.3

Configuration error:
There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "/usr/lib/python3.14/site-packages/sphinx/config.py", line 529, in eval_config_file
    exec(code, namespace)  # NoQA: S102
    ~~~~^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/python-rdflib-7.1.3-build/rdflib-7.1.3/docs/conf.py", line 23, in <module>
    import rdflib
  File "/builddir/build/BUILD/python-rdflib-7.1.3-build/BUILDROOT/usr/lib/python3.14/site-packages/rdflib/__init__.py", line 169, in <module>
    from rdflib.graph import ConjunctiveGraph, Dataset, Graph
  File "/builddir/build/BUILD/python-rdflib-7.1.3-build/BUILDROOT/usr/lib/python3.14/site-packages/rdflib/graph.py", line 292, in <module>
    from rdflib.resource import Resource
  File "/builddir/build/BUILD/python-rdflib-7.1.3-build/BUILDROOT/usr/lib/python3.14/site-packages/rdflib/resource.py", line 296, in <module>
    class Resource:
    ...<164 lines>...
            return "Resource(%s,%s)" % (self._graph, self._identifier)
  File "/builddir/build/BUILD/python-rdflib-7.1.3-build/BUILDROOT/usr/lib/python3.14/site-packages/rdflib/resource.py", line 379, in Resource
    def value(self, p=RDF.value, o=None, default=None, any=True):
                      ^^^^^^^^^
  File "/builddir/build/BUILD/python-rdflib-7.1.3-build/BUILDROOT/usr/lib/python3.14/site-packages/rdflib/namespace/__init__.py", line 285, in __getattr__
    return cls.__getitem__(name)
           ~~~~~~~~~~~~~~~^^^^^^
  File "/builddir/build/BUILD/python-rdflib-7.1.3-build/BUILDROOT/usr/lib/python3.14/site-packages/rdflib/namespace/__init__.py", line 268, in __getitem__
    raise AttributeError(f"term '{name}' not in namespace '{cls._NS}'")
AttributeError: term 'value' not in namespace 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'

https://docs.python.org/3.14/whatsnew/3.14.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.14/fedora-rawhide-x86_64/08609185-python-rdflib/

For all our attempts to build python-rdflib with Python 3.14, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/package/python-rdflib/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.14:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/

Let us know here if you have any questions.

Python 3.14 is planned to be included in Fedora 43.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.14.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Nils Philippsen 2025-03-20 23:39:59 UTC
I’ve examined this and found that it fails for two reasons:

- Directly accessing `__annotations__` fails => should use {annotationlib,inspect}.get_annotations() instead, I’ll submit a PR upstream.
- One plugin (sparql) uses `NotImplemented` in boolean contexts for operator implementations of certain types, this was deprecated since Python 3.9 and fails now. I’ll file an issue.

Comment 2 Maxwell G 2025-06-11 02:23:04 UTC
I submitted https://src.fedoraproject.org/rpms/python-rdflib/pull-request/7 as temporary fix


Note You need to log in before you can comment on or make changes to this bug.