Bug 2245858 - pythia8 fails to build with Python 3.13: error: ‘_PyThreadState_UncheckedGet’ was not declared in this scope
Summary: pythia8 fails to build with Python 3.13: error: ‘_PyThreadState_UncheckedGet’...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pythia8
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mattias Ellert
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.13
TreeView+ depends on / blocked
 
Reported: 2023-10-24 11:36 UTC by Karolina Surma
Modified: 2023-10-25 06:13 UTC (History)
3 users (show)

Fixed In Version: pythia8-8.3.09-4.fc40
Clone Of:
Environment:
Last Closed: 2023-10-25 06:13:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github pybind pybind11 pull 4902 0 None Merged Adapt to changed function name in Python 3.13 2023-10-24 17:24:00 UTC

Description Karolina Surma 2023-10-24 11:36:58 UTC
pythia8 fails to build with Python 3.13.0a1.

include/pybind11/detail/../detail/type_caster_base.h: In function ‘PyThreadState* pybind11::detail::get_thread_state_unchecked()’:
include/pybind11/detail/../detail/type_caster_base.h:565:12: error: ‘_PyThreadState_UncheckedGet’ was not declared in this scope; did you mean ‘PyThreadState_GetUnchecked’?
  565 |     return _PyThreadState_UncheckedGet();
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |            PyThreadState_GetUnchecked
According to https://docs.python.org/3.13/whatsnew/3.13.html a new public function has been added:

Add PyThreadState_GetUnchecked() function: similar to PyThreadState_Get(), but don’t kill the process with a fatal error if it is NULL.
The caller is responsible to check if the result is NULL.
Previously, the function was private and known as _PyThreadState_UncheckedGet().
(Contributed by Victor Stinner in gh-108867.)

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/06546830-pythia8/

For all our attempts to build pythia8 with Python 3.13, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/pythia8/

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.13:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/

Let us know here if you have any questions.

Python 3.13 is planned to be included in Fedora 41.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13.
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 Mattias Ellert 2023-10-24 17:24:00 UTC
Fixed in pybind11 upstream.

Comment 2 Fedora Update System 2023-10-25 06:09:29 UTC
FEDORA-2023-f59f9ef296 has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-f59f9ef296

Comment 3 Fedora Update System 2023-10-25 06:13:11 UTC
FEDORA-2023-f59f9ef296 has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.


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