diff options
Diffstat (limited to 'dev-python/css-parser')
-rw-r--r-- | dev-python/css-parser/Manifest | 5 | ||||
-rw-r--r-- | dev-python/css-parser/css-parser-1.0.6.ebuild | 26 | ||||
-rw-r--r-- | dev-python/css-parser/css-parser-1.0.7.ebuild | 4 | ||||
-rw-r--r-- | dev-python/css-parser/files/css-parser-1.0.6-fix-py3.10-test.patch | 141 |
4 files changed, 3 insertions, 173 deletions
diff --git a/dev-python/css-parser/Manifest b/dev-python/css-parser/Manifest index 93df32d2896d..6a12100f347a 100644 --- a/dev-python/css-parser/Manifest +++ b/dev-python/css-parser/Manifest @@ -1,6 +1,3 @@ -AUX css-parser-1.0.6-fix-py3.10-test.patch 5335 BLAKE2B c99d96c6fde03b0676521f1586ad60ad8c32f82b27c7fb99054edcff7f61b5450f12600d383c2d5d808643853ba8cfaf9a10eb54677de682d93273f6970eb557 SHA512 6d33f69edd1ef2c8b694e9b8bc34b1dc61be242eb32bbb15006529c6ec7ee9ee8e15566f002ef405d872174df65256dd609d2dbb63f7fbf7d9651fc32c559e11 -DIST css-parser-1.0.6.tar.gz 336932 BLAKE2B 00cfc4597137c0aa6af3cc8a72fa3e59a1d7b83210668c8421c0703a4a38d05d73f691ff00ffac14025f021a10f85c1d3697778794d23f75db381f5e63e24b7d SHA512 4c623541e1145c91458e7e2028f6a0de652ae2189dc99672fc72f098799d6349edb051bafc0901258481fa3422346303d2ef634392889ee83a29814609cdbd43 DIST css-parser-1.0.7.tar.gz 348843 BLAKE2B 72fd2a0555eea2b912d3088b1d38a4bf082862a47a414c4c00718ad1b31299a3df3b2e9dcf4f22c3195520c28f5652aaf4103a9a999ceb3ea6b8c785f50bb40e SHA512 51e4ca836b18f963d798a14762bed78cbd3034598cc828dfe81b3f7d921a5bfe52374b0dc6160e1c01e40a8c8147a10664b9f7edeee867ca1086e6a4a96ff162 -EBUILD css-parser-1.0.6.ebuild 595 BLAKE2B 9e6986a702a2c7cfce7c75ade323666975d5ab1cdd37ab989cd5055958957d621e48269b2e7d7ff1836767a02d5c5cc0b68d1ce3f065e065736e12aa823d379b SHA512 989c44df0e09396c35b40cc78e45b75fb581aa5e4199babbf1d36b152adcfb907ce7836c4cac31e59b592f6f116b97a87966311e2fcef7bde370cbefe54c5916 -EBUILD css-parser-1.0.7.ebuild 541 BLAKE2B dfc296b6999bb9e635a60e903dc51fdd5bc187d1748e8ce46036d36835dc64c302926be4d105c343a94198beb7561bfc8adb9d57c06b8c2dd360c258617758c1 SHA512 be739f32dcc123b05a14aa7567b9da8f939b538e759abb76aee918196d269f928741409331471d3bddcf47287366fe6b9e5e27acc37695995ec4ff103b4b1d4b +EBUILD css-parser-1.0.7.ebuild 539 BLAKE2B 1ff6c1dc4c6a78b8c83b85f17e0be129118c1fd3f774f14fb382d4101f04538e5fbbe4a942c5a7d51d669d7358449d22f14c8544694f186d5a8531a5332f3c7f SHA512 5e081b6795adb3374b2fcb54534f1c2af52abc8b7f74e63867ea3b17e1ee46627481750fc67b679095e71d52dd2cd52c6354c2cf8cd3d001be8a4843ae6db416 MISC metadata.xml 479 BLAKE2B 117a5a889216d7f10d68f4f61a5787e5c921167a26d099e1f268916f5e96c8332a396d2a41d76411e48a67991473ac2dae158b8c978bbc6a88cc015e79d32f5a SHA512 339cb0d6b67f1aa92e4ebef1ffd1dd79975e92d67b91c0fb88a39ae6bd54a7e713964655d8e486b7107562cb5b186404714531c5b348985cbf8d598c00b29f75 diff --git a/dev-python/css-parser/css-parser-1.0.6.ebuild b/dev-python/css-parser/css-parser-1.0.6.ebuild deleted file mode 100644 index c069413d87d8..000000000000 --- a/dev-python/css-parser/css-parser-1.0.6.ebuild +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7..10} ) - -inherit distutils-r1 - -DESCRIPTION="A CSS Cascading Style Sheets library (fork of cssutils)" -HOMEPAGE="https://pypi.org/project/css-parser/" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" - -LICENSE="LGPL-2.1+" -SLOT="0" -KEYWORDS="amd64 ~arm ~arm64 ~riscv x86" -IUSE="test" -RESTRICT="!test? ( test )" - -BDEPEND="test? ( dev-python/chardet[${PYTHON_USEDEP}] )" - -PATCHES=( - "${FILESDIR}/${P}-fix-py3.10-test.patch" -) - -distutils_enable_tests setup.py diff --git a/dev-python/css-parser/css-parser-1.0.7.ebuild b/dev-python/css-parser/css-parser-1.0.7.ebuild index 5ecdea286917..142831e80e03 100644 --- a/dev-python/css-parser/css-parser-1.0.7.ebuild +++ b/dev-python/css-parser/css-parser-1.0.7.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -12,7 +12,7 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" LICENSE="LGPL-2.1+" SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86" +KEYWORDS="amd64 ~arm ~arm64 ~riscv x86" IUSE="test" RESTRICT="!test? ( test )" diff --git a/dev-python/css-parser/files/css-parser-1.0.6-fix-py3.10-test.patch b/dev-python/css-parser/files/css-parser-1.0.6-fix-py3.10-test.patch deleted file mode 100644 index 9107adefed56..000000000000 --- a/dev-python/css-parser/files/css-parser-1.0.6-fix-py3.10-test.patch +++ /dev/null @@ -1,141 +0,0 @@ -diff --git a/css_parser_tests/basetest.py b/css_parser_tests/basetest.py -index 2b26906..115053f 100644 ---- a/css_parser_tests/basetest.py -+++ b/css_parser_tests/basetest.py -@@ -149,21 +149,7 @@ class BaseTestCase(unittest.TestCase): - else: - self.fail("%s did not raise %s" % (callsig, exception)) - -- def assertRaisesMsg(self, excClass, msg, callableObj, *args, **kwargs): -- """ -- Just like unittest.TestCase.assertRaises, -- but checks that the message is right too. -- -- Usage:: -- -- self.assertRaisesMsg( -- MyException, "Exception message", -- my_function, (arg1, arg2) -- ) -- -- from -- http://www.nedbatchelder.com/blog/200609.html#e20060905T064418 -- """ -+ def _assertRaisesMsgSubstring(self, excClass, msg, substring_match, callableObj, *args, **kwargs): - try: - callableObj(*args, **kwargs) - except excClass as exc: -@@ -171,7 +157,7 @@ class BaseTestCase(unittest.TestCase): - if not msg: - # No message provided: any message is fine. - return -- elif excMsg == msg: -+ elif (msg in excMsg if substring_match else msg == excMsg): - # Message provided, and we got the right message: passes. - return - else: -@@ -189,6 +175,29 @@ class BaseTestCase(unittest.TestCase): - excName - ) - -+ def assertRaisesMsg(self, excClass, msg, callableObj, *args, **kwargs): -+ """ -+ Just like unittest.TestCase.assertRaises, -+ but checks that the message is right too. -+ -+ Usage:: -+ -+ self.assertRaisesMsg( -+ MyException, "Exception message", -+ my_function, arg1, arg2, -+ kwarg1=val, kwarg2=val) -+ -+ from -+ http://www.nedbatchelder.com/blog/200609.html#e20060905T064418 -+ """ -+ return self._assertRaisesMsgSubstring(excClass, msg, False, callableObj, *args, **kwargs) -+ -+ def assertRaisesMsgSubstring(self, excClass, msg, callableObj, *args, **kwargs): -+ """ -+ Just like assertRaisesMsg, but looks for substring in the message. -+ """ -+ return self._assertRaisesMsgSubstring(excClass, msg, True, callableObj, *args, **kwargs) -+ - def do_equal_p(self, tests, att='cssText', debug=False, raising=True): - """ - if raising self.p is used for parsing, else self.pf -diff --git a/css_parser_tests/test_property.py b/css_parser_tests/test_property.py -index ae6ab2a..561a5eb 100644 ---- a/css_parser_tests/test_property.py -+++ b/css_parser_tests/test_property.py -@@ -162,8 +162,8 @@ class PropertyTestCase(basetest.BaseTestCase): - "Property.literalname" - p = css_parser.css.property.Property(r'c\olor', 'red') - self.assertEqual(r'c\olor', p.literalname) -- self.assertRaisesMsg(AttributeError, "can't set attribute", p.__setattr__, -- 'literalname', 'color') -+ self.assertRaisesMsgSubstring(AttributeError, "can't set attribute", p.__setattr__, -+ 'literalname', 'color') - - def test_validate(self): - "Property.valid" -diff --git a/css_parser_tests/test_selector.py b/css_parser_tests/test_selector.py -index c0c769e..f2746d8 100644 ---- a/css_parser_tests/test_selector.py -+++ b/css_parser_tests/test_selector.py -@@ -412,7 +412,7 @@ class SelectorTestCase(basetest.BaseTestCase): - - # readonly - def _set(): selector.specificity = 1 -- self.assertRaisesMsg(AttributeError, "can't set attribute", _set) -+ self.assertRaisesMsgSubstring(AttributeError, "can't set attribute", _set) - - tests = { - '*': (0, 0, 0, 0), -diff --git a/css_parser_tests/test_selectorlist.py b/css_parser_tests/test_selectorlist.py -index 7028fe7..54c945a 100644 ---- a/css_parser_tests/test_selectorlist.py -+++ b/css_parser_tests/test_selectorlist.py -@@ -11,6 +11,7 @@ from css_parser.css.selectorlist import SelectorList - class SelectorListTestCase(basetest.BaseTestCase): - - def setUp(self): -+ basetest.BaseTestCase.setUp(self) - self.r = SelectorList() - - def test_init(self): -diff --git a/run_tests.py b/run_tests.py -index 554c752..6507434 100755 ---- a/run_tests.py -+++ b/run_tests.py -@@ -1,10 +1,12 @@ - #!/usr/bin/env python - # vim:fileencoding=utf-8 --# License: Apache 2.0 Copyright: 2017, Kovid Goyal <kovid at kovidgoyal.net> -+# License: LGPLv3 Copyright: 2017, Kovid Goyal <kovid at kovidgoyal.net> - --from __future__ import absolute_import, division, print_function, unicode_literals -+from __future__ import (absolute_import, division, print_function, -+ unicode_literals) - - import importlib -+import logging - import os - import sys - import unittest -@@ -72,6 +74,7 @@ def find_tests(): - - def run_tests(test_names=()): - sys.path = [base, os.path.join(base, 'src')] + sys.path -+ import css_parser - tests = find_tests() - suites = [] - for name in test_names: -@@ -85,6 +88,7 @@ def run_tests(test_names=()): - tests = unittest.TestSuite(suites) if suites else tests - - r = unittest.TextTestRunner -+ css_parser.log.setLevel(logging.CRITICAL) - result = r().run(tests) - - if not result.wasSuccessful(): |