summaryrefslogtreecommitdiff
path: root/dev-python/html5lib
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-01-24 22:45:43 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-01-24 22:45:43 +0000
commit3f6b99c9f74a0a7bfa2e18f0a7bc7057739cc00b (patch)
treee56393aac5dcc184833b4e155d45468003757d48 /dev-python/html5lib
parentb0fd0bc5c186e99078ed8d07146e8c14f1089639 (diff)
gentoo auto-resync : 24:01:2024 - 22:45:43
Diffstat (limited to 'dev-python/html5lib')
-rw-r--r--dev-python/html5lib/Manifest4
-rw-r--r--dev-python/html5lib/files/html5lib-1.1-pytest6.patch66
-rw-r--r--dev-python/html5lib/html5lib-1.1-r1.ebuild7
3 files changed, 39 insertions, 38 deletions
diff --git a/dev-python/html5lib/Manifest b/dev-python/html5lib/Manifest
index 35d57c4b9c7c..8bf6727df895 100644
--- a/dev-python/html5lib/Manifest
+++ b/dev-python/html5lib/Manifest
@@ -1,4 +1,4 @@
-AUX html5lib-1.1-pytest6.patch 7489 BLAKE2B 73117fe1e75647760d8ccaa7296b8726d88dc11252d1dd23f3dc60ce28d7fc86dd724b6ee1e6756f937eb78ea7f684a1be9ab0783621971d252fb1f4b8fbae75 SHA512 d1a8642381bafb00f7b682ae35a01168731893e44ae3509ac36d3bc1d65ea48e32099447de9c09113da4ba1d0b6f969260c199c056f145295caf1bf985dc8a54
+AUX html5lib-1.1-pytest6.patch 6862 BLAKE2B 9d11a217556f345261fa28e202eb95b5ab89ef2164158fdff7f5c935c50e83a058f2f50d2cabf294685b7ddfb407a2d04cee38a3a5a22a9232c1d635cee651dd SHA512 11ae3fdea1ee64076af500b20d4d993cfcc255924caadbd7d2cf1182961d7bd685de682b5c1c625b36b97a3820b5e9c67b7dcaed306359d8b9f745f710c5996f
DIST html5lib-1.1.tar.gz 272215 BLAKE2B 11a4fc3fb84bf8bab4af5da1de30b0892a9eb454505716b3db391187053c9aac159b1c82ae787896592b8fc850363bba9313b9d7fc617150771c3bfa1aeadefb SHA512 af7c29591007fded99be6c38e3d0ae5a4ac32d71d26046a615918ae732cb1c1ecbf754f47ceca1a53726c3843f3ecea7af87a7362281b45ff3af495815818626
-EBUILD html5lib-1.1-r1.ebuild 837 BLAKE2B 2f7db81576e9a7047a05723ccd12cf91960ab9f840ca56497737eee6a7108cca4cf2b371f92760d49916d80419ec2db5d40ecd460c25a35b81834a88f4e7f2d6 SHA512 8f493de43d7022ae46d6b2e81f60748082db6371cb38f1193b673215d95af6e022d4fa5486cb3481932752d80c0e2a84e0e14da09ac6ce624b64fd978ef3255f
+EBUILD html5lib-1.1-r1.ebuild 925 BLAKE2B 9b3d49fcdbc97e6f7fc1081bb1732c577428b529cb92b29048b388fe3781143c56e4da741fab3e517735962734b6c58fed86eea1892784a831faeb799bcbae95 SHA512 064e42b1b27163c03b93e17db6c56023af1eb765fdec06d591d1d8300c616f8a7a15b8b40d5b3d5ac399028f3370f7132cc6b22bf002f3eac08e911ea19b7481
MISC metadata.xml 617 BLAKE2B 14ba200d6b6c4198804e057d61319eb9248d7b9712acfed16f92ed24bb620e3021d161f8bfe685e710a85d02acc601bbba9ed8f0a55a160ce62b8a88bb73ba70 SHA512 0dfb83f18fb1fbe8cc5a0a4f12ce7580d9311362ae7ebecfc78e1d04251d977ca8aa75b8e2cae2e53c9487c175afae80cd09f93a4893b4f730b2f786d6fe5a82
diff --git a/dev-python/html5lib/files/html5lib-1.1-pytest6.patch b/dev-python/html5lib/files/html5lib-1.1-pytest6.patch
index a511b40abeaa..d8df5f2cf2f6 100644
--- a/dev-python/html5lib/files/html5lib-1.1-pytest6.patch
+++ b/dev-python/html5lib/files/html5lib-1.1-pytest6.patch
@@ -1,41 +1,7 @@
# https://github.com/html5lib/html5lib-python/pull/506
# https://bugs.gentoo.org/754144
-From e6bd99e8f2497194ffd0a06c6954ebb28d7526bb Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
-Date: Sat, 8 Aug 2020 13:39:22 +0200
-Subject: [PATCH] Use Node.from_parent() constructor to support pytest 6
-Add a wrapper not to break pytest 4 (needed for Python 2 support).
-
- ============================= test session starts ==============================
- platform linux -- Python 3.9.0b5, pytest-6.0.1, py-1.9.0, pluggy-0.13.1
- rootdir: /builddir/build/BUILD/html5lib-1.1, configfile: pytest.ini
- plugins: expect-1.1.0
- collected 0 items / 1 error
-
- ==================================== ERRORS ====================================
- ________________________ ERROR collecting test session _________________________
- /usr/lib/python3.9/site-packages/pluggy/hooks.py:286: in __call__
- return self._hookexec(self, self.get_hookimpls(), kwargs)
- /usr/lib/python3.9/site-packages/pluggy/manager.py:93: in _hookexec
- return self._inner_hookexec(hook, methods, kwargs)
- /usr/lib/python3.9/site-packages/pluggy/manager.py:84: in <lambda>
- self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
- html5lib/tests/conftest.py:105: in pytest_collect_file
- return TokenizerFile(path, parent)
- /usr/lib/python3.9/site-packages/_pytest/nodes.py:95: in __call__
- warnings.warn(NODE_USE_FROM_PARENT.format(name=self.__name__), stacklevel=2)
- E pytest.PytestDeprecationWarning: Direct construction of TokenizerFile has been deprecated, please use TokenizerFile.from_parent.
- E See https://docs.pytest.org/en/stable/deprecations.html#node-construction-changed-to-node-from-parent for more details.
-
-Fixes https://github.com/html5lib/html5lib-python/issues/505
----
- html5lib/tests/conftest.py | 15 ++++++++++++---
- html5lib/tests/sanitizer.py | 2 +-
- html5lib/tests/tokenizer.py | 10 +++++-----
- html5lib/tests/tree_construction.py | 20 ++++++++++----------
- requirements-test.txt | 2 +-
- 5 files changed, 29 insertions(+), 20 deletions(-)
+and part of 4a87368b71090f1432df6302f178c4babfcec93f
diff --git a/html5lib/tests/conftest.py b/html5lib/tests/conftest.py
index dad167c5..fffeb50c 100644
@@ -151,3 +117,33 @@ index 1ef6e725..fb0657bf 100644
item.add_marker(pytest.mark.treewalker)
yield item
+diff --git a/html5lib/tests/tokenizer.py b/html5lib/tests/tokenizer.py
+index cc9897a..b49d2e6 100644
+--- a/html5lib/tests/tokenizer.py
++++ b/html5lib/tests/tokenizer.py
+@@ -246,7 +246,9 @@ class TokenizerTest(pytest.Item):
+ def repr_failure(self, excinfo):
+ traceback = excinfo.traceback
+ ntraceback = traceback.cut(path=__file__)
+- excinfo.traceback = ntraceback.filter()
++ pytest_ver = getattr(pytest, "version_tuple", ())
++ filter_args = (excinfo,) if pytest_ver >= (7, 4, 0) else ()
++ excinfo.traceback = ntraceback.filter(*filter_args)
+
+ return excinfo.getrepr(funcargs=True,
+ showlocals=False,
+diff --git a/html5lib/tests/tree_construction.py b/html5lib/tests/tree_construction.py
+index fb0657b..363b48c 100644
+--- a/html5lib/tests/tree_construction.py
++++ b/html5lib/tests/tree_construction.py
+@@ -135,7 +135,9 @@ class ParserTest(pytest.Item):
+ def repr_failure(self, excinfo):
+ traceback = excinfo.traceback
+ ntraceback = traceback.cut(path=__file__)
+- excinfo.traceback = ntraceback.filter()
++ pytest_ver = getattr(pytest, "version_tuple", ())
++ filter_args = (excinfo,) if pytest_ver >= (7, 4, 0) else ()
++ excinfo.traceback = ntraceback.filter(*filter_args)
+
+ return excinfo.getrepr(funcargs=True,
+ showlocals=False,
diff --git a/dev-python/html5lib/html5lib-1.1-r1.ebuild b/dev-python/html5lib/html5lib-1.1-r1.ebuild
index 7aaf19a606af..85d2d88a1104 100644
--- a/dev-python/html5lib/html5lib-1.1-r1.ebuild
+++ b/dev-python/html5lib/html5lib-1.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -36,3 +36,8 @@ BDEPEND="
"
distutils_enable_tests pytest
+
+python_test() {
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ epytest -p pytest_expect
+}