Bug 2019051

Summary: insight fails to build with Python 3.11: error: 'void Py_SetProgramName(const wchar_t*)' is deprecated
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: insightAssignee: Patrick Monnerat <patrick>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 36CC: mhroncok, patrick, thrnciar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: insight-13.0.50.20220502-1.fc36 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-11 01:19: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: 1992484, 2016048, 2045102    

Description Tomáš Hrnčiar 2021-11-01 14:20:44 UTC
insight fails to build with Python 3.11.0a1.

python/python.c: In function 'bool do_start_initialization()':
python/python.c:1686:21: error: 'void Py_SetProgramName(const wchar_t*)' is deprecated [-Werror=deprecated-declarations]
 1686 |   Py_SetProgramName (progname_copy);
      |   ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
In file included from /usr/include/python3.11/Python.h:130,
                 from python/python-internal.h:86,
                 from python/python.c:92:
/usr/include/python3.11/pylifecycle.h:37:38: note: declared here
   37 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) Py_SetProgramName(const wchar_t *);
      |                                      ^~~~~~~~~~~~~~~~~
  CXX    ravenscar-thread.o
cc1plus: all warnings being treated as errors

    Deprecate the following functions to configure the Python initialization:
        PySys_AddWarnOptionUnicode()
        PySys_AddWarnOption()
        PySys_AddXOption()
        PySys_HasWarnOptions()
        Py_SetPath()
        Py_SetProgramName()
        Py_SetPythonHome()
        Py_SetStandardStreamEncoding()
        _Py_SetProgramFullPath()

    Use the new PyConfig API of the Python Initialization Configuration instead (PEP 587). (Contributed by Victor Stinner in bpo-44113.)

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/02909531-insight/

For all our attempts to build insight with Python 3.11, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/insight/

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

Let us know here if you have any questions.

Python 3.11 is already included in Fedora 35. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11.
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 Ben Cotton 2022-02-08 21:35:57 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle.
Changing version to 36.

Comment 2 Tomáš Hrnčiar 2022-04-21 14:14:05 UTC
Dear Maintainer,

your package has an open Fails To Build From Source bug for Fedora 37.
Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. If you have already fixed this issue, please close this Bugzilla report.

Following the policy for such packages [2], your package will be orphaned if
this bug remains in NEW state more than 8 weeks (not sooner than 2021-12-27).

A week before the mass branching of Fedora 38 according to the schedule [3],
any packages not successfully rebuilt at least on Fedora 36 will be
retired regardless of the status of this bug.

[1] https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedorapeople.org/groups/schedule/f-38/f-38-key-tasks.html

Comment 3 Fedora Update System 2022-05-03 02:21:32 UTC
FEDORA-2022-5e0ef7cc70 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-5e0ef7cc70

Comment 4 Patrick Monnerat 2022-05-03 02:25:21 UTC
insight-13.0.50.20220502-1 compiles with python 3.11 successfuly.

Comment 5 Fedora Update System 2022-05-03 13:33:12 UTC
FEDORA-2022-5e0ef7cc70 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-5e0ef7cc70`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-5e0ef7cc70

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2022-05-11 01:19:16 UTC
FEDORA-2022-5e0ef7cc70 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.