Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-wxPython for openSUSE:Factory checked in at 2022-08-17 18:16:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-wxPython (Old) and /work/SRC/openSUSE:Factory/.python-wxPython.new.1521 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-wxPython" Wed Aug 17 18:16:32 2022 rev:14 rq:995040 version:4.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-wxPython/python-wxPython.changes 2022-01-05 15:44:36.438258964 +0100 +++ /work/SRC/openSUSE:Factory/.python-wxPython.new.1521/python-wxPython.changes 2022-08-17 18:26:30.119635680 +0200 @@ -1,0 +2,35 @@ +Sat Aug 13 23:03:31 UTC 2022 - Stefan Br??ns <stefan.bru...@rwth-aachen.de> + +- Update to relase 4.2.0, matching wxWidgets 3.2.0 + For a detailed changelog, see + https://www.wxpython.org/news/2022-08-07-wxpython-411-release/index.html +- Drop patch obsoleted by upstream changes: + * 0002-SIP-6.5-compat.patch +- Do not depend on pip for downloading in wxget, add + 0003-Make-pip-usage-in-wxget-optional.patch +- Fix a wrong type size on 32 bit archs, add + 0004-Fix-time_t-ETG-typedef-extend-DateTime.FromTimeT-tes.patch + +------------------------------------------------------------------- +Sun Jun 26 13:46:42 UTC 2022 - Stefan Br??ns <stefan.bru...@rwth-aachen.de> + +- Update to current git version for wxWidgets 3.1.6/3.1.7 + compatibility. +- Drop upstream patches: + * fix_no_return_in_nonvoid.patch + * wxPython-4.1.1-fix-overrides.patch + * 2039-bunch-py310-fixes.patch + * additional-310-fixes.patch +- Regenerate bindings from wxWidgets 3.1.7 code +- Allow SIP generation with SIP 6.x < 6.6, + * 0001-Only-import-attrdict-where-needed.patch + * 0002-SIP-6.5-compat.patch +- Add patches for test suite (pending): + * 0001-Check-HSV-values-in-image-test.patch + * 0001-Fix-overflow-check-for-wxUIntPtr-type.patch +- Add some more dependencies required for the test suite +- Disable some tests which can not succeed +- Enable test suite by default +- Do not ship copy of wxWidgets locale + +------------------------------------------------------------------- Old: ---- 2039-bunch-py310-fixes.patch additional-310-fixes.patch fix_no_return_in_nonvoid.patch wxPython-4.1.1-fix-overrides.patch wxPython-4.1.1.tar.gz New: ---- 0001-Check-HSV-values-in-image-test.patch 0001-Fix-overflow-check-for-wxUIntPtr-type.patch 0001-Only-import-attrdict-where-needed.patch 0003-Make-pip-usage-in-wxget-optional.patch 0004-Fix-time_t-ETG-typedef-extend-DateTime.FromTimeT-tes.patch wxPython-4.2.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-wxPython.spec ++++++ --- /var/tmp/diff_new_pack.7WX52N/_old 2022-08-17 18:26:31.531639165 +0200 +++ /var/tmp/diff_new_pack.7WX52N/_new 2022-08-17 18:26:31.535639175 +0200 @@ -17,8 +17,13 @@ %define X_display ":98" -%bcond_with test +%bcond_without test %bcond_without syswx +# We rebuild the ETG and SIP files for two reasons: +# - Fixing a bug in the ETG time_t typedef (see patch) +# - Compatibility with SIP 6.5.x, for Leap 15.x +%bcond_without rebuild_sip + %if %{with syswx} %define wx_args --use_syswx --gtk3 -v %else @@ -40,9 +45,6 @@ # Extraneous build_flavors and skips are excluded automatically so future # additions can be included here early and old flavors can be removed some time # after the global drop in Factory. -%if "%flavor" != "python36" -%define skip_python36 1 -%endif %if "%flavor" != "python38" %define skip_python38 1 %endif @@ -52,6 +54,9 @@ %if "%flavor" != "python310" %define skip_python310 1 %endif +%if "%flavor" != "python311" +%define skip_python311 1 +%endif %else # SLE/Leap: python3 only %if "%flavor" != "python3" @@ -76,7 +81,7 @@ %endif Name: %{pprefix}-wxPython -Version: 4.1.1 +Version: 4.2.0 Release: 0 Summary: The "Phoenix" variant of the wxWidgets Python bindings License: GPL-2.0-or-later @@ -84,18 +89,18 @@ URL: https://github.com/wxWidgets/Phoenix Source: https://files.pythonhosted.org/packages/source/w/wxPython/wxPython-%{version}.tar.gz Source1: python-wxPython-rpmlintrc -# PATCH-FIX-OPENSUSE fix_no_return_in_nonvoid.patch -- Fix lack of return in nonvoid functions -Patch0: fix_no_return_in_nonvoid.patch # PATCH-FIX-OPENSUSE Patch1: use_stl_build.patch -# PATCH-FIX-UPSTREAM wxPython-4.1.1-fix-overrides.patch -- Fix build with wxWidgets 3.1.5 (gh#wxWidgets/Phoenix#1909) -Patch2: wxPython-4.1.1-fix-overrides.patch -# PATCH-FIX-UPSTREAM 2039-bunch-py310-fixes.patch gh#wxWidgets/Phoenix#2039 mc...@suse.com -# Fix a bunch of Python 3.10 issues with pure-Python classes and demos -Patch3: 2039-bunch-py310-fixes.patch -# PATCH-FIX-UPSTREAM additional-310-fixes.patch bsc#[0-9]+ mc...@suse.com -# collection of patches: -Patch4: additional-310-fixes.patch +# PATCH-FIX-UPSTREAM +Patch2: 0001-Only-import-attrdict-where-needed.patch +# PATCH-FIX-UPSTREAM - https://github.com/wxWidgets/Phoenix/pull/2232 +Patch4: 0003-Make-pip-usage-in-wxget-optional.patch +# PATCH-FIX-OPENSUSE +Patch5: 0004-Fix-time_t-ETG-typedef-extend-DateTime.FromTimeT-tes.patch +# PATCH-FIX-OPENSUSE - Test fixes/additions: +Patch112: 0001-Check-HSV-values-in-image-test.patch +# PATCH-FIX-UPSTREAM - https://github.com/wxWidgets/Phoenix/pull/2233 +Patch113: 0001-Fix-overflow-check-for-wxUIntPtr-type.patch BuildRequires: %{python_module base} BuildRequires: %{python_module devel} BuildRequires: %{python_module requests} @@ -105,7 +110,10 @@ BuildRequires: pkgconfig BuildRequires: python-rpm-macros %if %{with syswx} -BuildRequires: wxGTK3-devel >= 3.1.5 +BuildRequires: %{python_module sip6-devel >= 6.5.1} +BuildRequires: waf +BuildRequires: wxGTK3-devel >= 3.2.0 +BuildRequires: wxWidgets-3_2-doc-xml >= 3.2.0 %else BuildRequires: freeglut-devel BuildRequires: gstreamer-plugins-base-devel @@ -141,9 +149,10 @@ BuildRequires: %{python_module pytest-xdist} BuildRequires: %{python_module pytest} BuildRequires: %{python_module six} +BuildRequires: Mesa-dri # Need at least one font installed BuildRequires: google-opensans-fonts -BuildRequires: wxWidgets-lang +# BuildRequires: wxWidgets-lang BuildRequires: xorg-x11-server BuildRequires: pkgconfig(cppunit) %endif @@ -175,6 +184,13 @@ %prep %autosetup -n wxPython-%{version} -p1 +# Lower minimum Python version +sed -i -e '/check_python_version/ s@3,7,0@3,6,0@' wscript + +# Reuse locale from wxWidgets package +%if %{with syswx} +rm -Rf wx/locale +%endif sed -i -e '/^#!\//, 1d' wx/py/*.py sed -i -e '/^#!\//, 1d' wx/tools/*.py @@ -183,7 +199,30 @@ %build export CFLAGS="%{optflags}" + +%if %{with rebuild_sip} +# Save LICENSE* files from bundled siplib +mv sip/siplib{,_old} + export DOXYGEN=%{_bindir}/doxygen +export SIP=%{_bindir}/sip +export WAF=%{_bindir}/waf +mkdir -p /tmp/wxxml/docs/doxygen/out/ +rm -f /tmp/wxxml/docs/doxygen/out/xml +cp ext/wxWidgets/docs/*.txt /tmp/wxxml/docs/ +ln -sf %{_docdir}/wxWidgets*doc-xml /tmp/wxxml/docs/doxygen/out/xml +export WXWIN=/tmp/wxxml/ + +%python_exec build.py touch %{wx_args} +%python_exec build.py etg --nodoc %{wx_args} +%python_exec build.py sip %{wx_args} +cp sip/siplib_old/LICENSE* sip/siplib/ +if [ ! -e sip/siplib/sip_array.c ]; then + cp sip/siplib/{,sip_}array.c + cp sip/siplib/{,sip_}array.h +fi +%endif + %python_exec build.py build %{wx_args} %install @@ -204,7 +243,9 @@ %python_clone -a %{buildroot}%{_bindir}/wxdocs %python_clone -a %{buildroot}%{_bindir}/wxget +%if %{without syswx} %find_lang wxstd +%endif %check %if %{with test} @@ -225,8 +266,13 @@ %pytest_arch --forked -n 1 -k 'test_uiaction or test_mousemanager' unittests/ # Skip Auto ID management test (only enabled on Windows) # Skip Frame restore (requires a window manager) +# Skip Locale.GetString, we do not ship translations for wxWidgets-3_2 +# Skip wx.lib.pubsub, fails due to PYTHONDONTWRITEBYTECODE, also deprecated for pypubsub # Skip UiAction tests (already done) -%pytest_arch --forked -n auto -k '(not test_newIdRef03) and (not test_uiaction) and (not test_mousemanager) and (not test_frameRestore)' unittests/ +%{pytest_arch --forked -n 4 -k \ + '(not test_newIdRef03) and (not test_uiaction) and (not test_mousemanager) and (not test_frameRestore) and (not test_intlGetString) and (not lib_pubsub_Except) and (not test_xrc7)' \ + unittests/ +} mv wx_temp wx %endif @@ -252,13 +298,17 @@ %python_alternative %{_bindir}/wxdemo %python_alternative %{_bindir}/wxdocs %python_alternative %{_bindir}/wxget -%{python_sitearch}/wxPython-%{version}-py*.egg-info +%{python_sitearch}/wxPython-*-py*.egg-info %{python_sitearch}/wx/ +%if %{without syswx} %exclude %{python_sitearch}/wx/locale/ +%endif +%if %{without syswx} %files lang -f wxstd.lang %dir %{python_sitearch}/wx/locale/ %dir %{python_sitearch}/wx/locale/* %dir %{python_sitearch}/wx/locale/*/LC_MESSAGES +%endif %changelog ++++++ 0001-Check-HSV-values-in-image-test.patch ++++++ >From 12cb5458cf5c26080158ecbee010ae9073a907e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bru...@rwth-aachen.de> Date: Sun, 4 Oct 2020 21:19:36 +0200 Subject: [PATCH] Check HSV values in image test --- unittests/test_image.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/unittests/test_image.py b/unittests/test_image.py index 767b36a7..a1dc0d7d 100644 --- a/unittests/test_image.py +++ b/unittests/test_image.py @@ -234,6 +234,9 @@ class image_Tests(wtc.WidgetTestCase): rgb = wx.Image.RGBValue(1,2,3) hsv = wx.Image.RGBtoHSV(rgb) rgb = wx.Image.HSVtoRGB(hsv) + self.assertAlmostEqual(hsv.value * 255.0, 3.0) + self.assertAlmostEqual(hsv.saturation* 255.0, 170.0) + self.assertAlmostEqual(hsv.hue * 360.0, 210.0) self.assertEqual(rgb.red, 1) self.assertEqual(rgb.green, 2) self.assertEqual(rgb.blue, 3) -- 2.28.0 ++++++ 0001-Fix-overflow-check-for-wxUIntPtr-type.patch ++++++ >From c72d78fb983bf2efe4041f5d3c86670b92e98565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bru...@rwth-aachen.de> Date: Sun, 4 Oct 2020 23:02:19 +0200 Subject: [PATCH] Fix overflow check for wxUIntPtr type long is 32bit on 32-bit archs and on Win64 (see https://en.cppreference.com/w/cpp/language/types ). As SIP uses PyLong_AsLongLong internally and uses an extra bounds check only if explicitly enabled("sip.enableoverflowchecking(True)"), the overflow only triggers when it also overflows `long long`, i.e. when _LONG_MAX == _LLONG_MAX. --- unittests/test_listctrl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unittests/test_listctrl.py b/unittests/test_listctrl.py index c8c2d39a..0b2e3706 100644 --- a/unittests/test_listctrl.py +++ b/unittests/test_listctrl.py @@ -185,7 +185,7 @@ class listctrl_Tests(wtc.WidgetTestCase): def test_listctrlItemData02(self): lc = self._makeListCtrl() with self.assertRaises(OverflowError): - lc.SetItemData(0, wx._core._LONG_MAX + 100) + lc.SetItemData(0, wx._core._LLONG_MAX + 100) def test_listctrlDeleteAllColumns(self): -- 2.28.0 ++++++ 0001-Only-import-attrdict-where-needed.patch ++++++ >From 60a1917825044fc3a43dc39ef8de2b944150dc8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bru...@rwth-aachen.de> Date: Sat, 25 Jun 2022 18:50:45 +0200 Subject: [PATCH 1/4] Only import attrdict where needed Its only used for MSVC builds, but an unnecessary external dependency elsewhere. --- buildtools/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildtools/config.py b/buildtools/config.py index 4482ba9d..493a63c5 100644 --- a/buildtools/config.py +++ b/buildtools/config.py @@ -27,8 +27,6 @@ from distutils.dep_util import newer import distutils.sysconfig -from attrdict import AttrDict - runSilently = False #---------------------------------------------------------------------- @@ -989,6 +987,8 @@ def getMSVCInfo(PYTHON, arch, set_env=False): if MSVCinfo is not None: return MSVCinfo + from attrdict import AttrDict + # Note that it starts with a monkey-patch in setuptools.msvc to # workaround this issue: pypa/setuptools#1902 cmd = \ -- 2.36.1 ++++++ 0003-Make-pip-usage-in-wxget-optional.patch ++++++ >From 00ba66a86f65abb24402427d66bf50e8da477321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bru...@rwth-aachen.de> Date: Tue, 28 Jun 2022 18:16:34 +0200 Subject: [PATCH 3/4] Make pip usage in wxget optional As the code states, using pip to download is abusing it, and as it is just a fallback in case neither wget nor urllib works. --- wx/tools/wxget.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/wx/tools/wxget.py b/wx/tools/wxget.py index c83ced7a..75eb0f47 100644 --- a/wx/tools/wxget.py +++ b/wx/tools/wxget.py @@ -33,7 +33,6 @@ import os import wx import subprocess import ssl -import pip if sys.version_info >= (3,): from urllib.error import (HTTPError, URLError) @@ -44,6 +43,11 @@ else: from urllib2 import (HTTPError, URLError) import urlparse +try: + import pip +except ImportError as e: + pip = None + def get_docs_demo_url(demo=False): """ Get the URL for the docs or demo.""" if demo: @@ -196,8 +200,8 @@ def download_file(url, dest=None, force=False, trusted=False): success = download_wget(url, filename, trusted) # Try wget if not success: success = download_urllib(url, filename) # Try urllib - if not success: - success = download_pip(url, filename, force, trusted) # Try urllib + if not success and pip not None: + success = download_pip(url, filename, force, trusted) # Try pip if not success: split_url = url.split('/') msg = '\n'.join([ -- 2.36.1 ++++++ 0004-Fix-time_t-ETG-typedef-extend-DateTime.FromTimeT-tes.patch ++++++ >From 70ecc1afcdd59bbd3b700d000e8f92740d218245 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bru...@rwth-aachen.de> Date: Tue, 28 Jun 2022 18:32:32 +0200 Subject: [PATCH 4/4] Fix time_t ETG typedef, extend DateTime.FromTimeT tests Before c78823549bac ("Ensure time_t is treated as a 64-bit value by SIP") the typedef used "long" instead of wxInt64, which caused issues on Win64, as long is 32bit there (LLP64). On the other hand, wxInt64 is wrong on 32 bit Linux (e.g. armv7, i586), and thus the code crashes. As SIP_SSIZE_T is 64 bit for both LLP64 (Windows) and LP64 (Linux), but 32 bit on 32bit archs, it matches time_t better (though, according to the C standard, it could even be a double). --- etg/defs.py | 2 +- unittests/test_wxdatetime.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/etg/defs.py b/etg/defs.py index 4445cf93..ceb9e2ef 100644 --- a/etg/defs.py +++ b/etg/defs.py @@ -73,7 +73,7 @@ def run(): td = module.find('wxUIntPtr') module.insertItemAfter(td, etgtools.TypedefDef(type='wchar_t', name='wxUChar')) module.insertItemAfter(td, etgtools.TypedefDef(type='wchar_t', name='wxChar')) - module.insertItemAfter(td, etgtools.TypedefDef(type='wxInt64', name='time_t')) + module.insertItemAfter(td, etgtools.TypedefDef(type='long', name='time_t')) module.insertItemAfter(td, etgtools.TypedefDef(type='long long', name='wxFileOffset')) module.insertItemAfter(td, etgtools.TypedefDef(type='SIP_SSIZE_T', name='ssize_t')) module.insertItemAfter(td, etgtools.TypedefDef(type='unsigned char', name='byte', pyInt=True)) diff --git a/unittests/test_wxdatetime.py b/unittests/test_wxdatetime.py index 62e7d141..2f620045 100644 --- a/unittests/test_wxdatetime.py +++ b/unittests/test_wxdatetime.py @@ -25,9 +25,15 @@ class datetime_Tests(wtc.WidgetTestCase): def test_datetime2(self): d1 = wx.DateTime.FromHMS(8, 15, 45, 123) d2 = wx.DateTime.FromJDN(12345.67) - d3 = wx.DateTime.FromTimeT(int(time.time())) d4 = wx.DateTime.FromDMY(1, wx.DateTime.Mar, 2012, 8, 15, 45, 123) + def test_datetimeTimeT(self): + d1 = wx.DateTime.FromTimeT(0) + self.assertEqual(d1.year, 1970) + d2 = wx.DateTime.FromTimeT(1643756400) # 2022-02-02 + self.assertEqual(d2.year, 2022) + d3 = wx.DateTime.FromTimeT(int(time.time())) + def test_datetime3(self): d1 = wx.DateTime.Today() d2 = wx.DateTime.Now() -- 2.36.1 ++++++ _multibuild ++++++ --- /var/tmp/diff_new_pack.7WX52N/_old 2022-08-17 18:26:31.635639422 +0200 +++ /var/tmp/diff_new_pack.7WX52N/_new 2022-08-17 18:26:31.639639432 +0200 @@ -1,8 +1,8 @@ <multibuild> <package>python3</package> - <package>python36</package> <package>python38</package> <package>python39</package> <package>python310</package> + <package>python311</package> </multibuild> ++++++ use_stl_build.patch ++++++ --- /var/tmp/diff_new_pack.7WX52N/_old 2022-08-17 18:26:31.663639491 +0200 +++ /var/tmp/diff_new_pack.7WX52N/_new 2022-08-17 18:26:31.667639500 +0200 @@ -1,11 +1,12 @@ --- wxPython-4.1.0/buildtools/build_wxwidgets.py_orig 2020-05-30 01:24:47.890132236 +0200 +++ wxPython-4.1.0/buildtools/build_wxwidgets.py 2020-05-30 01:25:59.574988273 +0200 -@@ -362,6 +362,7 @@ - else: - configure_opts.append("--enable-universal_binary=%s" % options.mac_universal_binary) +@@ -370,6 +370,8 @@ + if os.path.exists(frameworkRootDir): + shutil.rmtree(frameworkRootDir) + configure_opts.append("--enable-stl") - ++ print("Configure options: " + repr(configure_opts)) wxBuilder = builder.AutoconfBuilder() + if not options.no_config and not options.clean: ++++++ wxPython-4.1.1.tar.gz -> wxPython-4.2.0.tar.gz ++++++ /work/SRC/openSUSE:Factory/python-wxPython/wxPython-4.1.1.tar.gz /work/SRC/openSUSE:Factory/.python-wxPython.new.1521/wxPython-4.2.0.tar.gz differ: char 5, line 1