1 |
commit: b3b5c6c51d3741741284d47827c5ea71bd113a2d |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 10 20:42:51 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 10 20:42:51 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3b5c6c5 |
7 |
|
8 |
dev-python/css-parser: Remove old |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/css-parser/Manifest | 1 - |
13 |
dev-python/css-parser/css-parser-1.0.6.ebuild | 26 ---- |
14 |
.../files/css-parser-1.0.6-fix-py3.10-test.patch | 141 --------------------- |
15 |
3 files changed, 168 deletions(-) |
16 |
|
17 |
diff --git a/dev-python/css-parser/Manifest b/dev-python/css-parser/Manifest |
18 |
index 771b7158e92f..326256e92810 100644 |
19 |
--- a/dev-python/css-parser/Manifest |
20 |
+++ b/dev-python/css-parser/Manifest |
21 |
@@ -1,2 +1 @@ |
22 |
-DIST css-parser-1.0.6.tar.gz 336932 BLAKE2B 00cfc4597137c0aa6af3cc8a72fa3e59a1d7b83210668c8421c0703a4a38d05d73f691ff00ffac14025f021a10f85c1d3697778794d23f75db381f5e63e24b7d SHA512 4c623541e1145c91458e7e2028f6a0de652ae2189dc99672fc72f098799d6349edb051bafc0901258481fa3422346303d2ef634392889ee83a29814609cdbd43 |
23 |
DIST css-parser-1.0.7.tar.gz 348843 BLAKE2B 72fd2a0555eea2b912d3088b1d38a4bf082862a47a414c4c00718ad1b31299a3df3b2e9dcf4f22c3195520c28f5652aaf4103a9a999ceb3ea6b8c785f50bb40e SHA512 51e4ca836b18f963d798a14762bed78cbd3034598cc828dfe81b3f7d921a5bfe52374b0dc6160e1c01e40a8c8147a10664b9f7edeee867ca1086e6a4a96ff162 |
24 |
|
25 |
diff --git a/dev-python/css-parser/css-parser-1.0.6.ebuild b/dev-python/css-parser/css-parser-1.0.6.ebuild |
26 |
deleted file mode 100644 |
27 |
index c069413d87d8..000000000000 |
28 |
--- a/dev-python/css-parser/css-parser-1.0.6.ebuild |
29 |
+++ /dev/null |
30 |
@@ -1,26 +0,0 @@ |
31 |
-# Copyright 1999-2021 Gentoo Authors |
32 |
-# Distributed under the terms of the GNU General Public License v2 |
33 |
- |
34 |
-EAPI=7 |
35 |
- |
36 |
-PYTHON_COMPAT=( python3_{7..10} ) |
37 |
- |
38 |
-inherit distutils-r1 |
39 |
- |
40 |
-DESCRIPTION="A CSS Cascading Style Sheets library (fork of cssutils)" |
41 |
-HOMEPAGE="https://pypi.org/project/css-parser/" |
42 |
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
43 |
- |
44 |
-LICENSE="LGPL-2.1+" |
45 |
-SLOT="0" |
46 |
-KEYWORDS="amd64 ~arm ~arm64 ~riscv x86" |
47 |
-IUSE="test" |
48 |
-RESTRICT="!test? ( test )" |
49 |
- |
50 |
-BDEPEND="test? ( dev-python/chardet[${PYTHON_USEDEP}] )" |
51 |
- |
52 |
-PATCHES=( |
53 |
- "${FILESDIR}/${P}-fix-py3.10-test.patch" |
54 |
-) |
55 |
- |
56 |
-distutils_enable_tests setup.py |
57 |
|
58 |
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 |
59 |
deleted file mode 100644 |
60 |
index 9107adefed56..000000000000 |
61 |
--- a/dev-python/css-parser/files/css-parser-1.0.6-fix-py3.10-test.patch |
62 |
+++ /dev/null |
63 |
@@ -1,141 +0,0 @@ |
64 |
-diff --git a/css_parser_tests/basetest.py b/css_parser_tests/basetest.py |
65 |
-index 2b26906..115053f 100644 |
66 |
---- a/css_parser_tests/basetest.py |
67 |
-+++ b/css_parser_tests/basetest.py |
68 |
-@@ -149,21 +149,7 @@ class BaseTestCase(unittest.TestCase): |
69 |
- else: |
70 |
- self.fail("%s did not raise %s" % (callsig, exception)) |
71 |
- |
72 |
-- def assertRaisesMsg(self, excClass, msg, callableObj, *args, **kwargs): |
73 |
-- """ |
74 |
-- Just like unittest.TestCase.assertRaises, |
75 |
-- but checks that the message is right too. |
76 |
-- |
77 |
-- Usage:: |
78 |
-- |
79 |
-- self.assertRaisesMsg( |
80 |
-- MyException, "Exception message", |
81 |
-- my_function, (arg1, arg2) |
82 |
-- ) |
83 |
-- |
84 |
-- from |
85 |
-- http://www.nedbatchelder.com/blog/200609.html#e20060905T064418 |
86 |
-- """ |
87 |
-+ def _assertRaisesMsgSubstring(self, excClass, msg, substring_match, callableObj, *args, **kwargs): |
88 |
- try: |
89 |
- callableObj(*args, **kwargs) |
90 |
- except excClass as exc: |
91 |
-@@ -171,7 +157,7 @@ class BaseTestCase(unittest.TestCase): |
92 |
- if not msg: |
93 |
- # No message provided: any message is fine. |
94 |
- return |
95 |
-- elif excMsg == msg: |
96 |
-+ elif (msg in excMsg if substring_match else msg == excMsg): |
97 |
- # Message provided, and we got the right message: passes. |
98 |
- return |
99 |
- else: |
100 |
-@@ -189,6 +175,29 @@ class BaseTestCase(unittest.TestCase): |
101 |
- excName |
102 |
- ) |
103 |
- |
104 |
-+ def assertRaisesMsg(self, excClass, msg, callableObj, *args, **kwargs): |
105 |
-+ """ |
106 |
-+ Just like unittest.TestCase.assertRaises, |
107 |
-+ but checks that the message is right too. |
108 |
-+ |
109 |
-+ Usage:: |
110 |
-+ |
111 |
-+ self.assertRaisesMsg( |
112 |
-+ MyException, "Exception message", |
113 |
-+ my_function, arg1, arg2, |
114 |
-+ kwarg1=val, kwarg2=val) |
115 |
-+ |
116 |
-+ from |
117 |
-+ http://www.nedbatchelder.com/blog/200609.html#e20060905T064418 |
118 |
-+ """ |
119 |
-+ return self._assertRaisesMsgSubstring(excClass, msg, False, callableObj, *args, **kwargs) |
120 |
-+ |
121 |
-+ def assertRaisesMsgSubstring(self, excClass, msg, callableObj, *args, **kwargs): |
122 |
-+ """ |
123 |
-+ Just like assertRaisesMsg, but looks for substring in the message. |
124 |
-+ """ |
125 |
-+ return self._assertRaisesMsgSubstring(excClass, msg, True, callableObj, *args, **kwargs) |
126 |
-+ |
127 |
- def do_equal_p(self, tests, att='cssText', debug=False, raising=True): |
128 |
- """ |
129 |
- if raising self.p is used for parsing, else self.pf |
130 |
-diff --git a/css_parser_tests/test_property.py b/css_parser_tests/test_property.py |
131 |
-index ae6ab2a..561a5eb 100644 |
132 |
---- a/css_parser_tests/test_property.py |
133 |
-+++ b/css_parser_tests/test_property.py |
134 |
-@@ -162,8 +162,8 @@ class PropertyTestCase(basetest.BaseTestCase): |
135 |
- "Property.literalname" |
136 |
- p = css_parser.css.property.Property(r'c\olor', 'red') |
137 |
- self.assertEqual(r'c\olor', p.literalname) |
138 |
-- self.assertRaisesMsg(AttributeError, "can't set attribute", p.__setattr__, |
139 |
-- 'literalname', 'color') |
140 |
-+ self.assertRaisesMsgSubstring(AttributeError, "can't set attribute", p.__setattr__, |
141 |
-+ 'literalname', 'color') |
142 |
- |
143 |
- def test_validate(self): |
144 |
- "Property.valid" |
145 |
-diff --git a/css_parser_tests/test_selector.py b/css_parser_tests/test_selector.py |
146 |
-index c0c769e..f2746d8 100644 |
147 |
---- a/css_parser_tests/test_selector.py |
148 |
-+++ b/css_parser_tests/test_selector.py |
149 |
-@@ -412,7 +412,7 @@ class SelectorTestCase(basetest.BaseTestCase): |
150 |
- |
151 |
- # readonly |
152 |
- def _set(): selector.specificity = 1 |
153 |
-- self.assertRaisesMsg(AttributeError, "can't set attribute", _set) |
154 |
-+ self.assertRaisesMsgSubstring(AttributeError, "can't set attribute", _set) |
155 |
- |
156 |
- tests = { |
157 |
- '*': (0, 0, 0, 0), |
158 |
-diff --git a/css_parser_tests/test_selectorlist.py b/css_parser_tests/test_selectorlist.py |
159 |
-index 7028fe7..54c945a 100644 |
160 |
---- a/css_parser_tests/test_selectorlist.py |
161 |
-+++ b/css_parser_tests/test_selectorlist.py |
162 |
-@@ -11,6 +11,7 @@ from css_parser.css.selectorlist import SelectorList |
163 |
- class SelectorListTestCase(basetest.BaseTestCase): |
164 |
- |
165 |
- def setUp(self): |
166 |
-+ basetest.BaseTestCase.setUp(self) |
167 |
- self.r = SelectorList() |
168 |
- |
169 |
- def test_init(self): |
170 |
-diff --git a/run_tests.py b/run_tests.py |
171 |
-index 554c752..6507434 100755 |
172 |
---- a/run_tests.py |
173 |
-+++ b/run_tests.py |
174 |
-@@ -1,10 +1,12 @@ |
175 |
- #!/usr/bin/env python |
176 |
- # vim:fileencoding=utf-8 |
177 |
--# License: Apache 2.0 Copyright: 2017, Kovid Goyal <kovid at kovidgoyal.net> |
178 |
-+# License: LGPLv3 Copyright: 2017, Kovid Goyal <kovid at kovidgoyal.net> |
179 |
- |
180 |
--from __future__ import absolute_import, division, print_function, unicode_literals |
181 |
-+from __future__ import (absolute_import, division, print_function, |
182 |
-+ unicode_literals) |
183 |
- |
184 |
- import importlib |
185 |
-+import logging |
186 |
- import os |
187 |
- import sys |
188 |
- import unittest |
189 |
-@@ -72,6 +74,7 @@ def find_tests(): |
190 |
- |
191 |
- def run_tests(test_names=()): |
192 |
- sys.path = [base, os.path.join(base, 'src')] + sys.path |
193 |
-+ import css_parser |
194 |
- tests = find_tests() |
195 |
- suites = [] |
196 |
- for name in test_names: |
197 |
-@@ -85,6 +88,7 @@ def run_tests(test_names=()): |
198 |
- tests = unittest.TestSuite(suites) if suites else tests |
199 |
- |
200 |
- r = unittest.TextTestRunner |
201 |
-+ css_parser.log.setLevel(logging.CRITICAL) |
202 |
- result = r().run(tests) |
203 |
- |
204 |
- if not result.wasSuccessful(): |