diff --git a/python-pyqt5-sip.spec b/python-pyqt5-sip.spec index 86b3283..dc0e668 100644 --- a/python-pyqt5-sip.spec +++ b/python-pyqt5-sip.spec @@ -6,12 +6,13 @@ Name: python-%{pkg_name} Version: 12.9.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The sip module support for PyQt5 License: GPLv2 or GPLv3 URL: https://www.riverbankcomputing.com/software/sip/ Source0: %{pypi_source} +Patch0: python3.11.patch BuildRequires: gcc BuildRequires: python3-devel @@ -47,6 +48,9 @@ Provides: python3-pyqt5-sip-api(%{_sip_api_major})%{?_isa} = %{_sip_api} %{python3_sitearch}/PyQt5/ %changelog +* Sat Mar 12 2022 Scott Talbert - 12.9.1-2 +- Fix FTBFS with Python 3.11.0a6 (#2062145) + * Fri Feb 18 2022 Scott Talbert - 12.9.1-1 - Update to new upstream release 12.9.1 (#2049165) diff --git a/python3.11.patch b/python3.11.patch new file mode 100644 index 0000000..914159b --- /dev/null +++ b/python3.11.patch @@ -0,0 +1,18 @@ +diff -up PyQt5_sip-12.9.1/siplib.c.py311 PyQt5_sip-12.9.1/siplib.c +--- PyQt5_sip-12.9.1/siplib.c.py311 2022-02-01 08:29:23.000000000 -0500 ++++ PyQt5_sip-12.9.1/siplib.c 2022-03-11 20:46:19.056212494 -0500 +@@ -12750,7 +12750,14 @@ static struct _frame *sip_api_get_frame( + + while (frame != NULL && depth > 0) + { ++#if PY_VERSION_HEX < 0x03090000 + frame = frame->f_back; ++#else ++ frame = PyFrame_GetBack(frame); ++ ++ /* Historically we return a borrowed reference. */ ++ Py_XDECREF(frame); ++#endif + --depth; + } +