Compare commits

..

1 Commits
epel9 ... i10ce

8
.gitignore vendored

@ -1,7 +1 @@
/html5lib-0.90.zip SOURCES/html5lib-1.1.tar.gz
/html5lib-0.95.tar.gz
/html5lib-1.0b2.tar.gz
/html5lib-0.999.tar.gz
/0.999999999.tar.gz
/html5lib-1.0.1.tar.gz
/html5lib-1.1.tar.gz

@ -0,0 +1 @@
6d1348b6356b62305e4a410df9dfd02143d841a1 SOURCES/html5lib-1.1.tar.gz

@ -0,0 +1,49 @@
From 46c9caf733ea16f272ad2f131de9e78e2280d0ca Mon Sep 17 00:00:00 2001
From: Lumir Balhar <lbalhar@redhat.com>
Date: Wed, 9 Aug 2023 11:55:53 +0200
Subject: [PATCH] Fix compatibility with pytest 7.4.0
Fixes: https://github.com/html5lib/html5lib-python/issues/572
---
html5lib/tests/tokenizer.py | 8 +++++++-
html5lib/tests/tree_construction.py | 8 +++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/html5lib/tests/tokenizer.py b/html5lib/tests/tokenizer.py
index cc9897a4..8c4b1629 100644
--- a/html5lib/tests/tokenizer.py
+++ b/html5lib/tests/tokenizer.py
@@ -246,7 +246,13 @@ def runtest(self):
def repr_failure(self, excinfo):
traceback = excinfo.traceback
ntraceback = traceback.cut(path=__file__)
- excinfo.traceback = ntraceback.filter()
+
+ if pytest.version_tuple >= (7, 4, 0):
+ filter_args = (excinfo,)
+ else:
+ filter_args = ()
+
+ 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 fb0657bf..c7c91bec 100644
--- a/html5lib/tests/tree_construction.py
+++ b/html5lib/tests/tree_construction.py
@@ -135,7 +135,13 @@ def runtest(self):
def repr_failure(self, excinfo):
traceback = excinfo.traceback
ntraceback = traceback.cut(path=__file__)
- excinfo.traceback = ntraceback.filter()
+
+ if pytest.version_tuple >= (7, 4, 0):
+ filter_args = (excinfo,)
+ else:
+ filter_args = ()
+
+ excinfo.traceback = ntraceback.filter(*filter_args)
return excinfo.getrepr(funcargs=True,
showlocals=False,

@ -1,7 +1,17 @@
## START: Set by rpmautospec
## (rpmautospec version 0.7.3)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 25;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec
Name: python-html5lib Name: python-html5lib
Summary: A python based HTML parser/tokenizer Summary: A python based HTML parser/tokenizer
Version: 1.1 Version: 1.1
Release: 8%{?dist} Release: %autorelease
Epoch: 1 Epoch: 1
License: MIT License: MIT
URL: https://github.com/html5lib/html5lib-python URL: https://github.com/html5lib/html5lib-python
@ -9,6 +19,8 @@ Source: %{pypi_source html5lib}
# Fix compatibility with pytest 6 # Fix compatibility with pytest 6
Patch: %{url}/pull/506.patch Patch: %{url}/pull/506.patch
# Fix compatibility with pytest 7.4.0
Patch: %{url}/pull/573.patch
BuildArch: noarch BuildArch: noarch
@ -63,6 +75,37 @@ sed -i 's/from mock import/from unittest.mock import/' html5lib/tests/test_meta.
%changelog %changelog
* Sat Jan 04 2025 Arkady L. Shane <tigro@msvsphere-os.ru> - 1.1-25
- Rebuilt for MSVSphere 10
## START: Generated by rpmautospec
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 1:1.1-24
- Rebuilt for Python 3.13
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Jun 14 2023 Python Maint <python-maint@redhat.com> - 1:1.1-12
- Rebuilt for Python 3.12
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1:1.1-9
- Rebuilt for Python 3.11
* Mon Jan 31 2022 Miro Hrončok <mhroncok@redhat.com> - 1:1.1-8 * Mon Jan 31 2022 Miro Hrončok <mhroncok@redhat.com> - 1:1.1-8
- Use standard library unittest.mock instead of 3rd party mock - Use standard library unittest.mock instead of 3rd party mock
- Add subpackages with Python extras: lxml genshi chardet all - Add subpackages with Python extras: lxml genshi chardet all
@ -214,3 +257,5 @@ sed -i 's/from mock import/from unittest.mock import/' html5lib/tests/test_meta.
* Mon Jul 18 2011 Praveen Kumar <kumarpraveen.nitdgp@gmail.com> - 0.90-1 * Mon Jul 18 2011 Praveen Kumar <kumarpraveen.nitdgp@gmail.com> - 0.90-1
- Initial spec - Initial spec
## END: Generated by rpmautospec

@ -1 +0,0 @@
SHA512 (html5lib-1.1.tar.gz) = af7c29591007fded99be6c38e3d0ae5a4ac32d71d26046a615918ae732cb1c1ecbf754f47ceca1a53726c3843f3ecea7af87a7362281b45ff3af495815818626
Loading…
Cancel
Save