Gentoo Archives: gentoo-commits

From: Aaron Bauman <bman@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/files/
Date: Tue, 02 Jun 2020 04:28:31
Message-Id: 1591072080.33dcd1e862f8c08509ac7d63cd90411159448053.bman@gentoo
1 commit: 33dcd1e862f8c08509ac7d63cd90411159448053
2 Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Tue May 19 19:21:40 2020 +0000
4 Commit: Aaron Bauman <bman <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 2 04:28:00 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33dcd1e8
7
8 dev-python/lxml: remove unused patch
9
10 Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
11 Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>
12
13 dev-python/lxml/files/lxml-4.4.2-tests-pypy.patch | 415 ----------------------
14 1 file changed, 415 deletions(-)
15
16 diff --git a/dev-python/lxml/files/lxml-4.4.2-tests-pypy.patch b/dev-python/lxml/files/lxml-4.4.2-tests-pypy.patch
17 deleted file mode 100644
18 index 780970897f8..00000000000
19 --- a/dev-python/lxml/files/lxml-4.4.2-tests-pypy.patch
20 +++ /dev/null
21 @@ -1,415 +0,0 @@
22 -diff --git a/src/lxml/tests/test_elementtree.py b/src/lxml/tests/test_elementtree.py
23 -index 435807a5..3999de1f 100644
24 ---- a/src/lxml/tests/test_elementtree.py
25 -+++ b/src/lxml/tests/test_elementtree.py
26 -@@ -27,7 +27,7 @@ if this_dir not in sys.path:
27 - from common_imports import BytesIO, etree, HelperTestCase
28 - from common_imports import ElementTree, cElementTree, ET_VERSION, CET_VERSION
29 - from common_imports import filter_by_version, fileInTestDir, canonicalize, tmpfile
30 --from common_imports import _str, _bytes, unicode, next, IS_PYTHON2
31 -+from common_imports import _str, _bytes, unicode, next, IS_PYTHON2, IS_PYPY
32 -
33 - if cElementTree is not None and (CET_VERSION <= (1,0,7) or sys.version_info[0] >= 3):
34 - cElementTree = None
35 -@@ -2928,6 +2928,7 @@ class _ETreeTestCaseBase(HelperTestCase):
36 - self.assertEqual('TEST', root2[0].get('{%s}a' % ns_href))
37 -
38 - required_versions_ET['test_register_namespace'] = (1,3)
39 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
40 - def test_register_namespace(self):
41 - # ET 1.3+
42 - Element = self.etree.Element
43 -diff --git a/src/lxml/tests/test_errors.py b/src/lxml/tests/test_errors.py
44 -index 9dc648eb..1853e546 100644
45 ---- a/src/lxml/tests/test_errors.py
46 -+++ b/src/lxml/tests/test_errors.py
47 -@@ -13,7 +13,7 @@ this_dir = os.path.dirname(__file__)
48 - if this_dir not in sys.path:
49 - sys.path.insert(0, this_dir) # needed for Py3
50 -
51 --from common_imports import HelperTestCase
52 -+from common_imports import HelperTestCase, IS_PYPY
53 -
54 -
55 - class ErrorTestCase(HelperTestCase):
56 -@@ -27,6 +27,7 @@ class ErrorTestCase(HelperTestCase):
57 - def test_empty_parse(self):
58 - self.assertRaises(etree.XMLSyntaxError, etree.fromstring, '')
59 -
60 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
61 - def test_element_cyclic_gc_none(self):
62 - # test if cyclic reference can crash etree
63 - Element = self.etree.Element
64 -diff --git a/src/lxml/tests/test_http_io.py b/src/lxml/tests/test_http_io.py
65 -index d058fad2..b905fdfb 100644
66 ---- a/src/lxml/tests/test_http_io.py
67 -+++ b/src/lxml/tests/test_http_io.py
68 -@@ -17,10 +17,11 @@ if this_dir not in sys.path:
69 - sys.path.insert(0, this_dir) # needed for Py3
70 -
71 - from .common_imports import (
72 -- etree, HelperTestCase, BytesIO, _bytes)
73 -+ etree, HelperTestCase, BytesIO, _bytes, IS_PYPY)
74 - from .dummy_http_server import webserver, HTTPRequestCollector
75 -
76 -
77 -+@××××××××.skipIf(IS_PYPY, "broken on pypy")
78 - class HttpIOTestCase(HelperTestCase):
79 - etree = etree
80 -
81 -diff --git a/src/lxml/tests/test_nsclasses.py b/src/lxml/tests/test_nsclasses.py
82 -index b8b41063..e8d275b9 100644
83 ---- a/src/lxml/tests/test_nsclasses.py
84 -+++ b/src/lxml/tests/test_nsclasses.py
85 -@@ -12,7 +12,7 @@ if this_dir not in sys.path:
86 - sys.path.insert(0, this_dir) # needed for Py3
87 -
88 - from common_imports import etree, HelperTestCase, _bytes
89 --from common_imports import doctest, make_doctest
90 -+from common_imports import doctest, make_doctest, IS_PYPY
91 -
92 - class ETreeNamespaceClassesTestCase(HelperTestCase):
93 -
94 -@@ -49,6 +49,7 @@ class ETreeNamespaceClassesTestCase(HelperTestCase):
95 - self.Namespace('ns02').clear()
96 - self.Namespace('ns03').clear()
97 -
98 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
99 - def test_ns_classes(self):
100 - bluff_dict = {'bluff' : self.bluff_class}
101 - maeh_dict = {'maeh' : self.maeh_class}
102 -diff --git a/src/lxml/tests/test_objectify.py b/src/lxml/tests/test_objectify.py
103 -index 78035d04..45e73d97 100644
104 ---- a/src/lxml/tests/test_objectify.py
105 -+++ b/src/lxml/tests/test_objectify.py
106 -@@ -13,7 +13,7 @@ if this_dir not in sys.path:
107 -
108 - from common_imports import etree, HelperTestCase, fileInTestDir
109 - from common_imports import SillyFileLike, canonicalize, doctest, make_doctest
110 --from common_imports import _bytes, _str, StringIO, BytesIO
111 -+from common_imports import _bytes, _str, StringIO, BytesIO, IS_PYPY
112 -
113 - from lxml import objectify
114 -
115 -@@ -216,11 +216,13 @@ class ObjectifyTestCase(HelperTestCase):
116 - expected.update(DEFAULT_NSMAP)
117 - self.assertEqual(root.value.nsmap, expected)
118 -
119 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
120 - def test_date_element_efactory_text(self):
121 - # ObjectifiedDataElement can also be used as E-Factory
122 - value = objectify.ObjectifiedDataElement('test', 'toast')
123 - self.assertEqual(value.text, 'testtoast')
124 -
125 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
126 - def test_date_element_efactory_tail(self):
127 - # ObjectifiedDataElement can also be used as E-Factory
128 - value = objectify.ObjectifiedElement(objectify.ObjectifiedDataElement(), 'test', 'toast')
129 -@@ -377,6 +379,7 @@ class ObjectifyTestCase(HelperTestCase):
130 - self.assertEqual("4", getattr(root.c1, "{}c2").text)
131 - self.assertEqual("0", getattr(root.c1, "c2").text)
132 -
133 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
134 - def test_setattr(self):
135 - for val in [
136 - 2, 2**32, 1.2, "Won't get fooled again",
137 -@@ -812,6 +815,7 @@ class ObjectifyTestCase(HelperTestCase):
138 - self.assertEqual(3, len(root.findall(".//b")))
139 - self.assertEqual(2, len(root.findall("b")))
140 -
141 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
142 - def test_build_tree(self):
143 - root = self.Element('root')
144 - root.a = 5
145 -@@ -841,6 +845,7 @@ class ObjectifyTestCase(HelperTestCase):
146 - self.assertEqual(value, None)
147 - self.assertEqual(value.get(XML_SCHEMA_NIL_ATTR), "true")
148 -
149 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
150 - def test_type_bool(self):
151 - Element = self.Element
152 - SubElement = self.etree.SubElement
153 -@@ -874,6 +879,7 @@ class ObjectifyTestCase(HelperTestCase):
154 - self.assertTrue(isinstance(value, objectify.BoolElement))
155 - self.assertEqual(value, False)
156 -
157 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
158 - def test_type_str(self):
159 - Element = self.Element
160 - SubElement = self.etree.SubElement
161 -@@ -881,6 +887,7 @@ class ObjectifyTestCase(HelperTestCase):
162 - root.s = "test"
163 - self.assertTrue(isinstance(root.s, objectify.StringElement))
164 -
165 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
166 - def test_type_str_intliteral(self):
167 - Element = self.Element
168 - SubElement = self.etree.SubElement
169 -@@ -888,6 +895,7 @@ class ObjectifyTestCase(HelperTestCase):
170 - root.s = "3"
171 - self.assertTrue(isinstance(root.s, objectify.StringElement))
172 -
173 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
174 - def test_type_str_floatliteral(self):
175 - Element = self.Element
176 - SubElement = self.etree.SubElement
177 -@@ -895,6 +903,7 @@ class ObjectifyTestCase(HelperTestCase):
178 - root.s = "3.72"
179 - self.assertTrue(isinstance(root.s, objectify.StringElement))
180 -
181 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
182 - def test_type_str_mul(self):
183 - Element = self.Element
184 - SubElement = self.etree.SubElement
185 -@@ -907,6 +916,7 @@ class ObjectifyTestCase(HelperTestCase):
186 - self.assertRaises(TypeError, operator.mul, root.s, "honk")
187 - self.assertRaises(TypeError, operator.mul, "honk", root.s)
188 -
189 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
190 - def test_type_str_add(self):
191 - Element = self.Element
192 - SubElement = self.etree.SubElement
193 -@@ -917,6 +927,7 @@ class ObjectifyTestCase(HelperTestCase):
194 - self.assertEqual("test" + s, root.s + s)
195 - self.assertEqual(s + "test", s + root.s)
196 -
197 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
198 - def test_type_str_mod(self):
199 - s = "%d %f %s %r"
200 - el = objectify.DataElement(s)
201 -@@ -982,6 +993,7 @@ class ObjectifyTestCase(HelperTestCase):
202 - self.assertTrue(isinstance(value, objectify.StringElement))
203 - self.assertEqual(value, "3.20")
204 -
205 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
206 - def test_type_ustr(self):
207 - Element = self.Element
208 - SubElement = self.etree.SubElement
209 -@@ -989,6 +1001,7 @@ class ObjectifyTestCase(HelperTestCase):
210 - root.s = _str("test")
211 - self.assertTrue(isinstance(root.s, objectify.StringElement))
212 -
213 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
214 - def test_type_ustr_intliteral(self):
215 - Element = self.Element
216 - SubElement = self.etree.SubElement
217 -@@ -996,6 +1009,7 @@ class ObjectifyTestCase(HelperTestCase):
218 - root.s = _str("3")
219 - self.assertTrue(isinstance(root.s, objectify.StringElement))
220 -
221 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
222 - def test_type_ustr_floatliteral(self):
223 - Element = self.Element
224 - SubElement = self.etree.SubElement
225 -@@ -1003,6 +1017,7 @@ class ObjectifyTestCase(HelperTestCase):
226 - root.s = _str("3.72")
227 - self.assertTrue(isinstance(root.s, objectify.StringElement))
228 -
229 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
230 - def test_type_ustr_mul(self):
231 - Element = self.Element
232 - SubElement = self.etree.SubElement
233 -@@ -1015,6 +1030,7 @@ class ObjectifyTestCase(HelperTestCase):
234 - self.assertRaises(TypeError, operator.mul, root.s, _str("honk"))
235 - self.assertRaises(TypeError, operator.mul, _str("honk"), root.s)
236 -
237 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
238 - def test_type_ustr_add(self):
239 - Element = self.Element
240 - SubElement = self.etree.SubElement
241 -@@ -1040,6 +1056,7 @@ class ObjectifyTestCase(HelperTestCase):
242 - self.assertTrue(isinstance(value, objectify.StringElement))
243 - self.assertEqual(value, _str("3.20"))
244 -
245 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
246 - def test_type_int(self):
247 - Element = self.Element
248 - root = Element("{objectified}root")
249 -@@ -1056,6 +1073,7 @@ class ObjectifyTestCase(HelperTestCase):
250 - value = objectify.DataElement(123)
251 - self.assertEqual(hash(value), hash(123))
252 -
253 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
254 - def test_type_float(self):
255 - Element = self.Element
256 - SubElement = self.etree.SubElement
257 -@@ -1072,6 +1090,7 @@ class ObjectifyTestCase(HelperTestCase):
258 - value = objectify.DataElement(5.5)
259 - self.assertEqual(hash(value), hash(5.5))
260 -
261 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
262 - def test_type_float_precision(self):
263 - # test not losing precision by shortened float str() value
264 - # repr(2.305064300557): '2.305064300557'
265 -@@ -1091,6 +1110,7 @@ class ObjectifyTestCase(HelperTestCase):
266 - s = "2.305064300557"
267 - self.assertEqual(objectify.FloatElement(s), float(s))
268 -
269 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
270 - def test_type_float_precision_consistency(self):
271 - # test consistent FloatElement values for the different instantiation
272 - # possibilities
273 -@@ -1172,6 +1192,7 @@ class ObjectifyTestCase(HelperTestCase):
274 - self.assertEqual(value.text, None)
275 - self.assertEqual(value.pyval, None)
276 -
277 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
278 - def test_type_unregistered(self):
279 - Element = self.Element
280 - SubElement = self.etree.SubElement
281 -@@ -1334,6 +1355,7 @@ class ObjectifyTestCase(HelperTestCase):
282 - self.assertEqual(["why", "try"],
283 - strs)
284 -
285 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
286 - def test_type_str_cmp(self):
287 - XML = self.XML
288 - root = XML(_bytes('<root><b>test</b><b>taste</b><b></b><b/></root>'))
289 -@@ -1361,6 +1383,7 @@ class ObjectifyTestCase(HelperTestCase):
290 - self.assertEqual(root.b, "")
291 - self.assertEqual("", root.b)
292 -
293 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
294 - def test_type_int_cmp(self):
295 - XML = self.XML
296 - root = XML(_bytes('<root><b>5</b><b>6</b></root>'))
297 -@@ -1383,6 +1406,7 @@ class ObjectifyTestCase(HelperTestCase):
298 -
299 - # float + long share the NumberElement implementation with int
300 -
301 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
302 - def test_type_bool_cmp(self):
303 - XML = self.XML
304 - root = XML(_bytes('<root><b>false</b><b>true</b></root>'))
305 -@@ -2052,6 +2076,7 @@ class ObjectifyTestCase(HelperTestCase):
306 - before = [objectify.getRegisteredTypes()[0].name],
307 - after = [objectify.getRegisteredTypes()[1].name])
308 -
309 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
310 - def test_registered_type_stringify(self):
311 - from datetime import datetime
312 - def parse_date(value):
313 -@@ -2522,46 +2547,55 @@ class ObjectifyTestCase(HelperTestCase):
314 -
315 - # E-Factory tests, need to use sub-elements as root element is always
316 - # type-looked-up as ObjectifiedElement (no annotations)
317 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
318 - def test_efactory_int(self):
319 - E = objectify.E
320 - root = E.root(E.val(23))
321 - self.assertTrue(isinstance(root.val, objectify.IntElement))
322 -
323 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
324 - def test_efactory_float(self):
325 - E = objectify.E
326 - root = E.root(E.val(233.23))
327 - self.assertTrue(isinstance(root.val, objectify.FloatElement))
328 -
329 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
330 - def test_efactory_str(self):
331 - E = objectify.E
332 - root = E.root(E.val("what?"))
333 - self.assertTrue(isinstance(root.val, objectify.StringElement))
334 -
335 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
336 - def test_efactory_unicode(self):
337 - E = objectify.E
338 - root = E.root(E.val(_str("blöödy häll", encoding="ISO-8859-1")))
339 - self.assertTrue(isinstance(root.val, objectify.StringElement))
340 -
341 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
342 - def test_efactory_bool(self):
343 - E = objectify.E
344 - root = E.root(E.val(True))
345 - self.assertTrue(isinstance(root.val, objectify.BoolElement))
346 -
347 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
348 - def test_efactory_none(self):
349 - E = objectify.E
350 - root = E.root(E.val(None))
351 - self.assertTrue(isinstance(root.val, objectify.NoneElement))
352 -
353 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
354 - def test_efactory_value_concatenation(self):
355 - E = objectify.E
356 - root = E.root(E.val(1, "foo", 2.0, "bar ", True, None))
357 - self.assertTrue(isinstance(root.val, objectify.StringElement))
358 -
359 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
360 - def test_efactory_attrib(self):
361 - E = objectify.E
362 - root = E.root(foo="bar")
363 - self.assertEqual(root.get("foo"), "bar")
364 -
365 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
366 - def test_efactory_nested(self):
367 - E = objectify.E
368 - DataElement = objectify.DataElement
369 -@@ -2576,6 +2610,7 @@ class ObjectifyTestCase(HelperTestCase):
370 - self.assertTrue(isinstance(root.value[0], objectify.IntElement))
371 - self.assertTrue(isinstance(root.value[1], objectify.FloatElement))
372 -
373 -+ @unittest.skipIf(IS_PYPY, "broken on pypy")
374 - def test_efactory_subtype(self):
375 - class Attribute(objectify.ObjectifiedDataElement):
376 - def __init__(self):
377 -@@ -2677,7 +2712,8 @@ def test_suite():
378 - suite = unittest.TestSuite()
379 - suite.addTests([unittest.makeSuite(ObjectifyTestCase)])
380 - suite.addTests(doctest.DocTestSuite(objectify))
381 -- suite.addTests([make_doctest('../../../doc/objectify.txt')])
382 -+ if not IS_PYPY:
383 -+ suite.addTests([make_doctest('../../../doc/objectify.txt')])
384 - return suite
385 -
386 - if __name__ == '__main__':
387 -diff --git a/src/lxml/tests/test_xpathevaluator.py b/src/lxml/tests/test_xpathevaluator.py
388 -index a2df6ddb..0951d5e1 100644
389 ---- a/src/lxml/tests/test_xpathevaluator.py
390 -+++ b/src/lxml/tests/test_xpathevaluator.py
391 -@@ -11,7 +11,7 @@ if this_dir not in sys.path:
392 - sys.path.insert(0, this_dir) # needed for Py3
393 -
394 - from common_imports import etree, HelperTestCase, _bytes, BytesIO
395 --from common_imports import doctest, make_doctest
396 -+from common_imports import doctest, make_doctest, IS_PYPY
397 -
398 - class ETreeXPathTestCase(HelperTestCase):
399 - """XPath tests etree"""
400 -@@ -742,8 +742,9 @@ def test_suite():
401 - suite.addTests([unittest.makeSuite(ETreeXPathExsltTestCase)])
402 - suite.addTests([unittest.makeSuite(ETreeETXPathClassTestCase)])
403 - suite.addTests([doctest.DocTestSuite()])
404 -- suite.addTests(
405 -- [make_doctest('../../../doc/xpathxslt.txt')])
406 -+ if not IS_PYPY:
407 -+ suite.addTests(
408 -+ [make_doctest('../../../doc/xpathxslt.txt')])
409 - return suite
410 -
411 - if __name__ == '__main__':
412 -diff --git a/src/lxml/tests/test_xslt.py b/src/lxml/tests/test_xslt.py
413 -index 08d03514..b81716c5 100644
414 ---- a/src/lxml/tests/test_xslt.py
415 -+++ b/src/lxml/tests/test_xslt.py
416 -@@ -19,6 +19,8 @@ if this_dir not in sys.path:
417 - sys.path.insert(0, this_dir) # needed for Py3
418 -
419 - is_python3 = sys.version_info[0] >= 3
420 -+is_pypy = (getattr(sys, 'implementation', None) == 'pypy' or
421 -+ getattr(sys, 'pypy_version_info', None) is not None)
422 -
423 - try:
424 - unicode
425 -@@ -2085,8 +2087,9 @@ def test_suite():
426 - suite.addTests([unittest.makeSuite(Py3XSLTTestCase)])
427 - suite.addTests(
428 - [make_doctest('../../../doc/extensions.txt')])
429 -- suite.addTests(
430 -- [make_doctest('../../../doc/xpathxslt.txt')])
431 -+ if not is_pypy:
432 -+ suite.addTests(
433 -+ [make_doctest('../../../doc/xpathxslt.txt')])
434 - return suite
435 -
436 - if __name__ == '__main__':