From 01e2412f934204d459fdedbe3f1d4b423dc0be62 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Fri, 22 Dec 2023 10:01:04 -0500 Subject: [PATCH 01/12] 5.6.0 --- python-uranium.spec | 2 +- sources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python-uranium.spec b/python-uranium.spec index 6494dcb..6c990b6 100644 --- a/python-uranium.spec +++ b/python-uranium.spec @@ -1,5 +1,5 @@ Name: python-uranium -Version: 5.4.0 +Version: 5.6.0 Release: %autorelease Summary: A Python framework for building desktop applications License: LGPL-3.0-or-later diff --git a/sources b/sources index 6fdedc9..83c2296 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Uranium-5.4.0.tar.gz) = 47575482a5ac5ea9ea0d69f87698fd434d8ce5fbf20b84583476f27129694e52bb21db3df4dd66d5935e4e9dd14c5e5332db3370822c76af9b9e95c1a828bc45 +SHA512 (Uranium-5.6.0.tar.gz) = 575beb75cd73d50f85ff14fc5e5d90883f45ffc5c400dd1dcf2936e37780ab961c70da312c0a7cd856ee9c9cb8b3c4f8299488a8449e698c1c65354e7df14f19 From 64a88dcb02dfe4a1b7106ca4ec89c7c1561dcf11 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 22 Jan 2024 08:41:51 +0000 Subject: [PATCH 02/12] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From fe5ae4588119a8836104563832cfa55371f41494 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 26 Jan 2024 12:24:49 +0000 Subject: [PATCH 03/12] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From e07acba2f5b780cfdecccfe035eaecd17f10585e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 16 Apr 2024 12:52:42 +0200 Subject: [PATCH 04/12] Fix build with pytest 8 - Fixes: rhbz#2275262 --- Uranium-5.6.0-pytest8.patch | 53 +++++++++++++++++++++++++++++++++++++ python-uranium.spec | 3 +++ 2 files changed, 56 insertions(+) create mode 100644 Uranium-5.6.0-pytest8.patch diff --git a/Uranium-5.6.0-pytest8.patch b/Uranium-5.6.0-pytest8.patch new file mode 100644 index 0000000..b349282 --- /dev/null +++ b/Uranium-5.6.0-pytest8.patch @@ -0,0 +1,53 @@ +From dd2c31bc0f38d11c8351d89fae3d92cd12da885e Mon Sep 17 00:00:00 2001 +From: Remco Burema +Date: Wed, 21 Feb 2024 11:39:49 +0100 +Subject: [PATCH 1/3] Protobuf version mismatch caused tests,builds to fail. + +--- + 1 file changed, 1 insertion(+) + +diff --git a/tests/conftest.py b/tests/conftest.py +index 4fcd4cefd..4f500fabc 100644 +--- a/tests/conftest.py ++++ b/tests/conftest.py +@@ -59,3 +59,17 @@ def upgrade_manager(application): + upgrade_manager = VersionUpgradeManager(application) + return upgrade_manager + ++def pytest_collection_modifyitems(items): ++ """ Modifies test items in place to ensure test classes run in a given order. ++ See: https://stackoverflow.com/questions/70738211/run-pytest-classes-in-custom-order/70758938#70758938 ++ """ ++ CLASS_ORDER = ["TestActiveToolProxy"] # All classes that need to be run in-order, in that order -- all others will run _before_. ++ class_mapping = {item: item.cls.__name__ for item in items} ++ ++ sorted_items = items.copy() ++ # Iteratively move tests of each class to the end of the test queue ++ for class_ in CLASS_ORDER: ++ sorted_items = [it for it in sorted_items if class_mapping[it] != class_] + [ ++ it for it in sorted_items if class_mapping[it] == class_ ++ ] ++ items[:] = sorted_items + +From cd4eb2cf8c450c23a3f2d42619ee36ec93d49a6d Mon Sep 17 00:00:00 2001 +From: Remco Burema +Date: Wed, 21 Feb 2024 16:22:24 +0100 +Subject: [PATCH 3/3] Not all our tests are classes. + +--- + tests/conftest.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/conftest.py b/tests/conftest.py +index 4f500fabc..d26f2545a 100644 +--- a/tests/conftest.py ++++ b/tests/conftest.py +@@ -64,7 +64,7 @@ def pytest_collection_modifyitems(items): + See: https://stackoverflow.com/questions/70738211/run-pytest-classes-in-custom-order/70758938#70758938 + """ + CLASS_ORDER = ["TestActiveToolProxy"] # All classes that need to be run in-order, in that order -- all others will run _before_. +- class_mapping = {item: item.cls.__name__ for item in items} ++ class_mapping = {item: (item.cls.__name__ if item.cls else "") for item in items} + + sorted_items = items.copy() + # Iteratively move tests of each class to the end of the test queue diff --git a/python-uranium.spec b/python-uranium.spec index 6c990b6..8f5b9ea 100644 --- a/python-uranium.spec +++ b/python-uranium.spec @@ -8,6 +8,9 @@ Source: %{url}/archive/%{version}.tar.gz#/Uranium-%{version}.tar.gz Patch: Uranium-5.3.0-qt-try-ints-then-bytes-for-gl-mask-functions.patch # Fix asserts for called once in Python 3.12: Patch: https://github.com/Ultimaker/Uranium/pull/885.patch#/Uranium-5.3.0-python3.12.patch +# Force test order to fix FTBFS with pytest 8 +# From https://github.com/Ultimaker/Uranium/pull/941 +Patch: Uranium-5.6.0-pytest8.patch # Cmake bits taken from 4.13.1, before upstream went nuts with conan Source2: mod_bundled_packages_json.py From f91ab354fdcb1cb95012d1a635946d479b3fad63 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Sun, 9 Jun 2024 11:39:19 +0200 Subject: [PATCH 05/12] Rebuilt for Python 3.13 From ed9dbd1cee802e6ca21b9bb7297e1e49ecb79550 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jul 2024 16:49:30 +0000 Subject: [PATCH 06/12] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 50548985271d3679740cba348f30fafb1771b9ca Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 18 Jan 2025 20:27:18 +0000 Subject: [PATCH 07/12] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From d819907fcf95e36a6b47658fc34dbd1d4da78882 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 26 May 2025 12:25:54 +0200 Subject: [PATCH 08/12] Fix for Python 3.14 --- 997.patch | 90 +++++++++++++++++++++++++++++++++++++++++++++ python-uranium.spec | 2 + 2 files changed, 92 insertions(+) create mode 100644 997.patch diff --git a/997.patch b/997.patch new file mode 100644 index 0000000..692633a --- /dev/null +++ b/997.patch @@ -0,0 +1,90 @@ +From fd201d1c12f9148b267a3a46353ef8110b8385a4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Mon, 26 May 2025 12:22:59 +0200 +Subject: [PATCH] Access ast.Constant.value, not .s -- the latter is gone from + Python 3.14+ + +Followup for https://github.com/Ultimaker/Uranium/issues/498 + +Test failures this fixes: + + _____________________________ test_init_good["x"] ______________________________ + + setting_function_good = + + def test_init_good(setting_function_good): + assert setting_function_good is not None + > assert setting_function_good.isValid() + E assert False + E + where False = isValid() + E + where isValid = .isValid + + tests/Settings/TestSettingFunction.py:64: AssertionError + ---------------------------- Captured stdout setup ----------------------------- + [MainThread] UM.Settings.SettingFunction._safeCompile [80]: Exception in function ('Constant' object has no attribute 's') for setting: "x" + _______________________________ test_call[data1] _______________________________ + + data = {'code': '"x"', 'result': 'x'} + + @pytest.mark.parametrize("data", test_call_data) + def test_call(data): + value_provider = MockValueProvider() + function = SettingFunction(data["code"]) + > assert function(value_provider) == data["result"] + E assert None == 'x' + E + where None = () + + tests/Settings/TestSettingFunction.py:115: AssertionError + ----------------------------- Captured stdout call ----------------------------- + [MainThread] UM.Settings.SettingFunction._safeCompile [80]: Exception in function ('Constant' object has no attribute 's') for setting: "x" + _________________________ test_getUsedSettings[data1] __________________________ + + data = {'code': '"x"', 'variables': ['x']} + + @pytest.mark.parametrize("data", test_getUsedSettings_data) + def test_getUsedSettings(data): + function = SettingFunction(data["code"]) + answer = function.getUsedSettingKeys() + > assert len(answer) == len(data["variables"]) + E AssertionError: assert 0 == 1 + E + where 0 = len(frozenset()) + E + and 1 = len(['x']) + + tests/Settings/TestSettingFunction.py:159: AssertionError + ----------------------------- Captured stdout call ----------------------------- + [MainThread] UM.Settings.SettingFunction._safeCompile [80]: Exception in function ('Constant' object has no attribute 's') for setting: "x" + _________________________ test_getUsedSettings[data7] __________________________ + + data = {'code': "sqrt('x')", 'variables': ['x']} + + @pytest.mark.parametrize("data", test_getUsedSettings_data) + def test_getUsedSettings(data): + function = SettingFunction(data["code"]) + answer = function.getUsedSettingKeys() + > assert len(answer) == len(data["variables"]) + E AssertionError: assert 0 == 1 + E + where 0 = len(frozenset()) + E + and 1 = len(['x']) + + tests/Settings/TestSettingFunction.py:159: AssertionError + ----------------------------- Captured stdout call ----------------------------- + [MainThread] UM.Settings.SettingFunction._safeCompile [80]: Exception in function ('Constant' object has no attribute 's') for setting: sqrt('x') +--- + UM/Settings/SettingFunction.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/UM/Settings/SettingFunction.py b/UM/Settings/SettingFunction.py +index 194087a00..5f3240cb6 100644 +--- a/UM/Settings/SettingFunction.py ++++ b/UM/Settings/SettingFunction.py +@@ -274,8 +274,8 @@ def visit_Constant(self, node) -> None: + + if node.value in self._blacklist: + raise IllegalMethodError(node.value) +- if node.s.startswith("_"): +- raise IllegalMethodError(node.s) ++ if node.value.startswith("_"): ++ raise IllegalMethodError(node.value) + if node.value not in self._knownNames and node.value not in dir(builtins): # type: ignore #AST uses getattr stuff, so ignore type of node.value. + self.keys.add(node.value) # type: ignore + diff --git a/python-uranium.spec b/python-uranium.spec index 8f5b9ea..693470e 100644 --- a/python-uranium.spec +++ b/python-uranium.spec @@ -11,6 +11,8 @@ Patch: https://github.com/Ultimaker/Uranium/pull/885.patch#/Uranium-5.3 # Force test order to fix FTBFS with pytest 8 # From https://github.com/Ultimaker/Uranium/pull/941 Patch: Uranium-5.6.0-pytest8.patch +# Fix for Python 3.14 +Patch: https://github.com/Ultimaker/Uranium/pull/997.patch # Cmake bits taken from 4.13.1, before upstream went nuts with conan Source2: mod_bundled_packages_json.py From b2b05a263151a1d205ee5b82593ed67d3ccbe6b4 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 17 Jun 2025 21:48:51 +0200 Subject: [PATCH 09/12] Rebuilt for Python 3.14 From 84e3ae96e0f451f99f88edb063985193bb4c077d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 10:58:43 +0000 Subject: [PATCH 10/12] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From c3895cf10c5bd8904aea9ae80be3df5b6202b52a Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 15:05:44 +0200 Subject: [PATCH 11/12] Rebuilt for Python 3.14.0rc2 bytecode From e0d6dffa10bfe38e1bc15813b57e6c2524df5c97 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 14:42:01 +0200 Subject: [PATCH 12/12] Rebuilt for Python 3.14.0rc3 bytecode