summaryrefslogtreecommitdiff
path: root/dev-python/css-parser
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-08-10 20:18:34 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-08-10 20:18:34 +0100
commitf1cd8f3514f8b9fbc1cc9cfe0dd08a8cb258e87a (patch)
treee16b2f573ffa54d21accbf0dfc3647b47b0578c8 /dev-python/css-parser
parente9c5cd3a9230f2f3f5980a5ca0c4ec20c099c7ed (diff)
gentoo auto-resync : 10:08:2022 - 20:18:34
Diffstat (limited to 'dev-python/css-parser')
-rw-r--r--dev-python/css-parser/Manifest3
-rw-r--r--dev-python/css-parser/css-parser-1.0.7-r1.ebuild6
-rw-r--r--dev-python/css-parser/files/css-parser-1.0.7-python311-tests.patch51
3 files changed, 58 insertions, 2 deletions
diff --git a/dev-python/css-parser/Manifest b/dev-python/css-parser/Manifest
index 242717788187..d12ab93eed4d 100644
--- a/dev-python/css-parser/Manifest
+++ b/dev-python/css-parser/Manifest
@@ -1,3 +1,4 @@
+AUX css-parser-1.0.7-python311-tests.patch 1849 BLAKE2B cc0912aa456246ad2a94b54f3871cc407ca3aeb3759bbe208a4c51784fb96e5bfe03cf79bc6a051524d6d420ef55bd537c2c7875516b9a269e438961d1a54e6f SHA512 6e58df270716d9de01ad04cc3d31a7750f481c7c1ca44cea5950b46a5b2a252d6de3ebfc32fea530f46bfcc8b930d8527c5e2bfa05764d8049739d8b60230b27
DIST css-parser-1.0.7.tar.gz 348843 BLAKE2B 72fd2a0555eea2b912d3088b1d38a4bf082862a47a414c4c00718ad1b31299a3df3b2e9dcf4f22c3195520c28f5652aaf4103a9a999ceb3ea6b8c785f50bb40e SHA512 51e4ca836b18f963d798a14762bed78cbd3034598cc828dfe81b3f7d921a5bfe52374b0dc6160e1c01e40a8c8147a10664b9f7edeee867ca1086e6a4a96ff162
-EBUILD css-parser-1.0.7-r1.ebuild 536 BLAKE2B 6843a32f8c6d140728c1b44d87962f6076e4f17bb90eba1779f0990d031bd189999103b33e9d941034136b66ccfcb62d872121a485568766b541739787136a85 SHA512 994ff8ea97b2923ef19330304a77cfa3340486ec1c74373520d3a1588340dac970140c910333f6afcacc25cb89702b4003f0e7e22e5fb9372c1930b03c466c66
+EBUILD css-parser-1.0.7-r1.ebuild 591 BLAKE2B 083890af76373542ebd416e8dbb2442067ffa8cd31cf32ea815d203f28944a54ec5ea155b36aa4936e5b2b5f5277215e21babd415c2997472b369cb40aac8ab3 SHA512 0d12e750eea1bbb177d382c98dc92c73994e84bd8f579c1ebdda042c6d7589d5c50f4f2775deb2defbba50698d37b786e9544598b53156c9b5ac984247a2fdd5
MISC metadata.xml 479 BLAKE2B 117a5a889216d7f10d68f4f61a5787e5c921167a26d099e1f268916f5e96c8332a396d2a41d76411e48a67991473ac2dae158b8c978bbc6a88cc015e79d32f5a SHA512 339cb0d6b67f1aa92e4ebef1ffd1dd79975e92d67b91c0fb88a39ae6bd54a7e713964655d8e486b7107562cb5b186404714531c5b348985cbf8d598c00b29f75
diff --git a/dev-python/css-parser/css-parser-1.0.7-r1.ebuild b/dev-python/css-parser/css-parser-1.0.7-r1.ebuild
index d450388f0198..91c945604f6a 100644
--- a/dev-python/css-parser/css-parser-1.0.7-r1.ebuild
+++ b/dev-python/css-parser/css-parser-1.0.7-r1.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_COMPAT=( python3_{8..11} )
inherit distutils-r1
@@ -20,4 +20,8 @@ BDEPEND="
test? ( dev-python/chardet[${PYTHON_USEDEP}] )
"
+PATCHES=(
+ "${FILESDIR}"/${P}-python311-tests.patch
+)
+
distutils_enable_tests unittest
diff --git a/dev-python/css-parser/files/css-parser-1.0.7-python311-tests.patch b/dev-python/css-parser/files/css-parser-1.0.7-python311-tests.patch
new file mode 100644
index 000000000000..c9e4801cafbe
--- /dev/null
+++ b/dev-python/css-parser/files/css-parser-1.0.7-python311-tests.patch
@@ -0,0 +1,51 @@
+https://github.com/ebook-utils/css-parser/commit/ad79cfcb6e55837a4353b92d051de023c18f6581
+
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Sat, 21 May 2022 14:21:28 +0200
+Subject: [PATCH] tests: adjust exception string checks for python 3.11
+
+Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2062102.
+--- a/css_parser_tests/test_property.py
++++ b/css_parser_tests/test_property.py
+@@ -5,6 +5,7 @@
+ import xml.dom
+ from . import basetest
+ import css_parser
++import sys
+
+
+ class PropertyTestCase(basetest.BaseTestCase):
+@@ -162,8 +163,9 @@ def test_literalname(self):
+ "Property.literalname"
+ p = css_parser.css.property.Property(r'c\olor', 'red')
+ self.assertEqual(r'c\olor', p.literalname)
+- self.assertRaisesMsgSubstring(AttributeError, "can't set attribute", p.__setattr__,
+- 'literalname', 'color')
++ pattern = "object has no setter" if sys.version_info >= (3,11) else "can't set attribute"
++ self.assertRaisesMsgSubstring(AttributeError, pattern,
++ p.__setattr__, 'literalname', 'color')
+
+ def test_validate(self):
+ "Property.valid"
+--- a/css_parser_tests/test_selector.py
++++ b/css_parser_tests/test_selector.py
+@@ -11,6 +11,7 @@
+ import xml.dom
+ from . import basetest
+ import css_parser
++import sys
+
+
+ class SelectorTestCase(basetest.BaseTestCase):
+@@ -412,7 +413,9 @@ def test_specificity(self):
+
+ # readonly
+ def _set(): selector.specificity = 1
+- self.assertRaisesMsgSubstring(AttributeError, "can't set attribute", _set)
++
++ pattern = "object has no setter" if sys.version_info >= (3,11) else "can't set attribute"
++ self.assertRaisesMsgSubstring(AttributeError, pattern, _set)
+
+ tests = {
+ '*': (0, 0, 0, 0),
+