diff --git a/mingw-w64-pyside2/Do-the-transition-to-Python-3.13.patch b/mingw-w64-pyside2/Do-the-transition-to-Python-3.13.patch new file mode 100644 index 0000000000..ab65d3a007 --- /dev/null +++ b/mingw-w64-pyside2/Do-the-transition-to-Python-3.13.patch @@ -0,0 +1,41 @@ +From: Christian Tismer +Date: Fri, 7 Jun 2024 14:57:14 +0200 +Subject: Do the transition to Python 3.13 + +Python 3.13.0rc1 does not stand PyType_Modified of a builtin type. +Since the change is no longer relevant after __signature__ +was removed, we can safely ignore this. + +Task-number: PYSIDE-2751 +Change-Id: I37b447148787e2923a58c091a5c8ac808d579bc0 +Reviewed-by: Friedemann Kleint +(cherry picked from commit ad18260e583a30505e42b04fd242c52ff36f735c) +--- + build_scripts/config.py | 1 + + sources/shiboken2/libshiboken/signature/signature_helper.cpp | 1 - + 2 files changed, 1 insertion(+), 1 deletion(-) + +diff --git a/build_scripts/config.py b/build_scripts/config.py +index fb27394..0e7f9fd 100644 +--- a/build_scripts/config.py ++++ b/build_scripts/config.py +@@ -96,6 +96,7 @@ class Config(object): + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', ++ 'Programming Language :: Python :: 3.13', + ] + + self.setup_script_dir = None +diff --git a/sources/shiboken2/libshiboken/signature/signature_helper.cpp b/sources/shiboken2/libshiboken/signature/signature_helper.cpp +index 05eaa14..8ae048b 100644 +--- a/sources/shiboken2/libshiboken/signature/signature_helper.cpp ++++ b/sources/shiboken2/libshiboken/signature/signature_helper.cpp +@@ -124,7 +124,6 @@ int add_more_getsets(PyTypeObject *type, PyGetSetDef *gsp, PyObject **doc_descr) + if (PyDict_SetItemString(dict, gsp->name, descr) < 0) + return -1; + } +- PyType_Modified(type); + return 0; + } + diff --git a/mingw-w64-pyside2/Fix-condition-to-allow-3.13-for-wheel-creation.patch b/mingw-w64-pyside2/Fix-condition-to-allow-3.13-for-wheel-creation.patch new file mode 100644 index 0000000000..4d0343f90a --- /dev/null +++ b/mingw-w64-pyside2/Fix-condition-to-allow-3.13-for-wheel-creation.patch @@ -0,0 +1,27 @@ +From: =?utf-8?q?Cristi=C3=A1n_Maureira-Fredes?= + +Date: Thu, 19 Sep 2024 09:25:05 +0200 +Subject: Fix condition to allow 3.13 for wheel creation + +Task-number: PYSIDE-2751 +Pick-to: 6.8 +Change-Id: Iaf6e914bf798371faf5066f4a2d70fe3e2c124e5 +Reviewed-by: Christian Tismer +(cherry picked from commit a86135803fe51e5702444f8b7dcb2a4dccd3a209) +--- + build_scripts/config.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/build_scripts/config.py b/build_scripts/config.py +index 0e7f9fd..27844ee 100644 +--- a/build_scripts/config.py ++++ b/build_scripts/config.py +@@ -139,7 +139,7 @@ class Config(object): + setup_kwargs['zip_safe'] = False + setup_kwargs['cmdclass'] = cmd_class_dict + setup_kwargs['version'] = package_version +- setup_kwargs['python_requires'] = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <3.13" ++ setup_kwargs['python_requires'] = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <3.14" + + if quiet: + # Tells distutils / setuptools to be quiet, and only print warnings or errors. diff --git a/mingw-w64-pyside2/PKGBUILD b/mingw-w64-pyside2/PKGBUILD index 988f5de260..69b71a68ea 100644 --- a/mingw-w64-pyside2/PKGBUILD +++ b/mingw-w64-pyside2/PKGBUILD @@ -8,7 +8,7 @@ pkgname=(${MINGW_PACKAGE_PREFIX}-shiboken2 ${MINGW_PACKAGE_PREFIX}-${_realname}-tools) pkgdesc="Provides LGPL Qt5 bindings for Python and related tools for binding generation (mingw-w64)" pkgver=5.15.18 -pkgrel=2 +pkgrel=3 arch=('any') mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64') url="https://doc.qt.io/qtforpython-5/" @@ -51,7 +51,10 @@ source=(https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-${p 004-llvm-paths.patch 010-Python-3.12-Fix-the-structure-of-class-property.patch 011-Support-running-PySide-on-Python-3.12.patch - 012-Final-details-to-enable-3.12-wheel-compatibility.patch) + 012-Final-details-to-enable-3.12-wheel-compatibility.patch + Use-public-version-of-PyLong_AsInt-for-Python-3.13.patch + Do-the-transition-to-Python-3.13.patch + Fix-condition-to-allow-3.13-for-wheel-creation.patch) noextract=("${_pkgfqn}.tar.xz") sha256sums=('aa13963698991589fdec4f19735c6fd7200b7544ba521d64a69e2cea365fd98b' '8120f1d29c4fe6928ab58d01586370af6d7c03f5a4c656d3e80ea03965a032d5' @@ -60,7 +63,10 @@ sha256sums=('aa13963698991589fdec4f19735c6fd7200b7544ba521d64a69e2cea365fd98b' '75e720dc346d92167a6b6dde241f467ecdb1d1c4b9085843755b782f8c6c80a8' '77a851ed10997bd4e4990fd9d30f1a727efe4b0b0eb8c86eac9a7d712f88ec96' 'b47d8709ecfe7347bb0f4e55ede8d756270ccce6daf5ef18fe503237f60be1bc' - '6a904d070d1f25217a0ec58ce903a193369a12a5e6997ed11ccceb497aee7e66') + '6a904d070d1f25217a0ec58ce903a193369a12a5e6997ed11ccceb497aee7e66' + 'e6340091cfaf9ab1cb8cf6d60ee60a07a1a38a3dcaf3974a9c4705e1f87df705' + 'a35ec1dd8b50aa296e775baa389253b42dc3bb1e1cf1c08afc117a03856aaa08' + '0f8549de5c6e98488277de9f6c548443b0ff6eca39a1253aca23b3389febab6f') apply_patch_with_msg() { for _patch in "$@" @@ -87,6 +93,12 @@ prepare() { 010-Python-3.12-Fix-the-structure-of-class-property.patch \ 011-Support-running-PySide-on-Python-3.12.patch \ 012-Final-details-to-enable-3.12-wheel-compatibility.patch + + # 3.13 (also from Debian) + apply_patch_with_msg \ + Use-public-version-of-PyLong_AsInt-for-Python-3.13.patch \ + Do-the-transition-to-Python-3.13.patch \ + Fix-condition-to-allow-3.13-for-wheel-creation.patch } build() { diff --git a/mingw-w64-pyside2/Use-public-version-of-PyLong_AsInt-for-Python-3.13.patch b/mingw-w64-pyside2/Use-public-version-of-PyLong_AsInt-for-Python-3.13.patch new file mode 100644 index 0000000000..91948d6c16 --- /dev/null +++ b/mingw-w64-pyside2/Use-public-version-of-PyLong_AsInt-for-Python-3.13.patch @@ -0,0 +1,22 @@ +From: Dmitry Shachnev +Date: Sat, 4 Jan 2025 21:20:12 +0300 +Subject: Use public version of PyLong_AsInt for Python >= 3.13 + +Forwarded: no +--- + sources/shiboken2/libshiboken/pep384impl.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/sources/shiboken2/libshiboken/pep384impl.h b/sources/shiboken2/libshiboken/pep384impl.h +index 440784e..323715b 100644 +--- a/sources/shiboken2/libshiboken/pep384impl.h ++++ b/sources/shiboken2/libshiboken/pep384impl.h +@@ -183,6 +183,8 @@ LIBSHIBOKEN_API const char *PepType_GetNameStr(PyTypeObject *type); + */ + #ifdef Py_LIMITED_API + LIBSHIBOKEN_API int _PepLong_AsInt(PyObject *); ++#elif PY_VERSION_HEX >= 0x030D0000 ++#define _PepLong_AsInt PyLong_AsInt + #else + #define _PepLong_AsInt _PyLong_AsInt + #endif