From f1e93f67d83b3683f8dcad1d7a8b94ab473a8963 Mon Sep 17 00:00:00 2001 From: Andreas Billmeier Date: Sun, 22 Sep 2024 09:40:20 +0200 Subject: [PATCH] dev-python/lxml: enable py3.13 and disable py3.10 Signed-off-by: Andreas Billmeier --- dev-python/lxml/Manifest | 4 +- dev-python/lxml/files/lxml-5.1.0-pypy.patch | 175 ++++++++++++++++++++ dev-python/lxml/lxml-4.9.1.ebuild | 4 +- dev-python/lxml/lxml-5.1.0-pypy.patch | 175 ++++++++++++++++++++ 4 files changed, 355 insertions(+), 3 deletions(-) create mode 100644 dev-python/lxml/files/lxml-5.1.0-pypy.patch create mode 100644 dev-python/lxml/lxml-5.1.0-pypy.patch diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest index 91694190b..d5148584f 100644 --- a/dev-python/lxml/Manifest +++ b/dev-python/lxml/Manifest @@ -1,4 +1,6 @@ AUX lxml-4.6.0-tests-pypy.patch 18051 BLAKE2B 99d97fa2e874c9bec4a866c3303b54ea2ab1e6abddf148d142cb66ee035b1eab1e05eed924d34451c5db38dc37f77104539cbfc2fe45815c17445b6359dcb857 SHA512 f6c6c2b00a49e6ca19d8b9123c364003a682c2e8df0c42d8600085d1cb094ba5cedd162bfc794e7d9acfff93aac771953dca5a879c3b957af1e2e8bd1db05515 +AUX lxml-5.1.0-pypy.patch 6885 BLAKE2B 132f2b9037c662f41fd55a0846ac211a6a54a7ac0d976aee815f4dfc787636da2c479f1cd7b2152ad3bbd47fd12e1c0307188f94f8a0c86789d7a84910e46c58 SHA512 4a10ac07626cc69c64ca87ac6c63b03fb1d05631bd7433fac6eca5c46ed896be5d8bc0598d833d6a117adf88d537d8b7b07adbff0457e168def4d6139f11ac9f DIST lxml-4.9.1.gh.tar.gz 960663 BLAKE2B bb464757f9188a76661732d237f3b0f9010f51dd9c5426b578ca8fdb486d28fcfec81d4dd817b2fa0601ed9d7890e01ce71e4ea4c842b92e59dd5437200bad22 SHA512 f52d54908f92997f610638a9a3054cb73723ae81a5ad9e77918b0603ec7441b0e7d2143f8a8ac66c05cd6a0b3b298d348397b7e2df19f83c21e336514c47d910 -EBUILD lxml-4.9.1.ebuild 2679 BLAKE2B c9bec30d083adbe94c58b5d9a9af64a870bc874ed453bee3d0ec996aeded09d7d1f74ceef60e85ec58bd1ca565fd5ad814cae9b7da00fdaec85b82d832a90721 SHA512 cb7852c276c552e684130b0515de6e6b81d56a4a4a22462dc289c8b70ae9f2b074c4d927e038254a6a418ab022eebb9538d19d02b709cfbcc3d6fedbfe483ce8 +EBUILD lxml-4.9.1.ebuild 2679 BLAKE2B c248fdc054552eb352b4761d51ed192d50262075a1849d65b0b5217b51f21d64f8a918d4177ae16181f534ae6e44cb6548ce20254f9a4d581af0bc4adc370e7b SHA512 d5dced1473c3a0e29ea89c8ca2c5e45d578ce53dd3a7ce4c8c0d3af831c295032fd96d2670ebb8deb01257f62d0273df4bb881f55bb50859718f6fa5fe3bf59b +MISC lxml-5.1.0-pypy.patch 6885 BLAKE2B 132f2b9037c662f41fd55a0846ac211a6a54a7ac0d976aee815f4dfc787636da2c479f1cd7b2152ad3bbd47fd12e1c0307188f94f8a0c86789d7a84910e46c58 SHA512 4a10ac07626cc69c64ca87ac6c63b03fb1d05631bd7433fac6eca5c46ed896be5d8bc0598d833d6a117adf88d537d8b7b07adbff0457e168def4d6139f11ac9f MISC metadata.xml 497 BLAKE2B e7115c2a7a383890c4352ad4c7671726546c67e2c5f33ee9132239071776731d8264212a421e5692c0096b741150f75c2dccb8be3d49a0917c372b741f88189d SHA512 4c933fd511cbb980691f4180e0d7c1f47e367a3ed056bc84e616fd2507020493f8365835e9d186f043c5f11d91193c0200ea9f890949e7e1e8b8faee203cb025 diff --git a/dev-python/lxml/files/lxml-5.1.0-pypy.patch b/dev-python/lxml/files/lxml-5.1.0-pypy.patch new file mode 100644 index 000000000..7b50b9d30 --- /dev/null +++ b/dev-python/lxml/files/lxml-5.1.0-pypy.patch @@ -0,0 +1,175 @@ +diff --git a/src/lxml/tests/test_errors.py b/src/lxml/tests/test_errors.py +index fa735c28..9337bc04 100644 +--- a/src/lxml/tests/test_errors.py ++++ b/src/lxml/tests/test_errors.py +@@ -10,3 +10,3 @@ from lxml import etree + +-from .common_imports import HelperTestCase ++from .common_imports import HelperTestCase, IS_PYPY + +@@ -24,2 +24,3 @@ class ErrorTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_element_cyclic_gc_none(self): +diff --git a/src/lxml/tests/test_http_io.py b/src/lxml/tests/test_http_io.py +index 8385e393..0b259299 100644 +--- a/src/lxml/tests/test_http_io.py ++++ b/src/lxml/tests/test_http_io.py +@@ -10,3 +10,3 @@ import gzip + +-from .common_imports import etree, HelperTestCase, BytesIO, _bytes ++from .common_imports import etree, HelperTestCase, BytesIO, _bytes, IS_PYPY + from .dummy_http_server import webserver, HTTPRequestCollector +@@ -14,2 +14,3 @@ from .dummy_http_server import webserver, HTTPRequestCollector + ++@unittest.skipIf(IS_PYPY, "broken on pypy") + class HttpIOTestCase(HelperTestCase): +diff --git a/src/lxml/tests/test_nsclasses.py b/src/lxml/tests/test_nsclasses.py +index 750dc1ed..adbec11c 100644 +--- a/src/lxml/tests/test_nsclasses.py ++++ b/src/lxml/tests/test_nsclasses.py +@@ -8,3 +8,3 @@ import unittest + +-from .common_imports import etree, HelperTestCase, _bytes, make_doctest ++from .common_imports import etree, HelperTestCase, _bytes, make_doctest, IS_PYPY + +@@ -45,2 +45,3 @@ class ETreeNamespaceClassesTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_ns_classes(self): +diff --git a/src/lxml/tests/test_objectify.py b/src/lxml/tests/test_objectify.py +index 1c8ff47c..326c5316 100644 +--- a/src/lxml/tests/test_objectify.py ++++ b/src/lxml/tests/test_objectify.py +@@ -10,3 +10,4 @@ import unittest + from .common_imports import ( +- etree, HelperTestCase, fileInTestDir, doctest, make_doctest, _bytes, _str, BytesIO ++ etree, HelperTestCase, fileInTestDir, doctest, make_doctest, _bytes, _str, BytesIO, ++ IS_PYPY + ) +@@ -383,2 +384,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_setattr(self): +@@ -818,2 +820,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_build_tree(self): +@@ -847,2 +850,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_bool(self): +@@ -884,2 +888,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_str(self): +@@ -891,2 +896,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_str_intliteral(self): +@@ -898,2 +904,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_str_floatliteral(self): +@@ -905,2 +912,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_str_mul(self): +@@ -917,2 +925,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_str_add(self): +@@ -992,2 +1001,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_ustr(self): +@@ -999,2 +1009,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_ustr_intliteral(self): +@@ -1006,2 +1017,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_ustr_floatliteral(self): +@@ -1013,2 +1025,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_ustr_mul(self): +@@ -1025,2 +1038,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_ustr_add(self): +@@ -1050,2 +1064,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_int(self): +@@ -1066,2 +1081,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_float(self): +@@ -1082,2 +1098,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_float_precision(self): +@@ -1101,2 +1118,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_float_precision_consistency(self): +@@ -1187,2 +1205,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_unregistered(self): +@@ -1349,2 +1368,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_str_cmp(self): +@@ -1376,2 +1396,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_int_cmp(self): +@@ -1398,2 +1419,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_bool_cmp(self): +@@ -2067,2 +2089,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_registered_type_stringify(self): +@@ -2537,2 +2560,3 @@ class ObjectifyTestCase(HelperTestCase): + # type-looked-up as ObjectifiedElement (no annotations) ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_efactory_int(self): +@@ -2542,2 +2566,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_efactory_float(self): +@@ -2547,2 +2572,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_efactory_str(self): +@@ -2552,2 +2578,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_efactory_unicode(self): +@@ -2557,2 +2584,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_efactory_bool(self): +@@ -2562,2 +2590,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_efactory_none(self): +@@ -2567,2 +2596,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_efactory_value_concatenation(self): +@@ -2577,2 +2607,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_efactory_nested(self): +@@ -2745,3 +2776,4 @@ def test_suite(): + suite.addTests(doctest.DocTestSuite(objectify)) +- suite.addTests([make_doctest('../../../doc/objectify.txt')]) ++ if not IS_PYPY: ++ suite.addTests([make_doctest('../../../doc/objectify.txt')]) + return suite diff --git a/dev-python/lxml/lxml-4.9.1.ebuild b/dev-python/lxml/lxml-4.9.1.ebuild index b47c478a0..a737700fe 100644 --- a/dev-python/lxml/lxml-4.9.1.ebuild +++ b/dev-python/lxml/lxml-4.9.1.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_COMPAT=( python3_{11..13} ) inherit distutils-r1 optfeature toolchain-funcs diff --git a/dev-python/lxml/lxml-5.1.0-pypy.patch b/dev-python/lxml/lxml-5.1.0-pypy.patch new file mode 100644 index 000000000..7b50b9d30 --- /dev/null +++ b/dev-python/lxml/lxml-5.1.0-pypy.patch @@ -0,0 +1,175 @@ +diff --git a/src/lxml/tests/test_errors.py b/src/lxml/tests/test_errors.py +index fa735c28..9337bc04 100644 +--- a/src/lxml/tests/test_errors.py ++++ b/src/lxml/tests/test_errors.py +@@ -10,3 +10,3 @@ from lxml import etree + +-from .common_imports import HelperTestCase ++from .common_imports import HelperTestCase, IS_PYPY + +@@ -24,2 +24,3 @@ class ErrorTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_element_cyclic_gc_none(self): +diff --git a/src/lxml/tests/test_http_io.py b/src/lxml/tests/test_http_io.py +index 8385e393..0b259299 100644 +--- a/src/lxml/tests/test_http_io.py ++++ b/src/lxml/tests/test_http_io.py +@@ -10,3 +10,3 @@ import gzip + +-from .common_imports import etree, HelperTestCase, BytesIO, _bytes ++from .common_imports import etree, HelperTestCase, BytesIO, _bytes, IS_PYPY + from .dummy_http_server import webserver, HTTPRequestCollector +@@ -14,2 +14,3 @@ from .dummy_http_server import webserver, HTTPRequestCollector + ++@unittest.skipIf(IS_PYPY, "broken on pypy") + class HttpIOTestCase(HelperTestCase): +diff --git a/src/lxml/tests/test_nsclasses.py b/src/lxml/tests/test_nsclasses.py +index 750dc1ed..adbec11c 100644 +--- a/src/lxml/tests/test_nsclasses.py ++++ b/src/lxml/tests/test_nsclasses.py +@@ -8,3 +8,3 @@ import unittest + +-from .common_imports import etree, HelperTestCase, _bytes, make_doctest ++from .common_imports import etree, HelperTestCase, _bytes, make_doctest, IS_PYPY + +@@ -45,2 +45,3 @@ class ETreeNamespaceClassesTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_ns_classes(self): +diff --git a/src/lxml/tests/test_objectify.py b/src/lxml/tests/test_objectify.py +index 1c8ff47c..326c5316 100644 +--- a/src/lxml/tests/test_objectify.py ++++ b/src/lxml/tests/test_objectify.py +@@ -10,3 +10,4 @@ import unittest + from .common_imports import ( +- etree, HelperTestCase, fileInTestDir, doctest, make_doctest, _bytes, _str, BytesIO ++ etree, HelperTestCase, fileInTestDir, doctest, make_doctest, _bytes, _str, BytesIO, ++ IS_PYPY + ) +@@ -383,2 +384,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_setattr(self): +@@ -818,2 +820,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_build_tree(self): +@@ -847,2 +850,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_bool(self): +@@ -884,2 +888,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_str(self): +@@ -891,2 +896,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_str_intliteral(self): +@@ -898,2 +904,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_str_floatliteral(self): +@@ -905,2 +912,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_str_mul(self): +@@ -917,2 +925,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_str_add(self): +@@ -992,2 +1001,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_ustr(self): +@@ -999,2 +1009,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_ustr_intliteral(self): +@@ -1006,2 +1017,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_ustr_floatliteral(self): +@@ -1013,2 +1025,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_ustr_mul(self): +@@ -1025,2 +1038,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_ustr_add(self): +@@ -1050,2 +1064,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_int(self): +@@ -1066,2 +1081,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_float(self): +@@ -1082,2 +1098,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_float_precision(self): +@@ -1101,2 +1118,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_float_precision_consistency(self): +@@ -1187,2 +1205,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_unregistered(self): +@@ -1349,2 +1368,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_str_cmp(self): +@@ -1376,2 +1396,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_int_cmp(self): +@@ -1398,2 +1419,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_type_bool_cmp(self): +@@ -2067,2 +2089,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_registered_type_stringify(self): +@@ -2537,2 +2560,3 @@ class ObjectifyTestCase(HelperTestCase): + # type-looked-up as ObjectifiedElement (no annotations) ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_efactory_int(self): +@@ -2542,2 +2566,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_efactory_float(self): +@@ -2547,2 +2572,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_efactory_str(self): +@@ -2552,2 +2578,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_efactory_unicode(self): +@@ -2557,2 +2584,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_efactory_bool(self): +@@ -2562,2 +2590,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_efactory_none(self): +@@ -2567,2 +2596,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_efactory_value_concatenation(self): +@@ -2577,2 +2607,3 @@ class ObjectifyTestCase(HelperTestCase): + ++ @unittest.skipIf(IS_PYPY, "broken on pypy") + def test_efactory_nested(self): +@@ -2745,3 +2776,4 @@ def test_suite(): + suite.addTests(doctest.DocTestSuite(objectify)) +- suite.addTests([make_doctest('../../../doc/objectify.txt')]) ++ if not IS_PYPY: ++ suite.addTests([make_doctest('../../../doc/objectify.txt')]) + return suite