Compare commits

..

10 Commits

Author SHA1 Message Date
Troy Dawson
20a8c30b61 python-html5lib package is retired on branch c10s for BAKERY-412 2024-03-21 19:25:24 +00:00
Fedora Release Engineering
387fb19a88 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-26 05:14:05 +00:00
Fedora Release Engineering
2b2dfd2fa2 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-22 02:16:44 +00:00
Lumír Balhar
ea63b44b45 Convert to %autorelease and %autochangelog
[skip changelog]
2023-08-14 09:35:38 +02:00
Lumir Balhar
b52016abf9 Fix compatibility with pytest 7.4.0 2023-08-09 11:58:26 +02:00
Fedora Release Engineering
d9c748e13f Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-21 10:23:28 +00:00
Python Maint
5b3c9ae837 Rebuilt for Python 3.12 2023-06-14 20:42:00 +02:00
Fedora Release Engineering
d87c2ada1f Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-20 13:50:10 +00:00
Fedora Release Engineering
f95a698147 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-22 19:10:20 +00:00
Python Maint
a9486d32f7 Rebuilt for Python 3.11 2022-06-13 20:59:29 +02:00
5 changed files with 1 additions and 387 deletions

7
.gitignore vendored
View File

@ -1,7 +0,0 @@
/html5lib-0.90.zip
/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

163
506.patch
View File

@ -1,163 +0,0 @@
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(-)
diff --git a/html5lib/tests/conftest.py b/html5lib/tests/conftest.py
index dad167c5..fffeb50c 100644
--- a/html5lib/tests/conftest.py
+++ b/html5lib/tests/conftest.py
@@ -99,10 +99,19 @@ def pytest_collect_file(path, parent):
if _tree_construction in dir_and_parents:
if path.ext == ".dat":
- return TreeConstructionFile(path, parent)
+ return TreeConstructionFile.from_parent(parent, fspath=path)
elif _tokenizer in dir_and_parents:
if path.ext == ".test":
- return TokenizerFile(path, parent)
+ return TokenizerFile.from_parent(parent, fspath=path)
elif _sanitizer_testdata in dir_and_parents:
if path.ext == ".dat":
- return SanitizerFile(path, parent)
+ return SanitizerFile.from_parent(parent, fspath=path)
+
+
+# Tiny wrapper to allow .from_parent constructors on older pytest for PY27
+if not hasattr(pytest.Item.__base__, "from_parent"):
+ @classmethod
+ def from_parent(cls, parent, **kwargs):
+ return cls(parent=parent, **kwargs)
+
+ pytest.Item.__base__.from_parent = from_parent
diff --git a/html5lib/tests/sanitizer.py b/html5lib/tests/sanitizer.py
index bb483421..16e53868 100644
--- a/html5lib/tests/sanitizer.py
+++ b/html5lib/tests/sanitizer.py
@@ -13,7 +13,7 @@ def collect(self):
with codecs.open(str(self.fspath), "r", encoding="utf-8") as fp:
tests = json.load(fp)
for i, test in enumerate(tests):
- yield SanitizerTest(str(i), self, test=test)
+ yield SanitizerTest.from_parent(self, name=str(i), test=test)
class SanitizerTest(pytest.Item):
diff --git a/html5lib/tests/tokenizer.py b/html5lib/tests/tokenizer.py
index 47264cc3..cc9897a4 100644
--- a/html5lib/tests/tokenizer.py
+++ b/html5lib/tests/tokenizer.py
@@ -192,7 +192,7 @@ def collect(self):
tests = json.load(fp)
if 'tests' in tests:
for i, test in enumerate(tests['tests']):
- yield TokenizerTestCollector(str(i), self, testdata=test)
+ yield TokenizerTestCollector.from_parent(self, name=str(i), testdata=test)
class TokenizerTestCollector(pytest.Collector):
@@ -207,10 +207,10 @@ def __init__(self, name, parent=None, config=None, session=None, testdata=None):
def collect(self):
for initialState in self.testdata["initialStates"]:
initialState = capitalize(initialState)
- item = TokenizerTest(initialState,
- self,
- self.testdata,
- initialState)
+ item = TokenizerTest.from_parent(self,
+ name=initialState,
+ test=self.testdata,
+ initialState=initialState)
if self.testdata["input"] is None:
item.add_marker(pytest.mark.skipif(True, reason="Relies on lone surrogates"))
yield item
diff --git a/html5lib/tests/tree_construction.py b/html5lib/tests/tree_construction.py
index 1ef6e725..fb0657bf 100644
--- a/html5lib/tests/tree_construction.py
+++ b/html5lib/tests/tree_construction.py
@@ -26,7 +26,7 @@ class TreeConstructionFile(pytest.File):
def collect(self):
tests = TestData(str(self.fspath), "data")
for i, test in enumerate(tests):
- yield TreeConstructionTest(str(i), self, testdata=test)
+ yield TreeConstructionTest.from_parent(self, name=str(i), testdata=test)
class TreeConstructionTest(pytest.Collector):
@@ -48,11 +48,11 @@ def _getParserTests(self, treeName, treeAPIs):
nodeid = "%s::parser::namespaced" % treeName
else:
nodeid = "%s::parser::void-namespace" % treeName
- item = ParserTest(nodeid,
- self,
- self.testdata,
- treeAPIs["builder"] if treeAPIs is not None else None,
- namespaceHTMLElements)
+ item = ParserTest.from_parent(self,
+ name=nodeid,
+ test=self.testdata,
+ treeClass=treeAPIs["builder"] if treeAPIs is not None else None,
+ namespaceHTMLElements=namespaceHTMLElements)
item.add_marker(getattr(pytest.mark, treeName))
item.add_marker(pytest.mark.parser)
if namespaceHTMLElements:
@@ -61,10 +61,10 @@ def _getParserTests(self, treeName, treeAPIs):
def _getTreeWalkerTests(self, treeName, treeAPIs):
nodeid = "%s::treewalker" % treeName
- item = TreeWalkerTest(nodeid,
- self,
- self.testdata,
- treeAPIs)
+ item = TreeWalkerTest.from_parent(self,
+ name=nodeid,
+ test=self.testdata,
+ treeAPIs=treeAPIs)
item.add_marker(getattr(pytest.mark, treeName))
item.add_marker(pytest.mark.treewalker)
yield item
diff --git a/requirements-test.txt b/requirements-test.txt
index 703d0e69..57f8f617 100644
--- a/requirements-test.txt
+++ b/requirements-test.txt
@@ -3,7 +3,7 @@
tox>=3.15.1,<4
flake8>=3.8.1,<3.9
pytest>=4.6.10,<5 ; python_version < '3'
-pytest>=5.4.2,<6 ; python_version >= '3'
+pytest>=5.4.2,<7 ; python_version >= '3'
coverage>=5.1,<6
pytest-expect>=1.1.0,<2
mock>=3.0.5,<4 ; python_version < '3.6'

1
dead.package Normal file
View File

@ -0,0 +1 @@
python-html5lib package is retired on branch c10s for BAKERY-412

View File

@ -1,216 +0,0 @@
Name: python-html5lib
Summary: A python based HTML parser/tokenizer
Version: 1.1
Release: 8%{?dist}
Epoch: 1
License: MIT
URL: https://github.com/html5lib/html5lib-python
Source: %{pypi_source html5lib}
# Fix compatibility with pytest 6
Patch: %{url}/pull/506.patch
BuildArch: noarch
BuildRequires: python3-devel
# Test deps
# Upstream uses requirements-test.txt but it has tox, coverage, mock, flake8 in it
BuildRequires: python3dist(pytest)
BuildRequires: python3dist(pytest-expect)
%description
A python based HTML parser/tokenizer based on the WHATWG HTML5
specification for maximum compatibility with major desktop web browsers.
%package -n python3-html5lib
Summary: %{summary}
%description -n python3-html5lib
A python based HTML parser/tokenizer based on the WHATWG HTML5
specification for maximum compatibility with major desktop web browsers.
%pyproject_extras_subpkg -n python3-html5lib lxml genshi chardet all
%prep
%autosetup -p1 -n html5lib-%{version}
# Use standard library unittest.mock instead of 3rd party mock
# From https://github.com/html5lib/html5lib-python/pull/536
sed -i 's/from mock import/from unittest.mock import/' html5lib/tests/test_meta.py
%generate_buildrequires
%pyproject_buildrequires -x all
%build
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files html5lib
%check
%pytest
%files -n python3-html5lib -f %{pyproject_files}
%doc CHANGES.rst README.rst
%changelog
* Mon Jan 31 2022 Miro Hrončok <mhroncok@redhat.com> - 1:1.1-8
- Use standard library unittest.mock instead of 3rd party mock
- Add subpackages with Python extras: lxml genshi chardet all
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Thu Jun 03 2021 Python Maint <python-maint@redhat.com> - 1:1.1-5
- Rebuilt for Python 3.10
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Aug 10 2020 Miro Hrončok <mhroncok@redhat.com> - 1:1.1-3
- Fix compatibility with pytest 6
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jul 01 2020 Charalampos Stratakis <cstratak@redhat.com> - 1:1.1-1
- Update to 1.1 (#1849837)
- Use pytest 5
* Sat May 30 2020 Miro Hrončok <mhroncok@redhat.com> - 1:1.0.1-10
- Use pytest 4
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 1:1.0.1-9
- Rebuilt for Python 3.9
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.0.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Sep 16 2019 Miro Hrončok <mhroncok@redhat.com> - 1:1.0.1-7
- Drop python2-html5lib
* Mon Aug 26 2019 Miro Hrončok <mhroncok@redhat.com> - 1:1.0.1-6
- Reduce Python 2 build dependencies
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 1:1.0.1-5
- Rebuilt for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.0.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Sep 24 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.0.1-2
- Fix dire deprecation warnings (#1627071)
* Mon Aug 20 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.0.1-1
- Update to 1.0.1 (#1584176)
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.999999999-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Sat Jun 16 2018 Miro Hrončok <mhroncok@redhat.com> - 1:0.999999999-7
- Rebuilt for Python 3.7
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1:0.999999999-6
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.999999999-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Fri Sep 29 2017 Troy Dawson <tdawson@redhat.com> - 0.999999999-4
- Cleanup spec file conditionals
* Thu Jul 27 2017 Kevin Fenzi <kevin@scrye.com> - 0.999999999-3
- Add Requires on python-webencodings. Fixes bug #1474883
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.999999999-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Jul 21 2017 Kevin Fenzi <kevin@scrye.com> - 1:0.999999999-1
- Update to 0.999999999. Fixes bug #1431378 and #1305828
- Security fix for CVE-2016-9909, CVE-2016-9910. Fixes bug #1402706 and #1402707
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.999-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Fri Dec 30 2016 Toshio Kuratomi <toshio@fedoraproject.org> - 1:0.999-12
- Correct usage of the %%python_provide macro
* Fri Dec 30 2016 Orion Poplawski <orion@cora.nwra.com> - 1:0.999-11
- Ship python2-html5lib
- Modernize spec
- Use %%license
* Mon Dec 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 1:0.999-10
- Rebuild for Python 3.6
- Fix invalid escape sequences
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.999-9
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.999-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Nov 03 2015 Robert Kuska <rkuska@redhat.com> - 1:0.999-7
- Rebuilt for Python3.5 rebuild
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.999-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.999-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1:0.999-4
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
* Fri May 09 2014 Dennis Gilmore <dennis@ausil.us> - 0.999-3
- move python3 Requires and BuildRequires into the python3 sub-package
* Wed Mar 12 2014 Dan Scott <dan@coffeecode.net> - 0.999-2
- "six" module is a runtime requirement
* Sat Mar 01 2014 Praveen Kumar <kumarpraveen.nitdgp@gmail.com> 0.999-1
- Added epoch information
* Wed Feb 26 2014 Dan Scott <dan@coffeecode.net> - 0.999-1
- Updated for new version
- Fixed bogus dates in changelog
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0b2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Mon Jul 8 2013 Praveen Kumar <kumarpraveen.nitdgp@gmail.com> - 1.0b2-2
- Updated python3 support which accidently removed from previous revision.
* Mon Jul 8 2013 Praveen Kumar <kumarpraveen.nitdgp@gmail.com> - 1.0b2-1
- Updated new source
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.95-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 0.95-3
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.95-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Feb 21 2012 Praveen Kumar <kumarpraveen.nitdgp@gmail.com> - 0.95-1
- Added python3 spec and updated new source
* Mon Jul 18 2011 Praveen Kumar <kumarpraveen.nitdgp@gmail.com> - 0.90-1
- Initial spec

View File

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