diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-06-08 09:45:00 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-06-08 09:45:00 +0100 |
commit | cfeee79886441e92c8ee094e45b9bcdc9c79137a (patch) | |
tree | ff20e0f6c0b9bd4497479556467cc3a53dd1dd4b /dev-python/pygobject | |
parent | 0d7ae8c4b021f0ea675d5bc81389c5d159a197fa (diff) |
gentoo auto-resync : 08:06:2023 - 09:45:00
Diffstat (limited to 'dev-python/pygobject')
-rw-r--r-- | dev-python/pygobject/Manifest | 3 | ||||
-rw-r--r-- | dev-python/pygobject/files/pygobject-3.44.1-py312.patch | 48 | ||||
-rw-r--r-- | dev-python/pygobject/pygobject-3.44.1.ebuild | 13 |
3 files changed, 55 insertions, 9 deletions
diff --git a/dev-python/pygobject/Manifest b/dev-python/pygobject/Manifest index dc94cadc7c93..63e5992d30c0 100644 --- a/dev-python/pygobject/Manifest +++ b/dev-python/pygobject/Manifest @@ -1,3 +1,4 @@ +AUX pygobject-3.44.1-py312.patch 1941 BLAKE2B 93af1e4f307e003b7e9cd62b787efa9690724d2cc293ddc571563e7e0324771537d2dd92e6998d30066bb6707b73937cc8cbbca7926666e70f939d0f6cc86435 SHA512 98d470a39d5e3b3f25e41a516d62d364daf2eec92480b31ef80ad79bc3921f53a7fa05bab23be721889ccf8fcd939e5c0bf7d04efd935f7bf9f56bc2e596cc6b DIST pygobject-3.44.1.tar.xz 559432 BLAKE2B 7edfe91ac1b7301befaf8ef17078b517666467f446bfbe25850336cd365d314153d444d29ecf028ce44a12cef1c94f139d110ac6784c8a2c6077730d4836f6cc SHA512 5f2ff4a068e7e24dcc32f8c43ba58660c85a0fabdd9ff0bac4ddf1ca82bd0fc962ce5cb3ab25b991c212d45e5e89dac67c3259c5423a7d7fd70b2ac1f56e5327 -EBUILD pygobject-3.44.1.ebuild 2076 BLAKE2B 63e6aa170787ee317daa395e912c3e855f0d03adc665a154f0af97ecc17587c6426aeb22b9667ebee3b70dc98ec9fcca441e35a751670e50540aaecd050d6d6f SHA512 cac881691712336f4b063971a825fc6c662e8d03a681ddfde876f4f0e70320fa6588252b251f4aba0d9db0120b028112b8c0be8990379cc0d07a72babc725445 +EBUILD pygobject-3.44.1.ebuild 1992 BLAKE2B 0dd334932fbfe25a72f394ff496b6c9bd291f0e3b62520bc5aeeda57324b783116ff7352e495cf37d7fe9d902ad49dc7f0e751aa5923a627fbf0bf4f5aae19c5 SHA512 145a1544194f896ccdd8c26fd5136970b90e660171ade50a1bbd2cbc8e4812bff86677829a6a5f7f6fb7cdc3b9baa4d54786c2bb00a1cc9736cff18a98b44520 MISC metadata.xml 1398 BLAKE2B 0f89629267eea1f03252ac53ebf6478977301f5edf58024152b7e25cac1bb238241d419241dac72181bc82d0bda4dc281fe490a72967b730df7087300562127c SHA512 49ec255944b9530fe59ba325925713512ca84d71149b988c034d092d4a433c6f7a23822d685180c343a40055bb5c879980996d34a30cae8fddc617707bc1a417 diff --git a/dev-python/pygobject/files/pygobject-3.44.1-py312.patch b/dev-python/pygobject/files/pygobject-3.44.1-py312.patch new file mode 100644 index 000000000000..331e3bc0a3f8 --- /dev/null +++ b/dev-python/pygobject/files/pygobject-3.44.1-py312.patch @@ -0,0 +1,48 @@ +From fe6aedd8eebd92844b873f72e99dc4023316c6f3 Mon Sep 17 00:00:00 2001 +From: Christoph Reiter <reiter.christoph@gmail.com> +Date: Wed, 7 Jun 2023 22:27:55 +0200 +Subject: [PATCH] tests: fix test_gvalue_flat_array_in_item_marshal_failure for + Python 3.12 + +See https://gitlab.gnome.org/GNOME/pygobject/-/issues/582 + +_PyGI_ERROR_PREFIX() no longer works with 3.12 since we only get normalized +exceptions in there and can't add a prefix like "Item X: " to the message. + +Until we figure out how to add this back for 3.12, align the tests with the +new behaviour (the new exception notes API would be an option, see the +linked issue) +--- + tests/test_gi.py | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/tests/test_gi.py b/tests/test_gi.py +index 25a3b659..261d8b2b 100644 +--- a/tests/test_gi.py ++++ b/tests/test_gi.py +@@ -1573,9 +1573,12 @@ class TestGValue(unittest.TestCase): + self.assertRaises(OverflowError, GIMarshallingTests.gvalue_flat_array, + [GLib.MININT - 1, "42", True]) + ++ # FIXME: https://gitlab.gnome.org/GNOME/pygobject/-/issues/582#note_1764164 ++ exc_prefix = "Item 0: " if sys.version_info[:2] < (3, 12) else "" ++ + with pytest.raises( + OverflowError, +- match='Item 0: %d not in range %d to %d' % ( ++ match=exc_prefix + '%d not in range %d to %d' % ( + GLib.MAXINT + 1, GLib.MININT, GLib.MAXINT)): + GIMarshallingTests.gvalue_flat_array([GLib.MAXINT + 1, "42", True]) + +@@ -1583,7 +1586,7 @@ class TestGValue(unittest.TestCase): + + with pytest.raises( + OverflowError, +- match='Item 0: %d not in range %d to %d' % ( ++ match=exc_prefix + '%d not in range %d to %d' % ( + GLib.MAXUINT64 * 2, min_, max_)): + GIMarshallingTests.gvalue_flat_array([GLib.MAXUINT64 * 2, "42", True]) + +-- +GitLab + diff --git a/dev-python/pygobject/pygobject-3.44.1.ebuild b/dev-python/pygobject/pygobject-3.44.1.ebuild index 231063a2d18f..713c63dc4584 100644 --- a/dev-python/pygobject/pygobject-3.44.1.ebuild +++ b/dev-python/pygobject/pygobject-3.44.1.ebuild @@ -44,14 +44,11 @@ BDEPEND=" virtual/pkgconfig " -src_prepare() { - # workaround minor py3.12 test failure - # (I wish we could just use EPYTEST_DESELECT here, sigh) - # https://gitlab.gnome.org/GNOME/pygobject/-/issues/582 - sed -i -e 's@Item 0: @.*@' tests/test_gi.py || die - - distutils-r1_src_prepare -} +PATCHES=( + # fix test failure on py3.12 + # https://gitlab.gnome.org/GNOME/pygobject/-/commit/fe6aedd8eebd92844b873f72e99dc4023316c6f3 + "${FILESDIR}/${P}-py312.patch" +) python_configure() { local emesonargs=( |