Bug 2466674
| Summary: | python-eth-event fails to build with Python 3.15: error: ‘_PyObject_GetAttrId’ is deprecated / error: ‘_PyUnicode_FromId’ is deprecated | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Karolina Surma <ksurma> |
| Component: | python3-mypy | Assignee: | Gwyn Ciesla <gwync> |
| Status: | NEW --- | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | gwync, ksurma, lemenkov, mhroncok |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | --- | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 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: | 2419355 | ||
| Bug Blocks: | 2412434 | ||
The build failure is not in python-eth-event itself — it is caused by the mypyc runtime library shipped by python-mypy. When python-eth-event builds, mypyc compiles Python code to C extensions using its own lib-rt/*.c files installed at /usr/lib/python3.15/site-packages/mypyc/lib-rt/. These files (pythonsupport.h and bytes_ops.c) still use _PyObject_GetAttrId and _PyUnicode_FromId which are deprecated in Python 3.15 and now treated as errors. The fix needs to go into python-mypy's mypyc runtime, replacing these deprecated APIs with their modern equivalents (PyObject_GetAttr and PyUnicode_FromString respectively). This is a recurring pattern — mypyc has needed similar fixes for Python 3.10, 3.12, and 3.14. Reassigning to python-mypy component. |
python-eth-event fails to build with Python 3.15.0a8. There are multiple entries regarding the deprecation of _PyObject_GetAttrId and _PyUnicode_FromId: In file included from /usr/lib/python3.15/site-packages/mypyc/lib-rt/CPy.h:12, from /usr/lib/python3.15/site-packages/mypyc/lib-rt/init.c:2, from build/__native_eth_event.c:1: /usr/lib/python3.15/site-packages/mypyc/lib-rt/pythonsupport.h: In function ‘init_subclass’: /usr/lib/python3.15/site-packages/mypyc/lib-rt/pythonsupport.h:125:5: error: ‘_PyObject_GetAttrId’ is deprecated [-Werror=deprecated-declarations] 125 | func = _PyObject_GetAttrId(super, &PyId___init_subclass__); | ^~~~ In file included from build/__native_eth_event.c:7: /usr/lib/python3.15/site-packages/mypyc/lib-rt/bytes_ops.c: In function ‘CPyBytes_Join’: /usr/lib/python3.15/site-packages/mypyc/lib-rt/bytes_ops.c:105:9: error: ‘_PyUnicode_FromId’ is deprecated [-Werror=deprecated-declarations] 105 | PyObject *name = _PyUnicode_FromId(&PyId_join); /* borrowed */ | ^~~~~~~~ https://docs.python.org/3.15/whatsnew/3.15.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.15/fedora-rawhide-x86_64/10398236-python-eth-event/ For all our attempts to build python-eth-event with Python 3.15, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.15/package/python-eth-event/ 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.15: https://copr.fedorainfracloud.org/coprs/g/python/python3.15/ Let us know here if you have any questions. Python 3.15 is planned to be included in Fedora 45. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.15. 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.