Bug 2584233

Summary: cutter-re fails to build with Python 3.16: PythonManager.cpp:63:9: error: ‘Py_SetPythonHome’ was not declared in this scope; did you mean ‘setPythonHome’? / PythonManager.cpp:157:5: error: ‘PyEval_InitThreads’ was not declared in this scope
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: cutter-reAssignee: Filipe Rosset <rosset.filipe>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ksurma, mhroncok, rebus, rosset.filipe
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cutter-re-2.5.0-9.fc46 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-11-26 00:16:45 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: 2567340    

Description Karolina Surma 2026-11-25 16:20:28 UTC
cutter-re fails to build with Python 3.16.0a2.

/builddir/build/BUILD/cutter-re-2.5.0-build/cutter-2.5.0/src/common/PythonManager.cpp: In member function ‘void PythonManager::initPythonHome()’:
/builddir/build/BUILD/cutter-re-2.5.0-build/cutter-2.5.0/src/common/PythonManager.cpp:63:9: error: ‘Py_SetPythonHome’ was not declared in this scope; did you mean ‘setPythonHome’?
   63 |         Py_SetPythonHome(pythonHome);
      |         ^~~~~~~~~~~~~~~~
      |         setPythonHome
/builddir/build/BUILD/cutter-re-2.5.0-build/cutter-2.5.0/src/common/PythonManager.cpp: In member function ‘void PythonManager::initialize()’:
/builddir/build/BUILD/cutter-re-2.5.0-build/cutter-2.5.0/src/common/PythonManager.cpp:157:5: error: ‘PyEval_InitThreads’ was not declared in this scope; did you mean ‘PyEval_SaveThread’?
  157 |     PyEval_InitThreads();
      |     ^~~~~~~~~~~~~~~~~~
      |     PyEval_SaveThread

https://docs.python.org/3.16/whatsnew/3.16.html
Remove PyEval_InitThreads() function which did nothing since Python 3.7 and was deprecated since Python 3.9. (Contributed by Victor Stinner in gh-154757.)

Remove Py_SetProgramName() and Py_SetPythonHome() functions, deprecated since Python 3.11. Instead, use PyInitConfig C API to set respectively "program_name" and "home". (Contributed by Victor Stinner in gh-158001.)

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.16/fedora-rawhide-x86_64/11359579-cutter-re/

For all our attempts to build cutter-re with Python 3.16, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.16/package/cutter-re/

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

Let us know here if you have any questions.

Python 3.16 is planned to be included in Fedora 47.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.16.
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 Fedora Update System 2026-11-25 19:32:26 UTC
FEDORA-2026-776d93f34e (cutter-re-2.5.0-9.fc46) has been submitted as an update to Fedora 46.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-776d93f34e

Comment 2 Fedora Update System 2026-11-26 00:16:45 UTC
FEDORA-2026-776d93f34e (cutter-re-2.5.0-9.fc46) has been pushed to the Fedora 46 stable repository.
If problem still persists, please make note of it in this bug report.