Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package FreeCAD for openSUSE:Factory checked in at 2022-03-07 17:46:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/FreeCAD (Old) and /work/SRC/openSUSE:Factory/.FreeCAD.new.1958 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "FreeCAD" Mon Mar 7 17:46:46 2022 rev:35 rq:959753 version:0.19.4 Changes: -------- --- /work/SRC/openSUSE:Factory/FreeCAD/FreeCAD.changes 2022-02-09 20:40:03.710499654 +0100 +++ /work/SRC/openSUSE:Factory/.FreeCAD.new.1958/FreeCAD.changes 2022-03-07 17:47:01.627118353 +0100 @@ -1,0 +2,16 @@ +Fri Mar 4 18:16:46 UTC 2022 - Stefan Br??ns <stefan.bru...@rwth-aachen.de> + +- Add some unit test fixes: + * 0001-Test-remove-not-needed-u-before-py3-unicode-string.patch + * 0001-Test-fix-exception-handling-in-tests-for-units.patch + * 0001-Test-Provide-more-useful-information-when-unit-trans.patch + * 0002-Base-Fix-wrong-character-encoding-for-micro-siemens.patch + +------------------------------------------------------------------- +Thu Mar 3 17:42:20 UTC 2022 - Stefan Br??ns <stefan.bru...@rwth-aachen.de> + +- Update to version 0.19.4: + * Lots of bugfixes, for details see + https://github.com/FreeCAD/FreeCAD/releases/tag/0.19.4 + +------------------------------------------------------------------- Old: ---- FreeCAD-0.19.3.tar.gz New: ---- 0001-Test-Provide-more-useful-information-when-unit-trans.patch 0001-Test-fix-exception-handling-in-tests-for-units.patch 0001-Test-remove-not-needed-u-before-py3-unicode-string.patch 0002-Base-Fix-wrong-character-encoding-for-micro-siemens.patch FreeCAD-0.19.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ FreeCAD-test.spec ++++++ --- /var/tmp/diff_new_pack.WmmsI6/_old 2022-03-07 17:47:05.335117281 +0100 +++ /var/tmp/diff_new_pack.WmmsI6/_new 2022-03-07 17:47:05.339117281 +0100 @@ -17,12 +17,12 @@ Name: FreeCAD-test -Version: 0.19.3 +Version: 0.19.4 Release: 0 Summary: Meta source package that runs the FreeCAD testsuite when built License: GPL-2.0-or-later AND LGPL-2.0-or-later Group: Productivity/Graphics/CAD -URL: http://www.freecadweb.org/ +URL: https://www.freecadweb.org/ BuildRequires: FreeCAD = %{version} %if 0%{?suse_version} > 1500 BuildRequires: gmsh @@ -40,7 +40,7 @@ python3 -c "\ import FreeCAD import unittest -print(FreeCAD.__unit_test__) +print(FreeCAD.__unit_test__, file=sys.stderr) results = {} for name in FreeCAD.__unit_test__: suite = unittest.TestSuite() @@ -53,8 +53,8 @@ totalerrors = 0 totalfailures = 0 for [name,res] in results.items(): - print(name) - print(res) + print(name, file=sys.stderr) + print(res, file=sys.stderr) totalerrors += len(res.errors) totalfailures += len(res.failures) ++++++ FreeCAD.spec ++++++ --- /var/tmp/diff_new_pack.WmmsI6/_old 2022-03-07 17:47:05.363117273 +0100 +++ /var/tmp/diff_new_pack.WmmsI6/_new 2022-03-07 17:47:05.367117273 +0100 @@ -27,7 +27,7 @@ %bcond_without smesh Name: FreeCAD -Version: 0.19.3 +Version: 0.19.4 Release: 0 Summary: General Purpose 3D CAD Modeler License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -38,6 +38,13 @@ Patch1: fix_unittestgui_tkinter_py3.patch # PATCH-FIX-UPSTREAM Rebased https://github.com/wwmayer/FreeCAD/commit/bb9bcbd51df7 Patch2: fix-smesh-vtk9.patch +# PATCH-FIX-UPSTREAM +Patch3: 0001-Test-remove-not-needed-u-before-py3-unicode-string.patch +# PATCH-FIX-UPSTREAM +Patch4: 0001-Test-fix-exception-handling-in-tests-for-units.patch +# PATCH-FIX-UPSTREAM +Patch5: 0001-Test-Provide-more-useful-information-when-unit-trans.patch +Patch6: 0002-Base-Fix-wrong-character-encoding-for-micro-siemens.patch # Test suite fails on 32bit and I don't want to debug that anymore ExcludeArch: %ix86 %arm ppc s390 s390x @@ -144,14 +151,6 @@ src/Mod/TechDraw/TDTest/D*Test.py \ src/Mod/Test/testmakeWireString.py -# Fix "non-executable-script" rpmlint warning -chmod 755 src/Mod/AddonManager/AddonManager.py \ - src/Mod/Robot/KukaExporter.py \ - src/Mod/Robot/MovieTool.py \ - src/Mod/Spreadsheet/importXLSX.py \ - src/Mod/TechDraw/TDTest/D*Test.py \ - src/Mod/Test/testmakeWireString.py - # Fix "wrong-script-end-of-line-encoding" rpmlint warning sed -i 's/\r$//' src/Mod/Mesh/App/MeshTestsApp.py sed -i 's/\r$//' src/Mod/Part/MakeBottle.py @@ -178,6 +177,7 @@ -DCMAKE_INSTALL_DOCDIR=%{_docdir}/%{name} \ -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}/%{name} \ -DCMAKE_SKIP_RPATH:BOOL=OFF \ + -DCMAKE_SKIP_INSTALL_RPATH:BOOL=OFF \ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON \ -DOCC_INCLUDE_DIR=%{_includedir}/opencascade \ -DRESOURCEDIR=%{_datadir}/%{name} \ @@ -225,6 +225,15 @@ " rm parser.out +# Fix "non-executable-script" rpmlint warning +# Run after install, as CMake "install(FILES...) sets rw- permissions +chmod 755 %{buildroot}%{_libdir}/FreeCAD/Mod/AddonManager/AddonManager.py \ + %{buildroot}%{_libdir}/FreeCAD/Mod/Robot/KukaExporter.py \ + %{buildroot}%{_libdir}/FreeCAD/Mod/Robot/MovieTool.py \ + %{buildroot}%{_libdir}/FreeCAD/Mod/Spreadsheet/importXLSX.py \ + %{buildroot}%{_libdir}/FreeCAD/Mod/TechDraw/TDTest/D*Test.py \ + %{buildroot}%{_libdir}/FreeCAD/Mod/Test/testmakeWireString.py + %suse_update_desktop_file -r org.freecadweb.FreeCAD Education Engineering # Remove unneeded files ++++++ 0001-Test-Provide-more-useful-information-when-unit-trans.patch ++++++ >From 68c7f70b7b6b01fdcac2f746e19cff7e71e24ed8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bru...@rwth-aachen.de> Date: Fri, 4 Mar 2022 19:14:15 +0100 Subject: [PATCH 1/2] Test: Provide more useful information when unit translation fails Add the input quantity and the target scheme to the exception output. Also make the output formatting more canonical and remove the unused "s" temporary. --- src/Mod/Test/UnitTests.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Mod/Test/UnitTests.py b/src/Mod/Test/UnitTests.py index a77239977f..4726e46037 100644 --- a/src/Mod/Test/UnitTests.py +++ b/src/Mod/Test/UnitTests.py @@ -121,14 +121,13 @@ class UnitBasicCases(unittest.TestCase): q1 = FreeCAD.Units.Quantity(q1) q1.Format = {'Precision': 16} for idx, val in enumerate(schemes): - t = FreeCAD.Units.schemaTranslate(q1, idx) + [t, amountPerUnit, unit] = FreeCAD.Units.schemaTranslate(q1, idx) try: - q2 = FreeCAD.Units.Quantity(t[0]) + q2 = FreeCAD.Units.Quantity(t) if math.fabs(q1.Value - q2.Value) > 0.01: print (" {} : {} : {} : {} : {}".format(q1, q2, t, i, val).encode("utf-8").strip()) except Exception as e: - s = "{}: {}".format(e, t[0]) - print (" ".join(str(e)).encode("utf-8").strip()) + print ("{} : {} : {} : {}".format(q1, i, val, e).encode("utf-8").strip()) def testVoltage(self): q1 = FreeCAD.Units.Quantity("1e20 V") -- 2.35.1 ++++++ 0001-Test-fix-exception-handling-in-tests-for-units.patch ++++++ >From 73307991550f57da9504237581b03faf9bcc0824 Mon Sep 17 00:00:00 2001 From: wmayer <wma...@users.sourceforge.net> Date: Tue, 25 Jan 2022 20:20:46 +0100 Subject: [PATCH] Test: fix exception handling in tests for units --- src/Mod/Test/UnitTests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Test/UnitTests.py b/src/Mod/Test/UnitTests.py index e9006455a0..9228684250 100644 --- a/src/Mod/Test/UnitTests.py +++ b/src/Mod/Test/UnitTests.py @@ -128,7 +128,7 @@ class UnitBasicCases(unittest.TestCase): print (" {} : {} : {} : {} : {}".format(q1, q2, t, i, val).encode("utf-8").strip()) except Exception as e: s = "{}: {}".format(e, t[0]) - print (" ".join(e).encode("utf-8").strip()) + print (" ".join(str(e)).encode("utf-8").strip()) def testVoltage(self): q1 = FreeCAD.Units.Quantity("1e20 V") -- 2.35.1 ++++++ 0001-Test-remove-not-needed-u-before-py3-unicode-string.patch ++++++ >From 70c5505a75ad545cb671eb73f29d5e1626aebf78 Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach <be...@bimstatik.org> Date: Wed, 22 Sep 2021 08:06:47 +0200 Subject: [PATCH] Test: remove not needed u before py3 unicode string --- src/Mod/Test/UnitTests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/Test/UnitTests.py b/src/Mod/Test/UnitTests.py index 6584ae6fc5..5c6ffea7e6 100644 --- a/src/Mod/Test/UnitTests.py +++ b/src/Mod/Test/UnitTests.py @@ -125,10 +125,10 @@ class UnitBasicCases(unittest.TestCase): try: q2 = FreeCAD.Units.Quantity(t[0]) if math.fabs(q1.Value - q2.Value) > 0.01: - print (u" {} : {} : {} : {} : {}".format(q1,q2, t, i, val).encode("utf-8").strip()) + print (" {} : {} : {} : {} : {}".format(q1, q2, t, i, val).encode("utf-8").strip()) except Exception as e: s = "{}: {}".format(e, t[0]) - print (u" ".join(e).encode("utf-8").strip()) + print (" ".join(e).encode("utf-8").strip()) def testVoltage(self): q1 = FreeCAD.Units.Quantity("1e20 V") -- 2.35.1 ++++++ 0002-Base-Fix-wrong-character-encoding-for-micro-siemens.patch ++++++ >From a8b903511fead24ac61543ca129eb0737fa2327f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bru...@rwth-aachen.de> Date: Sat, 5 Mar 2022 00:26:11 +0100 Subject: [PATCH 2/2] Base: Fix wrong character encoding for micro-siemens Contrary to any other Unit with micro prefix (e.g. ug, uH, uF) the string was created with a Latin1 encoding instead of UTF-8. The problem can be verified with these python statements: ``` FreeCAD.Units.schemaTranslate(FreeCAD.Units.MicroSiemens, 0) FreeCAD.Units.schemaTranslate(FreeCAD.Units.MicroGram, 0) ``` --- src/Base/UnitsSchemaInternal.cpp | 2 +- src/Base/UnitsSchemaMKS.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Base/UnitsSchemaInternal.cpp b/src/Base/UnitsSchemaInternal.cpp index 69b65fa9fc..78ea82a6eb 100644 --- a/src/Base/UnitsSchemaInternal.cpp +++ b/src/Base/UnitsSchemaInternal.cpp @@ -351,7 +351,7 @@ QString UnitsSchemaInternal::schemaTranslate(const Quantity &quant, double &fact } else if (unit == Unit::ElectricalConductance) { if (UnitValue < 1e-9) { - unitString = QString::fromLatin1("\xC2\xB5S"); + unitString = QString::fromUtf8("\xC2\xB5S"); factor = 1e-12; } else if (UnitValue < 1e-6) { diff --git a/src/Base/UnitsSchemaMKS.cpp b/src/Base/UnitsSchemaMKS.cpp index 11d23d7d0b..795b7afc54 100644 --- a/src/Base/UnitsSchemaMKS.cpp +++ b/src/Base/UnitsSchemaMKS.cpp @@ -299,7 +299,7 @@ QString UnitsSchemaMKS::schemaTranslate(const Quantity &quant, double &factor, Q } else if (unit == Unit::ElectricalConductance) { if (UnitValue < 1e-9) { - unitString = QString::fromLatin1("\xC2\xB5S"); + unitString = QString::fromUtf8("\xC2\xB5S"); factor = 1e-12; } else if (UnitValue < 1e-6) { -- 2.35.1 ++++++ FreeCAD-0.19.3.tar.gz -> FreeCAD-0.19.4.tar.gz ++++++ /work/SRC/openSUSE:Factory/FreeCAD/FreeCAD-0.19.3.tar.gz /work/SRC/openSUSE:Factory/.FreeCAD.new.1958/FreeCAD-0.19.4.tar.gz differ: char 28, line 1