From 6eba1c4e5cd44dde936fb2dac3d65879415ed95a Mon Sep 17 00:00:00 2001 From: Christian Tismer 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. [ChangeLog][PySide6] Support Python 3.10. This is by 99% solved. Looking for a crash with unknown origin. Fixes: PYSIDE-1436 Change-Id: I94cffa7ed16a2651e09924fe5babc188b1b4c2b8 Reviewed-by: Christian Tismer (cherry picked from commit 81e9cff884d6b03cdf64a5dd6ec6564d99177e0c) Reviewed-by: Cristian Maureira-Fredes --- sources/pyside2/tests/QtWidgets/signature_test.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sources/pyside2/tests/QtWidgets/signature_test.py') diff --git a/sources/pyside2/tests/QtWidgets/signature_test.py b/sources/pyside2/tests/QtWidgets/signature_test.py index 57fcf3874..cacb576d7 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) -- cgit v1.2.3