From d1669a1cb87bb14d79bd5a969f0f98a653f6517dd88e62461fec3a334c4bc500 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 17 Aug 2022 15:13:27 +0000 Subject: [PATCH 1/2] Accepting request 993765 from home:coolo:branches:openSUSE:Factory - Disable Qt5 bindings as they require python2 (for chromium within qtwebengine) and we want to get rid of it in ring1 I honestly can't judge the impact of this change, but I'm trying to limit python2 (and with it qt5webengine and with it pyside2) dependencies in ring1 OBS-URL: https://build.opensuse.org/request/show/993765 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-QtPy?expand=0&rev=38 --- python-QtPy.changes | 6 ++++++ python-QtPy.spec | 18 ++---------------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/python-QtPy.changes b/python-QtPy.changes index 6708430..70e4ae9 100644 --- a/python-QtPy.changes +++ b/python-QtPy.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Aug 8 12:12:04 UTC 2022 - Stephan Kulow + +- Disable Qt5 bindings as they require python2 (for chromium within + qtwebengine) and we want to get rid of it in ring1 + ------------------------------------------------------------------- Fri Jun 3 19:09:24 UTC 2022 - Ben Greiner diff --git a/python-QtPy.spec b/python-QtPy.spec index 30ab20e..962b6c7 100644 --- a/python-QtPy.spec +++ b/python-QtPy.spec @@ -25,16 +25,9 @@ %bcond_with test BuildArch: noarch %endif -%bcond_without pyqt5 +%bcond_with pyqt5 %bcond_without pyqt6 -%ifnarch %power64 s390x -%bcond_without pyside2 -%else -%bcond_with pyside2 -%endif -# unfortunately we get a segfault in the other backends when pyside6 is installed at the same time (!?) -# test locally: osc build -M test --with pyside6 --without pyside2 --without pyqt5 --without pyqt6 --define "pythons python3" -%bcond_with pyside6 +%bcond_without pyside6 %define skip_python2 1 Name: python-QtPy%{psuffix} @@ -83,9 +76,6 @@ BuildRequires: qt6-sql-sqlite BuildRequires: %{python_module PyQt6-WebEngine} %endif %endif -%if %{with pyside2} -BuildRequires: python3-pyside2 -%endif %if %{with pyside6} BuildRequires: python3-pyside6 BuildRequires: qt6-sql-sqlite @@ -152,10 +142,6 @@ donttest_pyqt6=" or test_qtwebengine" export QT_API=pyqt6 FORCE_QT_API=1 %pytest -rwEfs -v ../qtpy -k "not ($donttest_qt_api $donttest $donttest_pyqt6)" %endif -%if %{with pyside2} -export QT_API=pyside2 FORCE_QT_API=1 -pytest-%{python3_bin_suffix} -rwEfs -v ../qtpy -k "not ($donttest_qt_api $donttest)" -%endif %if %{with pyside6} export QT_API=pyside6 FORCE_QT_API=1 pytest-%{python3_bin_suffix} -rwEfs -v ../qtpy -k "not ($donttest_qt_api $donttest)" From 130b24138e8311260ee4bbbffb39948f9174570a8fc162cf105443d3a10bfc2b Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 19 Aug 2022 06:48:25 +0000 Subject: [PATCH 2/2] Accepting request 997994 from home:bnavigator:branches:devel:languages:python - Update to 2.2.0 * Add workaround for mode argument in QTextCursor.movePosition (PySide6) by @rear1019 in #346 * Add missing imports and modules by @DaelonSuzuka in #344 * Restore WEBENGINE constant in QtWebEngineWidgets by @ccordoba12 in #350 * Add note to readme about use with Pyright by @CAM-Gerlach in #353 * Add wrapper around sip/shiboken isdeleted/isvalid (compat.py) by @zjp in #354 * Fix PyQt6 typing import for Qt by @tlambert03 in #358 * Add initial Methods, helpers and QtPy namespace specifics section to the README by @dalthviz in #357 - Revert last change: Removing Python2 from build requirements of libqt5-qtwebengine and crippling the testsuite of a package not even in ring1 are orthogonal to each other. - Enable PySide6 tests: Segfaults are gone. OBS-URL: https://build.opensuse.org/request/show/997994 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-QtPy?expand=0&rev=39 --- QtPy-2.1.0.tar.gz | 3 --- QtPy-2.2.0.tar.gz | 3 +++ python-QtPy.changes | 21 +++++++++++++++++++++ python-QtPy.spec | 21 +++++++++++++++++---- 4 files changed, 41 insertions(+), 7 deletions(-) delete mode 100644 QtPy-2.1.0.tar.gz create mode 100644 QtPy-2.2.0.tar.gz diff --git a/QtPy-2.1.0.tar.gz b/QtPy-2.1.0.tar.gz deleted file mode 100644 index e2355c5..0000000 --- a/QtPy-2.1.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ca8cd4217175186344299ee4c0f7e7adcf362c70852ba35b255a534077025c06 -size 46470 diff --git a/QtPy-2.2.0.tar.gz b/QtPy-2.2.0.tar.gz new file mode 100644 index 0000000..1c1b5bd --- /dev/null +++ b/QtPy-2.2.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d85f1b121f24a41ad26c55c446e66abdb7c528839f8c4f11f156ec4541903914 +size 51573 diff --git a/python-QtPy.changes b/python-QtPy.changes index 70e4ae9..41ec292 100644 --- a/python-QtPy.changes +++ b/python-QtPy.changes @@ -1,3 +1,24 @@ +------------------------------------------------------------------- +Thu Aug 18 13:23:53 UTC 2022 - Ben Greiner + +- Update to 2.2.0 + * Add workaround for mode argument in QTextCursor.movePosition + (PySide6) by @rear1019 in #346 + * Add missing imports and modules by @DaelonSuzuka in #344 + * Restore WEBENGINE constant in QtWebEngineWidgets by @ccordoba12 + in #350 + * Add note to readme about use with Pyright by @CAM-Gerlach in + #353 + * Add wrapper around sip/shiboken isdeleted/isvalid (compat.py) + by @zjp in #354 + * Fix PyQt6 typing import for Qt by @tlambert03 in #358 + * Add initial Methods, helpers and QtPy namespace specifics + section to the README by @dalthviz in #357 +- Revert last change: Removing Python2 from build requirements of + libqt5-qtwebengine and crippling the testsuite of a package not + even in ring1 are orthogonal to each other. +- Enable PySide6 tests: Segfaults are gone. + ------------------------------------------------------------------- Mon Aug 8 12:12:04 UTC 2022 - Stephan Kulow diff --git a/python-QtPy.spec b/python-QtPy.spec index 962b6c7..e45c04e 100644 --- a/python-QtPy.spec +++ b/python-QtPy.spec @@ -25,13 +25,19 @@ %bcond_with test BuildArch: noarch %endif -%bcond_with pyqt5 +%bcond_without pyqt5 %bcond_without pyqt6 +%ifnarch %power64 s390x +%bcond_without pyside2 %bcond_without pyside6 +%else +%bcond_with pyside2 +%bcond_with pyside6 +%endif %define skip_python2 1 Name: python-QtPy%{psuffix} -Version: 2.1.0 +Version: 2.2.0 Release: 0 Summary: Abstraction layer on top of Qt bindings License: MIT @@ -76,6 +82,9 @@ BuildRequires: qt6-sql-sqlite BuildRequires: %{python_module PyQt6-WebEngine} %endif %endif +%if %{with pyside2} +BuildRequires: python3-pyside2 +%endif %if %{with pyside6} BuildRequires: python3-pyside6 BuildRequires: qt6-sql-sqlite @@ -99,7 +108,7 @@ PyQt6 or PySide6. sed -i 's/\r$//' LICENSE.txt *.md # qtcharts is present in our PyQt sed -i '/skipif.*not PYSIDE2/ d' qtpy/tests/test_qtcharts.py -sed -i '/addopts/ s/--cov=.*//' pytest.ini +sed -i '/addopts/ {s/--cov=.*//; s/--color=yes//}' pytest.ini %build %python_build @@ -136,12 +145,16 @@ export QT_API=pyqt5 FORCE_QT_API=1 %if %{with pyqt6} %ifarch %{ix86} %{arm} %{power64} s390x # QtWebEngine 6.3.0 ceased support for 32-bit -# No QtWebengine (PyQt5 or PyqQt6 on ppc and s390x +# No QtWebengine on ppc and s390x donttest_pyqt6=" or test_qtwebengine" %endif export QT_API=pyqt6 FORCE_QT_API=1 %pytest -rwEfs -v ../qtpy -k "not ($donttest_qt_api $donttest $donttest_pyqt6)" %endif +%if %{with pyside2} +export QT_API=pyside2 FORCE_QT_API=1 +pytest-%{python3_bin_suffix} -rwEfs -v ../qtpy -k "not ($donttest_qt_api $donttest)" +%endif %if %{with pyside6} export QT_API=pyside6 FORCE_QT_API=1 pytest-%{python3_bin_suffix} -rwEfs -v ../qtpy -k "not ($donttest_qt_api $donttest)"