diff --git a/pytest74.patch b/pytest74.patch new file mode 100644 index 0000000..656abd0 --- /dev/null +++ b/pytest74.patch @@ -0,0 +1,26 @@ +Index: html5lib-1.1/html5lib/tests/tokenizer.py +=================================================================== +--- html5lib-1.1.orig/html5lib/tests/tokenizer.py ++++ html5lib-1.1/html5lib/tests/tokenizer.py +@@ -246,7 +246,7 @@ class TokenizerTest(pytest.Item): + def repr_failure(self, excinfo): + traceback = excinfo.traceback + ntraceback = traceback.cut(path=__file__) +- excinfo.traceback = ntraceback.filter() ++ excinfo.traceback = ntraceback.filter(excinfo) + + return excinfo.getrepr(funcargs=True, + showlocals=False, +Index: html5lib-1.1/html5lib/tests/tree_construction.py +=================================================================== +--- html5lib-1.1.orig/html5lib/tests/tree_construction.py ++++ html5lib-1.1/html5lib/tests/tree_construction.py +@@ -135,7 +135,7 @@ class ParserTest(pytest.Item): + def repr_failure(self, excinfo): + traceback = excinfo.traceback + ntraceback = traceback.cut(path=__file__) +- excinfo.traceback = ntraceback.filter() ++ excinfo.traceback = ntraceback.filter(excinfo) + + return excinfo.getrepr(funcargs=True, + showlocals=False, diff --git a/python-html5lib.changes b/python-html5lib.changes index 3eef0a8..07f8610 100644 --- a/python-html5lib.changes +++ b/python-html5lib.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jul 27 07:50:37 UTC 2023 - Markéta Machová + +- Add pytest74.patch to fix tests with pytest 7.4+ + ------------------------------------------------------------------- Fri Apr 21 12:26:16 UTC 2023 - Dirk Müller diff --git a/python-html5lib.spec b/python-html5lib.spec index 358fce3..0207202 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -29,6 +29,8 @@ Source: https://files.pythonhosted.org/packages/source/h/html5lib/html5l Patch0: pytest6.patch # https://github.com/html5lib/html5lib-python/issues/541 Patch1: python-html5lib-no-mock.patch +# PATCH-FIX-UPSTREAM https://github.com/html5lib/html5lib-python/pull/570 adapt testsuite to changes in pytest 7.4 +Patch2: pytest74.patch BuildRequires: %{python_module Genshi} BuildRequires: %{python_module lxml} BuildRequires: %{python_module pytest >= 4.0}