Bug 2330148

Summary: python-rdflib fails to build with sphinx 8.x: WARNING: Cannot resolve forward reference in type annotations of "rdflib.query.Result.__iter__": name '_SubjectType' is not defined
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: python-rdflibAssignee: Nils Philippsen <nphilipp>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: djc, negativo17, nphilipp, pingou
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-rdflib-7.1.3-1.fc42 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-01-30 16:49:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2275375    

Description Tomáš Hrnčiar 2024-12-03 11:24:40 UTC
python-rdflib fails to build with sphinx 8.x in Fedora 42 (currently Rawhide).

The issue detected:
```
reading sources... [ 17%] apidocs/rdflib.namespace
WARNING: Cannot resolve forward reference in type annotations of "rdflib.query.Result.__iter__": name '_SubjectType' is not defined

Exception occurred:
  File "/usr/lib/python3.13/site-packages/sphinx/util/inspect.py", line 485, in object_description
    raise ValueError from exc
ValueError
```

Please work with upstream on this issue, I plan to ship sphinx 8 in two weeks.


For the logs from testing build attempts, see:
https://copr.fedorainfracloud.org/coprs/thrnciar/python-sphinx/package/python-rdflib/

You can test you package in mock running:

$ mock -r fedora-rawhide-x86_64
--addrepo=https://download.copr.fedorainfracloud.org/results/thrnciar/python-sphinx/fedora-rawhide-x86_64/ --no-clean your.src.rpm
$ mock -r fedora-rawhide-x86_64
--addrepo=https://download.copr.fedorainfracloud.org/results/thrnciar/python-sphinx/fedora-rawhide-x86_64/ shell

We'd like to include Sphinx 8 in Fedora 42.
Let us know here if you have any questions. Thank you!

Comment 1 Nils Philippsen 2025-01-30 16:49:16 UTC
This is fixed in python-rdflib-7.1.3-1.fc42 which was built with python3-sphinx-8.1.3-2.fc42 lately.