diff --git a/pygobject-3.38.0.tar.xz b/pygobject-3.38.0.tar.xz deleted file mode 100644 index 667efc0616d2a6468cdccb336126d6bb118d17f3..0000000000000000000000000000000000000000 Binary files a/pygobject-3.38.0.tar.xz and /dev/null differ diff --git a/pygobject-3.42.0.tar.xz b/pygobject-3.42.0.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..f0a19eedd02151c5a916a5b5ef6ceb01e6a03b40 Binary files /dev/null and b/pygobject-3.42.0.tar.xz differ diff --git a/pygobject3.spec b/pygobject3.spec index d5d1858314e21eed97ab74be4fc268ffc860caa4..851483b8ccea2a03b6a5f3281faf9774de7af22d 100644 --- a/pygobject3.spec +++ b/pygobject3.spec @@ -1,18 +1,14 @@ Name: pygobject3 -Version: 3.38.0 -Release: 3 +Version: 3.42.0 +Release: 1 Summary: Provides bindings for GObject based libraries License: LGPLv2+ and MIT URL: https://wiki.gnome.org/Projects/PyGObject Source0: https://download.gnome.org/sources/pygobject/3.38/pygobject-%{version}.tar.xz -Patch0: tests-fix-tests-with-glib-master.patch -Patch1: tests-Remove-usage-of-some-deprecated-unittest-metho.patch -Patch2: tests-fix-test-with-glib-2.68-re-GLocalFile.patch - -BuildRequires: glib2-devel >= 2.48.0 gobject-introspection-devel >= 1.46.0 +BuildRequires: glib2-devel >= 2.56.0 gobject-introspection-devel >= 1.56.0 BuildRequires: meson cairo-gobject-devel -BuildRequires: python3-devel >= 3.4 python3-cairo-devel >= 1.11.1 +BuildRequires: python3-devel >= 3.6 python3-cairo-devel >= 1.16.0 #for test suite BuildRequires: python3-pytest gtk3 dbus-x11 dejavu-fonts xorg-x11-server @@ -90,6 +86,9 @@ xvfb-run %{__python3} setup.py test %{_libdir}/pkgconfig/pygobject-3.0.pc %changelog +* Tue Nov 30 2021 fuanan - 3.42.0-1 +- update version to 3.42.0 + * Tue Jul 27 2021 panxiaohe - 3.38.0-3 - use python3_sitelib macro for meson upgrade - add BuildRequires for testsuite diff --git a/tests-Remove-usage-of-some-deprecated-unittest-metho.patch b/tests-Remove-usage-of-some-deprecated-unittest-metho.patch deleted file mode 100644 index be6ddc73c67c2044ae4fd8b30786c4448b5314f4..0000000000000000000000000000000000000000 --- a/tests-Remove-usage-of-some-deprecated-unittest-metho.patch +++ /dev/null @@ -1,293 +0,0 @@ -From ebc0eed6f9838253ae6fcaa51695136611c98298 Mon Sep 17 00:00:00 2001 -From: Christoph Reiter -Date: Fri, 6 Nov 2020 16:02:43 +0100 -Subject: [PATCH] tests: Remove usage of some deprecated unittest methods - ---- - tests/__init__.py | 4 ---- - tests/test_gi.py | 36 ++++++++++++++++++------------------ - tests/test_gio.py | 4 ++-- - tests/test_overrides_gdk.py | 4 ++-- - tests/test_overrides_glib.py | 32 ++++++++++++++++---------------- - tests/test_overrides_gtk.py | 18 +++++++++--------- - 6 files changed, 47 insertions(+), 51 deletions(-) - -diff --git a/tests/__init__.py b/tests/__init__.py -index 3497667..e6dd333 100644 ---- a/tests/__init__.py -+++ b/tests/__init__.py -@@ -1,6 +1,5 @@ - import os - import sys --import unittest - import signal - import subprocess - import atexit -@@ -8,9 +7,6 @@ import warnings - - - def init_test_environ(): -- # this was renamed in Python 3, provide backwards compatible name -- unittest.TestCase.assertRegexpMatches = unittest.TestCase.assertRegex -- unittest.TestCase.assertRaisesRegexp = unittest.TestCase.assertRaisesRegex - - def dbus_launch_session(): - if os.name == "nt" or sys.platform == "darwin": -diff --git a/tests/test_gi.py b/tests/test_gi.py -index 2cabe02..5e7d0e3 100644 ---- a/tests/test_gi.py -+++ b/tests/test_gi.py -@@ -2248,22 +2248,22 @@ class TestStructure(unittest.TestCase): - self.assertRaises(TypeError, GIMarshallingTests.Union.method) - - def test_repr(self): -- self.assertRegexpMatches( -+ self.assertRegex( - repr(GIMarshallingTests.PointerStruct()), - r"") - -- self.assertRegexpMatches( -+ self.assertRegex( - repr(GIMarshallingTests.SimpleStruct()), - r"") - -- self.assertRegexpMatches( -+ self.assertRegex( - repr(GIMarshallingTests.Union()), - r"") - -- self.assertRegexpMatches( -+ self.assertRegex( - repr(GIMarshallingTests.BoxedStruct()), - r"") -@@ -2399,13 +2399,13 @@ class TestGObject(unittest.TestCase): - self.assertEqual(new_object.__grefcount__, 1) - - def test_repr(self): -- self.assertRegexpMatches( -+ self.assertRegex( - repr(GIMarshallingTests.Object(int=42)), - r"") - - def test_nongir_repr(self): -- self.assertRegexpMatches( -+ self.assertRegex( - repr(Gio.File.new_for_path("")), - r"<__gi__.GLocalFile object at 0x[^\s]+ " - r"\(GLocalFile at 0x[^\s]+\)>") -@@ -3208,7 +3208,7 @@ class TestDeprecation(unittest.TestCase): - self.assertEqual(len(warn), 3) - self.assertTrue( - issubclass(warn[0].category, PyGIDeprecationWarning)) -- self.assertRegexpMatches( -+ self.assertRegex( - str(warn[0].message), - ".*GLib.IO_STATUS_ERROR.*GLib.IOStatus.ERROR.*") - -@@ -3244,8 +3244,8 @@ class TestDeprecation(unittest.TestCase): - fn(self, 1, 2, 3) - self.assertEqual(len(warn), 1) - self.assertTrue(issubclass(warn[0].category, PyGIDeprecationWarning)) -- self.assertRegexpMatches(str(warn[0].message), -- '.*keyword.*a, b, c.*') -+ self.assertRegex(str(warn[0].message), -+ '.*keyword.*a, b, c.*') - - def test_deprecated_init_no_keywords_out_of_order(self): - def init(self, **kwargs): -@@ -3257,8 +3257,8 @@ class TestDeprecation(unittest.TestCase): - fn(self, 2, 1, 3) - self.assertEqual(len(warn), 1) - self.assertTrue(issubclass(warn[0].category, PyGIDeprecationWarning)) -- self.assertRegexpMatches(str(warn[0].message), -- '.*keyword.*b, a, c.*') -+ self.assertRegex(str(warn[0].message), -+ '.*keyword.*b, a, c.*') - - def test_deprecated_init_ignored_keyword(self): - def init(self, **kwargs): -@@ -3272,8 +3272,8 @@ class TestDeprecation(unittest.TestCase): - fn(self, 1, 2, 3) - self.assertEqual(len(warn), 1) - self.assertTrue(issubclass(warn[0].category, PyGIDeprecationWarning)) -- self.assertRegexpMatches(str(warn[0].message), -- '.*keyword.*a, b, c.*') -+ self.assertRegex(str(warn[0].message), -+ '.*keyword.*a, b, c.*') - - def test_deprecated_init_with_aliases(self): - def init(self, **kwargs): -@@ -3288,8 +3288,8 @@ class TestDeprecation(unittest.TestCase): - fn(self, a=1, bb=2, cc=3) - self.assertEqual(len(warn), 1) - self.assertTrue(issubclass(warn[0].category, PyGIDeprecationWarning)) -- self.assertRegexpMatches(str(warn[0].message), -- '.*keyword.*"bb, cc".*deprecated.*"b, c" respectively') -+ self.assertRegex(str(warn[0].message), -+ '.*keyword.*"bb, cc".*deprecated.*"b, c" respectively') - - def test_deprecated_init_with_defaults(self): - def init(self, **kwargs): -@@ -3303,6 +3303,6 @@ class TestDeprecation(unittest.TestCase): - fn(self, a=1) - self.assertEqual(len(warn), 1) - self.assertTrue(issubclass(warn[0].category, PyGIDeprecationWarning)) -- self.assertRegexpMatches(str(warn[0].message), -- '.*relying on deprecated non-standard defaults.*' -- 'explicitly use: b=2, c=3') -+ self.assertRegex(str(warn[0].message), -+ '.*relying on deprecated non-standard defaults.*' -+ 'explicitly use: b=2, c=3') -diff --git a/tests/test_gio.py b/tests/test_gio.py -index 3b812c4..07ee506 100644 ---- a/tests/test_gio.py -+++ b/tests/test_gio.py -@@ -50,8 +50,8 @@ class TestGio(unittest.TestCase): - Gio.VolumeMonitor() - self.assertEqual(len(warn), 1) - self.assertTrue(issubclass(warn[0].category, PyGIWarning)) -- self.assertRegexpMatches(str(warn[0].message), -- '.*Gio\\.VolumeMonitor\\.get\\(\\).*') -+ self.assertRegex(str(warn[0].message), -+ '.*Gio\\.VolumeMonitor\\.get\\(\\).*') - - - class TestGSettings(unittest.TestCase): -diff --git a/tests/test_overrides_gdk.py b/tests/test_overrides_gdk.py -index 1788ef6..d959571 100644 ---- a/tests/test_overrides_gdk.py -+++ b/tests/test_overrides_gdk.py -@@ -227,8 +227,8 @@ class TestGdk(unittest.TestCase): - - self.assertEqual(len(warn), 1) - self.assertTrue(issubclass(warn[0].category, PyGIDeprecationWarning)) -- self.assertRegexpMatches(str(warn[0].message), -- '.*new_from_pixbuf.*') -+ self.assertRegex(str(warn[0].message), -+ '.*new_from_pixbuf.*') - - self.assertRaises(ValueError, Gdk.Cursor, 1, 2, 3) - -diff --git a/tests/test_overrides_glib.py b/tests/test_overrides_glib.py -index d8f1a6c..08c41ae 100644 ---- a/tests/test_overrides_glib.py -+++ b/tests/test_overrides_glib.py -@@ -691,30 +691,30 @@ class TestGVariant(unittest.TestCase): - - def test_parse_error_exceptions(self): - source_str = 'abc' -- self.assertRaisesRegexp(TypeError, 'Must be GLib.Error, not int', -- GLib.Variant.parse_error_print_context, -- 42, source_str) -+ self.assertRaisesRegex(TypeError, 'Must be GLib.Error, not int', -+ GLib.Variant.parse_error_print_context, -+ 42, source_str) - - gerror = GLib.Error(message=42) # not a string -- self.assertRaisesRegexp(TypeError, ".*Must be string, not int.*", -- GLib.Variant.parse_error_print_context, -- gerror, source_str) -+ self.assertRaisesRegex(TypeError, ".*Must be string, not int.*", -+ GLib.Variant.parse_error_print_context, -+ gerror, source_str) - - gerror = GLib.Error(domain=42) # not a string -- self.assertRaisesRegexp(TypeError, ".*Must be string, not int.*", -- GLib.Variant.parse_error_print_context, -- gerror, source_str) -+ self.assertRaisesRegex(TypeError, ".*Must be string, not int.*", -+ GLib.Variant.parse_error_print_context, -+ gerror, source_str) - - gerror = GLib.Error(code='not an int') -- self.assertRaisesRegexp(TypeError, ".*Must be number, not str.*", -- GLib.Variant.parse_error_print_context, -- gerror, source_str) -+ self.assertRaisesRegex(TypeError, ".*Must be number, not str.*", -+ GLib.Variant.parse_error_print_context, -+ gerror, source_str) - - gerror = GLib.Error(code=GLib.MAXUINT) -- self.assertRaisesRegexp(OverflowError, -- ".*not in range.*", -- GLib.Variant.parse_error_print_context, -- gerror, source_str) -+ self.assertRaisesRegex(OverflowError, -+ ".*not in range.*", -+ GLib.Variant.parse_error_print_context, -+ gerror, source_str) - - - class TestConstants(unittest.TestCase): -diff --git a/tests/test_overrides_gtk.py b/tests/test_overrides_gtk.py -index 30ad1d8..091a6a2 100644 ---- a/tests/test_overrides_gtk.py -+++ b/tests/test_overrides_gtk.py -@@ -403,8 +403,8 @@ class TestGtk(unittest.TestCase): - self.assertTrue(dialog.get_modal()) - self.assertEqual(len(warn), 1) - self.assertTrue(issubclass(warn[0].category, PyGTKDeprecationWarning)) -- self.assertRegexpMatches(str(warn[0].message), -- '.*flags.*modal.*') -+ self.assertRegex(str(warn[0].message), -+ '.*flags.*modal.*') - - with warnings.catch_warnings(record=True) as warn: - warnings.simplefilter('always') -@@ -412,8 +412,8 @@ class TestGtk(unittest.TestCase): - self.assertTrue(dialog.get_destroy_with_parent()) - self.assertEqual(len(warn), 1) - self.assertTrue(issubclass(warn[0].category, PyGTKDeprecationWarning)) -- self.assertRegexpMatches(str(warn[0].message), -- '.*flags.*destroy_with_parent.*') -+ self.assertRegex(str(warn[0].message), -+ '.*flags.*destroy_with_parent.*') - - def test_dialog_deprecation_stacklevels(self): - # Test warning levels are setup to give the correct filename for -@@ -425,7 +425,7 @@ class TestGtk(unittest.TestCase): - warnings.simplefilter('always') - Gtk.Dialog(flags=Gtk.DialogFlags.MODAL) - self.assertEqual(len(warn), 1) -- self.assertRegexpMatches(warn[0].filename, '.*test_overrides_gtk.*') -+ self.assertRegex(warn[0].filename, '.*test_overrides_gtk.*') - - # Validate overridden base with overridden sub-class. - self.assertEqual(Gtk.MessageDialog, gi.overrides.Gtk.MessageDialog) -@@ -433,7 +433,7 @@ class TestGtk(unittest.TestCase): - warnings.simplefilter('always') - Gtk.MessageDialog(flags=Gtk.DialogFlags.MODAL) - self.assertEqual(len(warn), 1) -- self.assertRegexpMatches(warn[0].filename, '.*test_overrides_gtk.*') -+ self.assertRegex(warn[0].filename, '.*test_overrides_gtk.*') - - # Validate overridden base with non-overridden sub-class. - self.assertEqual(Gtk.AboutDialog, gi.repository.Gtk.AboutDialog) -@@ -441,7 +441,7 @@ class TestGtk(unittest.TestCase): - warnings.simplefilter('always') - Gtk.AboutDialog(flags=Gtk.DialogFlags.MODAL) - self.assertEqual(len(warn), 1) -- self.assertRegexpMatches(warn[0].filename, '.*test_overrides_gtk.*') -+ self.assertRegex(warn[0].filename, '.*test_overrides_gtk.*') - - def test_dialog_add_buttons(self): - # The overloaded "buttons" keyword gives a warning when attempting -@@ -452,8 +452,8 @@ class TestGtk(unittest.TestCase): - buttons=('test-button1', 1)) - self.assertEqual(len(warn), 1) - self.assertTrue(issubclass(warn[0].category, PyGTKDeprecationWarning)) -- self.assertRegexpMatches(str(warn[0].message), -- '.*ButtonsType.*add_buttons.*') -+ self.assertRegex(str(warn[0].message), -+ '.*ButtonsType.*add_buttons.*') - - dialog.add_buttons('test-button2', 2, 'gtk-close', Gtk.ResponseType.CLOSE) - button = dialog.get_widget_for_response(1) --- -1.8.3.1 - diff --git a/tests-fix-test-with-glib-2.68-re-GLocalFile.patch b/tests-fix-test-with-glib-2.68-re-GLocalFile.patch deleted file mode 100644 index 1a19f3b73b0a6edcc4fd1e86cefe7ddad321fecc..0000000000000000000000000000000000000000 --- a/tests-fix-test-with-glib-2.68-re-GLocalFile.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 6c17628365abfcd7d5868f6f812390380c0ad1ec Mon Sep 17 00:00:00 2001 -From: Christoph Reiter -Date: Tue, 30 Mar 2021 08:04:47 +0200 -Subject: [PATCH] tests: fix test with glib 2.68 re GLocalFile - -Since 2.68 Gio.File.new_for_path("") returns a GDummyFile instead of -a GLocalFile. We don't really care since we just want to test that there -is a name despite the type not being in the gir, so just pass a potentially -valid path instead. ---- - tests/test_gi.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/test_gi.py b/tests/test_gi.py -index 5e7d0e3..f655266 100644 ---- a/tests/test_gi.py -+++ b/tests/test_gi.py -@@ -2406,7 +2406,7 @@ class TestGObject(unittest.TestCase): - - def test_nongir_repr(self): - self.assertRegex( -- repr(Gio.File.new_for_path("")), -+ repr(Gio.File.new_for_path("/")), - r"<__gi__.GLocalFile object at 0x[^\s]+ " - r"\(GLocalFile at 0x[^\s]+\)>") - --- -1.8.3.1 - diff --git a/tests-fix-tests-with-glib-master.patch b/tests-fix-tests-with-glib-master.patch deleted file mode 100644 index 267337c6dfdd7ebdebcb137955c3af80b6e248a5..0000000000000000000000000000000000000000 --- a/tests-fix-tests-with-glib-master.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 6033ab41cdf3ec8d7e689e2a3ea832ed5dfdcf8b Mon Sep 17 00:00:00 2001 -From: Christoph Reiter -Date: Sun, 15 Nov 2020 13:32:30 +0100 -Subject: [PATCH] tests: fix tests with glib master - -GFileIcon asserts that it gets a file now: -https://gitlab.gnome.org/GNOME/glib/-/commit/e2fbb74301 ---- - tests/test_gobject.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/tests/test_gobject.py b/tests/test_gobject.py -index 77d788a..f5a65bb 100644 ---- a/tests/test_gobject.py -+++ b/tests/test_gobject.py -@@ -833,7 +833,8 @@ def test_list_properties(): - - assert list_props("GFileIcon") == list_props(Gio.FileIcon) - assert list_props(Gio.FileIcon.__gtype__) == list_props(Gio.FileIcon) -- assert list_props(Gio.FileIcon()) == list_props(Gio.FileIcon) -+ assert list_props(Gio.FileIcon( -+ file=Gio.File.new_for_path('.'))) == list_props(Gio.FileIcon) - - for obj in [Gio.ActionEntry, Gio.DBusError, 0, object()]: - with pytest.raises(TypeError): --- -1.8.3.1 -