Bug 2466674 - python-eth-event fails to build with Python 3.15: error: ‘_PyObject_GetAttrId’ is deprecated / error: ‘_PyUnicode_FromId’ is deprecated
Summary: python-eth-event fails to build with Python 3.15: error: ‘_PyObject_GetAttrI...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python3-mypy
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Gwyn Ciesla
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.15
TreeView+ depends on / blocked
 
Reported: 2026-05-05 09:17 UTC by Karolina Surma
Modified: 2026-05-06 12:04 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2026-05-05 09:17:43 UTC
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.

Comment 1 Peter Lemenkov 2026-05-06 12:03:37 UTC
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.


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