Date: Friday, March 24, 2023 @ 00:43:46 Author: heftig Revision: 471932
3.44.0-1 Added: pygobject/trunk/fix-test.diff Modified: pygobject/trunk/PKGBUILD ---------------+ PKGBUILD | 39 ++++++++++++++++++++++++++++++--------- fix-test.diff | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 9 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2023-03-24 00:12:59 UTC (rev 471931) +++ PKGBUILD 2023-03-24 00:43:46 UTC (rev 471932) @@ -3,22 +3,38 @@ pkgbase=pygobject pkgname=(python-gobject) -pkgver=3.42.2 +pkgver=3.44.0 pkgrel=1 pkgdesc="Python Bindings for GLib/GObject/GIO/GTK+" url="https://wiki.gnome.org/Projects/PyGObject" arch=(x86_64) license=(LGPL) -depends=(gobject-introspection-runtime python) -makedepends=(python-cairo gobject-introspection git meson) -checkdepends=(python-pytest gtk3 xorg-server-xvfb) +depends=( + gobject-introspection-runtime + python +) +makedepends=( + git + gobject-introspection + meson + python-cairo +) +checkdepends=( + gtk3 + python-pytest + xorg-server-xvfb +) optdepends=('cairo: Cairo bindings') provides=("pygobject-devel=$pkgver") conflicts=(pygobject-devel) replaces=('pygobject-devel<=3.36.1-1') -_commit=f9c363a0c2fea08b140dbb9c9f072cbeb0cf1f10 # tags/3.42.2^0 -source=("git+https://gitlab.gnome.org/GNOME/pygobject.git#commit=$_commit") -sha256sums=('SKIP') +_commit=894f8b1dd3246bad6edb75aa86f61f6d83531a33 # tags/3.44.0^0 +source=( + "git+https://gitlab.gnome.org/GNOME/pygobject.git#commit=$_commit" + fix-test.diff +) +b2sums=('SKIP' + '841a54a068a4a654337f84548db6c836bdb037a52bed3c45d0ba5d5d55d07b9edb5814fccaf482f78bd2a717adb654ff10e638c25dc71ead5c7307df4b5bc753') pkgver() { cd pygobject @@ -27,6 +43,9 @@ prepare() { cd pygobject + + # fix tests failing due to various warnings being upgraded to criticals + patch -Np1 -i ../fix-test.diff } build() { @@ -35,7 +54,9 @@ } check() { - xvfb-run -s '-nolisten local' meson test -C build --print-errorlogs + PYTEST_ADDOPTS="-v" PYGI_TEST_VERBOSE=1 \ + xvfb-run -s '-nolisten local' \ + meson test -C build --print-errorlogs } package_python-gobject() { @@ -44,4 +65,4 @@ python -O -m compileall -d /usr/lib "$pkgdir/usr/lib" } -# vim:set sw=2 et: +# vim:set sw=2 sts=-1 et: Added: fix-test.diff =================================================================== --- fix-test.diff (rev 0) +++ fix-test.diff 2023-03-24 00:43:46 UTC (rev 471932) @@ -0,0 +1,50 @@ +diff --git i/tests/test_properties.py w/tests/test_properties.py +index ec5df0ca..f8b7823b 100644 +--- i/tests/test_properties.py ++++ w/tests/test_properties.py +@@ -688,7 +688,7 @@ class TestProperty(unittest.TestCase): + + # we test known-bad values here which cause Gtk-WARNING logs. + # Explicitly allow these for this test. +- with capture_glib_warnings(allow_warnings=True): ++ with capture_glib_warnings(allow_warnings=True, allow_criticals=True): + o = C() + self.assertEqual(o.prop_int, 1) + +diff --git i/tests/test_repository.py w/tests/test_repository.py +index 0aa29b63..4390ff04 100644 +--- i/tests/test_repository.py ++++ w/tests/test_repository.py +@@ -364,17 +364,17 @@ class Test(unittest.TestCase): + # also raise a RuntimeError. + GIMarshallingTests.NoTypeFlags # cause flags registration + info = repo.find_by_name('GIMarshallingTests', 'NoTypeFlags') +- with capture_glib_warnings(allow_warnings=True): ++ with capture_glib_warnings(allow_warnings=True, allow_criticals=True): + self.assertRaises(RuntimeError, + GIRepository.flags_register_new_gtype_and_add, + info) + + def test_enum_double_registration_error(self): + # a warning is printed for double registration and pygobject will + # also raise a RuntimeError. + GIMarshallingTests.Enum # cause enum registration + info = repo.find_by_name('GIMarshallingTests', 'Enum') +- with capture_glib_warnings(allow_warnings=True): ++ with capture_glib_warnings(allow_warnings=True, allow_criticals=True): + self.assertRaises(RuntimeError, + GIRepository.enum_register_new_gtype_and_add, + info) +diff --git i/tests/test_signal.py w/tests/test_signal.py +index e327d374..8a935fd8 100644 +--- i/tests/test_signal.py ++++ w/tests/test_signal.py +@@ -365,7 +365,7 @@ class TestClosures(unittest.TestCase): + self.count += 1 + + def _callback_invalid_stop_emission_name(self, obj, prop): +- with capture_glib_warnings(allow_warnings=True) as warn: ++ with capture_glib_warnings(allow_warnings=True, allow_criticals=True) as warn: + obj.stop_emission_by_name('notasignal::baddetail') + self.emission_error = True + self.assertTrue(warn)
