[neon/qt/pyside2/Neon/unstable] debian: Drop patches that are included in the new release.

Dmitry Shachnev null at kde.org
Thu Jun 15 10:12:13 BST 2023


Git commit afcef845555a7777b3e2d17e3b15a4cf53c15b69 by Dmitry Shachnev.
Committed on 31/12/2022 at 18:28.
Pushed by carlosdem into branch 'Neon/unstable'.

Drop patches that are included in the new release.

M  +8    -0    debian/changelog
D  +0    -30   debian/patches/fix-reuse-build.patch
D  +0    -139  debian/patches/py3.10-prep-Finally-support-Python-3.10.patch
D  +0    -51   debian/patches/py3.10-prep-Fix-a-very-old-refcounting-error-in-time_test.patch
D  +0    -51   debian/patches/py3.10-prep-Fix-parser.py-for-changed-typing-module.patch
D  +0    -35   debian/patches/py3.10-prep-reset-the-type-cache-after-feature-switching.patch
D  +0    -53   debian/patches/qApp-fix-flag-handling.patch
M  +0    -7    debian/patches/series
D  +0    -28   debian/patches/shiboken6-Adapt-to-LLVM-12.01.patch

https://invent.kde.org/neon/qt/pyside2/-/commit/afcef845555a7777b3e2d17e3b15a4cf53c15b69

diff --git a/debian/changelog b/debian/changelog
index 1e728e7d..edd3ec29 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,14 @@
 pyside2 (5.15.7-1) UNRELEASED; urgency=medium
 
   * New upstream release.
+  * Drop patches, included in the new release:
+    - fix-reuse-build.patch
+    - qApp-fix-flag-handling.patch
+    - py3.10-prep-reset-the-type-cache-after-feature-switching.patch
+    - py3.10-prep-Fix-parser.py-for-changed-typing-module.patch
+    - py3.10-prep-Finally-support-Python-3.10.patch
+    - py3.10-prep-Fix-a-very-old-refcounting-error-in-time_test.patch
+    - shiboken6-Adapt-to-LLVM-12.01.patch
 
  -- Dmitry Shachnev <mitya57 at debian.org>  Sat, 31 Dec 2022 21:24:57 +0300
 
diff --git a/debian/patches/fix-reuse-build.patch b/debian/patches/fix-reuse-build.patch
deleted file mode 100644
index b06902a7..00000000
--- a/debian/patches/fix-reuse-build.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From: Dmitry Shachnev <mitya57 at debian.org>
-Date: Wed, 16 Dec 2020 20:26:18 +0300
-Subject: Pass --reuse-build only to commands that use DistUtilsCommandMixin
-
-This is a concatenation of two upstream commits:
-- https://code.qt.io/cgit/pyside/pyside-setup.git/commit/?id=ed0571df854a232e
-- https://code.qt.io/cgit/pyside/pyside-setup.git/commit/?id=3f00c2adad2e38b0
----
- build_scripts/setup_runner.py | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/build_scripts/setup_runner.py b/build_scripts/setup_runner.py
-index 57c8fbd..3c7116b 100644
---- a/build_scripts/setup_runner.py
-+++ b/build_scripts/setup_runner.py
-@@ -88,8 +88,13 @@ class SetupRunner(object):
-         internal_build_type_arg = self.construct_internal_build_type_cmd_line_argument(build_type)
-         setup_cmd = [sys.executable] + self.sub_argv + [internal_build_type_arg]
- 
-+        command = self.sub_argv[0]
-+        if command == 'setup.py' and len(self.sub_argv) > 1:
-+            command = self.sub_argv[1]
-+
-         # Add --reuse-build option if requested and not already present.
--        if reuse_build and not self.cmd_line_argument_is_in_args("reuse-build", self.sub_argv):
-+        if (reuse_build and command in ('bdist_wheel', 'build', 'build_rst_docs', 'install')
-+            and not self.cmd_line_argument_is_in_args("reuse-build", self.sub_argv)):
-             setup_cmd.append(self.construct_cmd_line_argument("reuse-build"))
-         self.invocations_list.append(setup_cmd)
- 
diff --git a/debian/patches/py3.10-prep-Finally-support-Python-3.10.patch b/debian/patches/py3.10-prep-Finally-support-Python-3.10.patch
deleted file mode 100644
index a96abf10..00000000
--- a/debian/patches/py3.10-prep-Finally-support-Python-3.10.patch
+++ /dev/null
@@ -1,139 +0,0 @@
-From: Christian Tismer <tismer at stackless.com>
-Date: Sat, 8 May 2021 16:06:23 +0200
-Subject: py3.10-prep: Finally support Python 3.10
-
-After the major problems are solved in
-    py3.10-prep: re-implement zip import
-    py3.10-prep: reset the type cache after feature switching
-    py3.10-prep: Fix parser.py for changed typing module
-
-, there are only some minor changes left to do. One thing
-is still not clear:
-
-* Unsolved: In time_test.py, the last two tests work but
-crash at shutdown.
-It is not yet clear if this is a PySide or Python error.
-
-This will crash Python 3.10 if not solved until the release.
-
-(cherry picked from commit 81e9cff884d6b03cdf64a5dd6ec6564d99177e0c)
----
- build_scripts/config.py                                     |  1 +
- sources/pyside2/tests/QtWidgets/signature_test.py           |  5 +++--
- sources/shiboken2/libshiboken/pep384impl.cpp                | 13 ++++++-------
- sources/shiboken2/libshiboken/pep384impl.h                  |  7 ++++++-
- sources/shiboken2/libshiboken/sbkstring.cpp                 |  2 +-
- .../files.dir/shibokensupport/signature/mapping.py          |  1 +
- 6 files changed, 18 insertions(+), 11 deletions(-)
-
-diff --git a/build_scripts/config.py b/build_scripts/config.py
-index b1b3206..7ff155c 100644
---- a/build_scripts/config.py
-+++ b/build_scripts/config.py
-@@ -93,6 +93,7 @@ class Config(object):
-             'Programming Language :: Python :: 3.7',
-             'Programming Language :: Python :: 3.8',
-             'Programming Language :: Python :: 3.9',
-+            'Programming Language :: Python :: 3.10',
-         ]
- 
-         self.setup_script_dir = None
-diff --git a/sources/pyside2/tests/QtWidgets/signature_test.py b/sources/pyside2/tests/QtWidgets/signature_test.py
-index 57fcf38..cacb576 100644
---- a/sources/pyside2/tests/QtWidgets/signature_test.py
-+++ b/sources/pyside2/tests/QtWidgets/signature_test.py
-@@ -65,8 +65,9 @@ class PySideSignatureTest(unittest.TestCase):
-         for thing in obj.__signature__:
-             self.assertEqual(type(thing), inspect.Signature)
-         sm = PySide2.QtWidgets.QApplication.__dict__["palette"]
--        self.assertFalse(callable(sm))
--        self.assertEqual(sm.__func__, obj)
-+        # PYSIDE-1436: staticmethod is a callable since Python 3.10
-+        # Instead of checking callable(sm), we check the type:
-+        self.assertEqual(type(sm), staticmethod)
-         self.assertTrue(hasattr(sm, "__signature__") and
-                         sm.__signature__ is not None)
- 
-diff --git a/sources/shiboken2/libshiboken/pep384impl.cpp b/sources/shiboken2/libshiboken/pep384impl.cpp
-index cb80425..633d9dc 100644
---- a/sources/shiboken2/libshiboken/pep384impl.cpp
-+++ b/sources/shiboken2/libshiboken/pep384impl.cpp
-@@ -751,14 +751,14 @@ _Pep_PrivateMangle(PyObject *self, PyObject *name)
- #endif // IS_PY2
-     Shiboken::AutoDecRef privateobj(PyObject_GetAttr(
-         reinterpret_cast<PyObject *>(Py_TYPE(self)), Shiboken::PyMagicName::name()));
--#ifndef Py_LIMITED_API
--    return _Py_Mangle(privateobj, name);
--#else
--    // For some reason, _Py_Mangle is not in the Limited API. Why?
--    size_t plen = PyUnicode_GET_LENGTH(privateobj);
-+
-+    // PYSIDE-1436: _Py_Mangle is no longer exposed; implement it always.
-+    // The rest of this function is our own implementation of _Py_Mangle.
-+    // Please compare the original function in compile.c .
-+    size_t plen = PyUnicode_GET_LENGTH(privateobj.object());
-     /* Strip leading underscores from class name */
-     size_t ipriv = 0;
--    while (PyUnicode_READ_CHAR(privateobj, ipriv) == '_')
-+    while (PyUnicode_READ_CHAR(privateobj.object(), ipriv) == '_')
-         ipriv++;
-     if (ipriv == plen) {
-         Py_INCREF(name);
-@@ -787,7 +787,6 @@ _Pep_PrivateMangle(PyObject *self, PyObject *name)
-     if (amount > big_stack)
-         free(resbuf);
-     return result;
--#endif // else Py_LIMITED_API
- }
- 
- /*****************************************************************************
-diff --git a/sources/shiboken2/libshiboken/pep384impl.h b/sources/shiboken2/libshiboken/pep384impl.h
-index 7a6f57f..eb65596 100644
---- a/sources/shiboken2/libshiboken/pep384impl.h
-+++ b/sources/shiboken2/libshiboken/pep384impl.h
-@@ -40,6 +40,11 @@
- #ifndef PEP384IMPL_H
- #define PEP384IMPL_H
- 
-+// PYSIDE-1436: Adapt to Python 3.10
-+#if PY_VERSION_HEX < 0x030900A4
-+#  define Py_SET_REFCNT(obj, refcnt) ((Py_REFCNT(obj) = (refcnt)), (void)0)
-+#endif
-+
- extern "C"
- {
- 
-@@ -327,7 +332,7 @@ LIBSHIBOKEN_API PyObject *PyRun_String(const char *, int, PyObject *, PyObject *
- // But this is no problem as we check it's validity for every version.
- 
- #define PYTHON_BUFFER_VERSION_COMPATIBLE    (PY_VERSION_HEX >= 0x03030000 && \
--                                             PY_VERSION_HEX <  0x0309FFFF)
-+                                             PY_VERSION_HEX <  0x030AFFFF)
- #if !PYTHON_BUFFER_VERSION_COMPATIBLE
- # error Please check the buffer compatibility for this python version!
- #endif
-diff --git a/sources/shiboken2/libshiboken/sbkstring.cpp b/sources/shiboken2/libshiboken/sbkstring.cpp
-index 918aae7..077fb53 100644
---- a/sources/shiboken2/libshiboken/sbkstring.cpp
-+++ b/sources/shiboken2/libshiboken/sbkstring.cpp
-@@ -247,7 +247,7 @@ static void finalizeStaticStrings()
- {
-     auto &set = staticStrings();
-     for (PyObject *ob : set) {
--        Py_REFCNT(ob) = 1;
-+        Py_SET_REFCNT(ob, 1);
-         Py_DECREF(ob);
-     }
-     set.clear();
-diff --git a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
-index 6fadd19..f701d83 100644
---- a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
-+++ b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
-@@ -300,6 +300,7 @@ type_map.update({
-     "zero(object)": None,
-     "zero(str)": "",
-     "zero(typing.Any)": None,
-+    "zero(Any)": None,
-     })
- 
- type_map.update({
diff --git a/debian/patches/py3.10-prep-Fix-a-very-old-refcounting-error-in-time_test.patch b/debian/patches/py3.10-prep-Fix-a-very-old-refcounting-error-in-time_test.patch
deleted file mode 100644
index 8eddad76..00000000
--- a/debian/patches/py3.10-prep-Fix-a-very-old-refcounting-error-in-time_test.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From: Christian Tismer <tismer at stackless.com>
-Date: Fri, 20 Aug 2021 18:18:57 +0200
-Subject: py3.10-prep: Fix a very old refcounting error in time_test.py
-
-Since 2012-03-08, there was a refcounting error in
-the typesystem_sample.xml file at <value-type name="Time">.
-The boolean function results were not refcounted.
-
-(Commit 7b731d702c64d172e192aa1876e4a6fade6c38d7)
-
-This bug was hard to find because nobody expects a failure in the
-testing code, and the error shows up at the very end in the
-finalization code, totally unrelated to the error location.
-
-In order to find it, the setting `PYTHONMALLOC=malloc` was needed,
-because otherwise we got a Python memory dump but no traceback.
-Then, Python was modified and code was inserted in the various
-involved `code_dealloc`, `tupledealloc` and `object_dealloc`
-functions that printed the involved refcounts and types before
-performing the actual deallocation.
-
-This bug actually was of no harm since only the wrong test was
-involved. It was very misleading because there were quite some
-changes to the `datetime` module in Python 3.10. But the bug
-was nothing but a dormant refcounting error.
-
-(cherry picked from commit 2af6ac20de365116b52b65c6c34cfd6c536c23df)
----
- sources/shiboken2/tests/samplebinding/typesystem_sample.xml | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/sources/shiboken2/tests/samplebinding/typesystem_sample.xml b/sources/shiboken2/tests/samplebinding/typesystem_sample.xml
-index 595afb9..70fabcf 100644
---- a/sources/shiboken2/tests/samplebinding/typesystem_sample.xml
-+++ b/sources/shiboken2/tests/samplebinding/typesystem_sample.xml
-@@ -1953,6 +1953,7 @@
-                     %PYARG_0 = Py_False;
-                 else
-                     %PYARG_0 = Py_True;
-+                Py_INCREF(%PYARG_0);
-             }
-           </inject-code>
-         </add-function>
-@@ -1970,6 +1971,7 @@
-                     %PYARG_0 = Py_True;
-                 else
-                     %PYARG_0 = Py_False;
-+                Py_INCREF(%PYARG_0);
-             }
-           </inject-code>
-         </add-function>
diff --git a/debian/patches/py3.10-prep-Fix-parser.py-for-changed-typing-module.patch b/debian/patches/py3.10-prep-Fix-parser.py-for-changed-typing-module.patch
deleted file mode 100644
index c6ea7546..00000000
--- a/debian/patches/py3.10-prep-Fix-parser.py-for-changed-typing-module.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From: Christian Tismer <tismer at stackless.com>
-Date: Sat, 8 May 2021 16:06:23 +0200
-Subject: py3.10-prep: Fix parser.py for changed typing module
-
-The typing module has subtle changes that are not even
-documented: Typing types now have a __name__ attribute.
-That confused the parser of the pyi generator because
-suddenly stingizing
-
-    Callable[..., Optional[str]]
-
-resulted in
-
-    Callable[..., Optional]
-
-because of special rules that return the generic name
-of a typing type, which was very unexpected. Finding this bug
-took a lot of debugging of the recursive `_resolve_type`
-function.
-
-(cherry picked from commit 2530cb3f165ac02b8f7132e3f5ab4f7f6896dbd9)
----
- .../shibokenmodule/files.dir/shibokensupport/signature/parser.py     | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/parser.py b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/parser.py
-index 20c791c..1a29df5 100644
---- a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/parser.py
-+++ b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/parser.py
-@@ -43,10 +43,11 @@ import sys
- import re
- import warnings
- import types
-+import typing
- import keyword
- import functools
- from shibokensupport.signature.mapping import (type_map, update_mapping,
--    namespace, typing, _NotCalled, ResultVariable, ArrayLikeVariable)
-+    namespace, _NotCalled, ResultVariable, ArrayLikeVariable)
- from shibokensupport.signature.lib.tool import (SimpleNamespace,
-     build_brace_pattern)
- 
-@@ -222,7 +223,7 @@ def _resolve_arraytype(thing, line):
- def to_string(thing):
-     if isinstance(thing, str):
-         return thing
--    if hasattr(thing, "__name__"):
-+    if hasattr(thing, "__name__") and thing.__module__ != "typing":
-         dot = "." in str(thing)
-         name = get_name(thing)
-         return thing.__module__ + "." + name if dot else name
diff --git a/debian/patches/py3.10-prep-reset-the-type-cache-after-feature-switching.patch b/debian/patches/py3.10-prep-reset-the-type-cache-after-feature-switching.patch
deleted file mode 100644
index cb858ffd..00000000
--- a/debian/patches/py3.10-prep-reset-the-type-cache-after-feature-switching.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From: Christian Tismer <tismer at stackless.com>
-Date: Sat, 8 May 2021 16:06:23 +0200
-Subject: py3.10-prep: reset the type cache after feature switching
-
-When using feature switching in Python 3.10, there were
-funny effects where switched and un-switched versions appeared
-to co-exist.
-
-It turned out that we were hit by function caching that
-is now implemented for the LOAD_ATTR opcode.
-
-It was not known that caching would happen at all for
-PySide classes because we don't use Py_TPFLAGS_VALID_VERSION_TAG.
-But actually, this flag is used internally by Python to do some
-optimizations, and we just have to notify the interpreter of
-type changes by PyType_Modified().
-
-(cherry picked from commit 3a2b7c6f88bba04d8b7ddb571163d23c15c36a4f)
----
- sources/pyside2/libpyside/feature_select.cpp | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/sources/pyside2/libpyside/feature_select.cpp b/sources/pyside2/libpyside/feature_select.cpp
-index 6a21d16..3da7dde 100644
---- a/sources/pyside2/libpyside/feature_select.cpp
-+++ b/sources/pyside2/libpyside/feature_select.cpp
-@@ -405,6 +405,8 @@ static inline PyObject *SelectFeatureSet(PyTypeObject *type)
-             if (!SelectFeatureSetSubtype(sub_type, select_id))
-                 break;
-         }
-+        // PYSIDE-1436: Clear all caches for the type and subtypes.
-+        PyType_Modified(type);
-     }
-     return type->tp_dict;
- }
diff --git a/debian/patches/qApp-fix-flag-handling.patch b/debian/patches/qApp-fix-flag-handling.patch
deleted file mode 100644
index b4fcaa3a..00000000
--- a/debian/patches/qApp-fix-flag-handling.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From: Christian Tismer <tismer at stackless.com>
-Date: Wed, 23 Dec 2020 13:28:16 +0200
-Subject: qApp: fix flag handling in Python 3.8+ and a Python 3.9 issue
-
-This is an old problem that was solved for Python 2.7.
-From Python 3.8 on, the behavior is the same with Python 3.
-
-The fix finally was to extend a Python 2.7 patch to Python 3
-as well. See the Jira issue for details.
-
-This patch includes also a small patch that was mentioned as
-necessary for Python 3.9: Python issue 40217. I have seen no
-effect of this change yet but applied the patch, anyway.
-
-Origin: https://codereview.qt-project.org/c/pyside/pyside-setup/+/328046
----
- sources/shiboken2/libshiboken/basewrapper.cpp | 12 ++++++++++--
- 1 file changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/sources/shiboken2/libshiboken/basewrapper.cpp b/sources/shiboken2/libshiboken/basewrapper.cpp
-index d866d13..b38fb3a 100644
---- a/sources/shiboken2/libshiboken/basewrapper.cpp
-+++ b/sources/shiboken2/libshiboken/basewrapper.cpp
-@@ -319,6 +319,11 @@ static int SbkObject_traverse(PyObject *self, visitproc visit, void *arg)
- 
-     if (sbkSelf->ob_dict)
-         Py_VISIT(sbkSelf->ob_dict);
-+
-+#if PY_VERSION_HEX >= 0x03090000
-+    // This was not needed before Python 3.9 (Python issue 35810 and 40217)
-+    Py_VISIT(Py_TYPE(self));
-+#endif
-     return 0;
- }
- 
-@@ -769,12 +774,15 @@ PyObject *SbkQAppTpNew(PyTypeObject *subtype, PyObject *, PyObject *)
-     // PYSIDE-560:
-     // We avoid to use this in Python 3, because we have a hard time to get
-     // write access to these flags
--#ifndef IS_PY3K
-+
-+    // PYSIDE-1447:
-+    // Since Python 3.8, we have the same weird flags handling in Python 3.8
-+    // as well. The singleton Python is no longer needed and we could remove
-+    // the whole special handling, maybe in another checkin.
-     if (PyType_HasFeature(subtype, Py_TPFLAGS_HAVE_GC)) {
-         subtype->tp_flags &= ~Py_TPFLAGS_HAVE_GC;
-         subtype->tp_free = PyObject_Del;
-     }
--#endif
-     auto self = reinterpret_cast<SbkObject *>(MakeQAppWrapper(subtype));
-     return self == nullptr ? nullptr : _setupNew(self, subtype);
- }
diff --git a/debian/patches/series b/debian/patches/series
index d07fb736..91c2f4ac 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,11 +1,4 @@
 update-sip-import.patch
 fix-spelling-errors.patch
 blacklist-failing-tests.patch
-fix-reuse-build.patch
-qApp-fix-flag-handling.patch
-py3.10-prep-reset-the-type-cache-after-feature-switching.patch
-py3.10-prep-Fix-parser.py-for-changed-typing-module.patch
-py3.10-prep-Finally-support-Python-3.10.patch
-py3.10-prep-Fix-a-very-old-refcounting-error-in-time_test.patch
-shiboken6-Adapt-to-LLVM-12.01.patch
 test-with-current-interpreter.patch
diff --git a/debian/patches/shiboken6-Adapt-to-LLVM-12.01.patch b/debian/patches/shiboken6-Adapt-to-LLVM-12.01.patch
deleted file mode 100644
index 8b2f593b..00000000
--- a/debian/patches/shiboken6-Adapt-to-LLVM-12.01.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From: Friedemann Kleint <Friedemann.Kleint at qt.io>
-Date: Tue, 12 Oct 2021 09:33:53 +0200
-Subject: shiboken6: Adapt to LLVM 12.01
-
-The identifier for anonymous enums has been changed, causing
-shiboken to no longer recognize them.
-
-(cherry picked from commit 1948a1b6f9a3547ba9fba9b8c525eb6e1c6b4f13)
----
- sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp b/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp
-index 73b1aca..c6f3bb8 100644
---- a/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp
-+++ b/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp
-@@ -887,8 +887,10 @@ static QString enumType(const CXCursor &cursor)
-         // PYSIDE-1228: For "typedef enum { v1, v2 } Foo;", type will return
-         // "Foo" as expected. Care must be taken to exclude real anonymous enums.
-         name = getTypeName(clang_getCursorType(cursor));
--        if (name.contains(QLatin1String("(anonymous")))
-+        if (name.contains(u"(unnamed") // Clang 12.0.1
-+            || name.contains(u"(anonymous")) { // earlier
-             name.clear();
-+        }
-     }
-     return name;
- }



More information about the Neon-commits mailing list