From d9594f8327d46439da789661f5155ce4bc06f8a3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 18 Jul 2011 16:40:15 +0000 Subject: [PATCH 01/62] Initial setup of the repo --- .gitignore | 0 sources | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 .gitignore create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/sources b/sources new file mode 100644 index 0000000..e69de29 From 55b8fb6da22848938a1c90d7bc129c768cf930a2 Mon Sep 17 00:00:00 2001 From: Praveen Date: Mon, 18 Jul 2011 22:29:43 +0530 Subject: [PATCH 02/62] Initial import (#722874). --- .gitignore | 1 + python-html5lib.spec | 40 ++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 42 insertions(+) create mode 100644 python-html5lib.spec diff --git a/.gitignore b/.gitignore index e69de29..4aa3155 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/html5lib-0.90.zip diff --git a/python-html5lib.spec b/python-html5lib.spec new file mode 100644 index 0000000..2658ecd --- /dev/null +++ b/python-html5lib.spec @@ -0,0 +1,40 @@ +%global modulename html5lib + +Name: python-%{modulename} +Summary: A python based HTML parser/tokenizer +Version: 0.90 +Release: 1%{?dist} +Group: Development/Libraries +License: MIT +URL: http://code.google.com/p/%{modulename}/ + +Source0: http://html5lib.googlecode.com/files/%{modulename}-%{version}.zip + +BuildArch: noarch +BuildRequires: python-setuptools + + +%description +A python based HTML parser/tokenizer based on the WHATWG HTML5 +specification for maximum compatibility with major desktop web browsers. + +%prep +%setup -q -n %{modulename}-%{version} + +%build +%{__python} setup.py build + +%install +%{__python} setup.py install -O1 --skip-build --root %{buildroot} + +%check +%{__python} setup.py test + +%files +%doc examples README +%{python_sitelib}/%{modulename}-*.egg-info +%{python_sitelib}/%{modulename} + +%changelog +* Mon Jul 18 2011 Praveen Kumar - 0.90-1 +- Initial spec diff --git a/sources b/sources index e69de29..faf78a0 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +691e6b9ebe15b333a28280974b2ce432 html5lib-0.90.zip From 54eb17a04409a1d64f19e0b19c80f233f03ee820 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 13 Jan 2012 19:46:55 -0600 Subject: [PATCH 03/62] - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild --- python-html5lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 2658ecd..2eabef7 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -3,7 +3,7 @@ Name: python-%{modulename} Summary: A python based HTML parser/tokenizer Version: 0.90 -Release: 1%{?dist} +Release: 2%{?dist} Group: Development/Libraries License: MIT URL: http://code.google.com/p/%{modulename}/ @@ -36,5 +36,8 @@ specification for maximum compatibility with major desktop web browsers. %{python_sitelib}/%{modulename} %changelog +* Sat Jan 14 2012 Fedora Release Engineering - 0.90-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Mon Jul 18 2011 Praveen Kumar - 0.90-1 - Initial spec From 95e0a2ae94f4c93f6f2b24a94772245b384eb804 Mon Sep 17 00:00:00 2001 From: Praveen Date: Tue, 21 Feb 2012 22:39:29 +0530 Subject: [PATCH 04/62] Added python3 spec and updated new source --- .gitignore | 1 + python-html5lib.spec | 66 ++++++++++++++++++++++++++++++++++++++++---- sources | 2 +- 3 files changed, 62 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 4aa3155..6ce4805 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /html5lib-0.90.zip +/html5lib-0.95.tar.gz diff --git a/python-html5lib.spec b/python-html5lib.spec index 2eabef7..dfd00d7 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -1,43 +1,97 @@ %global modulename html5lib +%global with_python3 1 Name: python-%{modulename} Summary: A python based HTML parser/tokenizer -Version: 0.90 -Release: 2%{?dist} +Version: 0.95 +Release: 1%{?dist} Group: Development/Libraries License: MIT URL: http://code.google.com/p/%{modulename}/ -Source0: http://html5lib.googlecode.com/files/%{modulename}-%{version}.zip +Source0: http://html5lib.googlecode.com/files/%{modulename}-%{version}.tar.gz BuildArch: noarch BuildRequires: python-setuptools +BuildRequires: python2-devel + +%if 1%{?with_python3} +BuildRequires: python3-devel +BuildRequires: python-tools +BuildRequires: python3-setuptools +%endif %description A python based HTML parser/tokenizer based on the WHATWG HTML5 specification for maximum compatibility with major desktop web browsers. +%if 0%{?with_python3} +%package -n python3-%{modulename} +Summary: A python based HTML parser/tokenizer +Group: Development/Libraries + +%description -n python3-%{modulename} +A python based HTML parser/tokenizer based on the WHATWG HTML5 +specification for maximum compatibility with major desktop web browsers. +%endif + + %prep %setup -q -n %{modulename}-%{version} +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|' +2to3 --write --nobackups %{py3dir} +%endif + %build %{__python} setup.py build +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py build +popd +%endif + + %install + +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py install -O1 --skip-build --root %{buildroot} +popd +%endif + %{__python} setup.py install -O1 --skip-build --root %{buildroot} %check %{__python} setup.py test +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py test +popd +%endif + %files -%doc examples README +%doc README %{python_sitelib}/%{modulename}-*.egg-info %{python_sitelib}/%{modulename} +%if 0%{?with_python3} +%files -n python3-%{modulename} +%doc README +%{python3_sitelib}/%{modulename}-*.egg-info +%{python3_sitelib}/%{modulename} +%endif + + %changelog -* Sat Jan 14 2012 Fedora Release Engineering - 0.90-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild +* Tue Feb 21 2012 Praveen Kumar - 0.95-1 +- Added python3 spec and updated new source * Mon Jul 18 2011 Praveen Kumar - 0.90-1 - Initial spec diff --git a/sources b/sources index faf78a0..99a1d03 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -691e6b9ebe15b333a28280974b2ce432 html5lib-0.90.zip +fe607f9917d81763e842f818f23464ee html5lib-0.95.tar.gz From 600774a9ac27e7bf54322d2a83ee37c6186f5722 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 21 Jul 2012 01:35:08 -0500 Subject: [PATCH 05/62] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- python-html5lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index dfd00d7..a693da5 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -4,7 +4,7 @@ Name: python-%{modulename} Summary: A python based HTML parser/tokenizer Version: 0.95 -Release: 1%{?dist} +Release: 2%{?dist} Group: Development/Libraries License: MIT URL: http://code.google.com/p/%{modulename}/ @@ -90,6 +90,9 @@ popd %changelog +* Sat Jul 21 2012 Fedora Release Engineering - 0.95-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Tue Feb 21 2012 Praveen Kumar - 0.95-1 - Added python3 spec and updated new source From e48666bb116e1d1bfa31dc813a62214d49da5956 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Sat, 4 Aug 2012 04:55:33 -0400 Subject: [PATCH 06/62] rebuild for https://fedoraproject.org/wiki/Features/Python_3.3 --- python-html5lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index a693da5..34f0a1c 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -4,7 +4,7 @@ Name: python-%{modulename} Summary: A python based HTML parser/tokenizer Version: 0.95 -Release: 2%{?dist} +Release: 3%{?dist} Group: Development/Libraries License: MIT URL: http://code.google.com/p/%{modulename}/ @@ -90,6 +90,9 @@ popd %changelog +* Sat Aug 04 2012 David Malcolm - 0.95-3 +- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3 + * Sat Jul 21 2012 Fedora Release Engineering - 0.95-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From 81c110b5a093202d767736054e188d7224c05fe1 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 14 Feb 2013 13:39:07 -0600 Subject: [PATCH 07/62] - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild --- python-html5lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 34f0a1c..ea2edcf 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -4,7 +4,7 @@ Name: python-%{modulename} Summary: A python based HTML parser/tokenizer Version: 0.95 -Release: 3%{?dist} +Release: 4%{?dist} Group: Development/Libraries License: MIT URL: http://code.google.com/p/%{modulename}/ @@ -90,6 +90,9 @@ popd %changelog +* Thu Feb 14 2013 Fedora Release Engineering - 0.95-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + * Sat Aug 04 2012 David Malcolm - 0.95-3 - rebuild for https://fedoraproject.org/wiki/Features/Python_3.3 From f2f07e6cf55f6c83b55d2a2ee36f604521880311 Mon Sep 17 00:00:00 2001 From: Praveen Kumar Date: Mon, 8 Jul 2013 08:18:56 +0530 Subject: [PATCH 08/62] clog --- .gitignore | 1 + python-html5lib.spec | 29 ++++++++++++++++------------- sources | 2 +- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 6ce4805..e6c9c6c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /html5lib-0.90.zip /html5lib-0.95.tar.gz +/html5lib-1.0b2.tar.gz diff --git a/python-html5lib.spec b/python-html5lib.spec index ea2edcf..40ce9a2 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -1,23 +1,25 @@ -%global modulename html5lib -%global with_python3 1 +%global modulename html5lib Name: python-%{modulename} Summary: A python based HTML parser/tokenizer -Version: 0.95 -Release: 4%{?dist} +Version: 1.0b2 +Release: 1%{?dist} Group: Development/Libraries License: MIT -URL: http://code.google.com/p/%{modulename}/ +URL: https://pypi.python.org/pypi/%{modulename} -Source0: http://html5lib.googlecode.com/files/%{modulename}-%{version}.tar.gz +Source0: https://pypi.python.org/packages/source/h/%{modulename}/%{modulename}-1.0b2.tar.gz BuildArch: noarch BuildRequires: python-setuptools BuildRequires: python2-devel +BuildRequires: python-nose +BuildRequires: python-six %if 1%{?with_python3} BuildRequires: python3-devel BuildRequires: python-tools +BuildRequires: python3-nose BuildRequires: python3-setuptools %endif @@ -38,13 +40,11 @@ specification for maximum compatibility with major desktop web browsers. %prep -%setup -q -n %{modulename}-%{version} +%setup -q -n %{modulename}-%{version} %if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} -find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|' -2to3 --write --nobackups %{py3dir} %endif %build @@ -68,28 +68,31 @@ popd %{__python} setup.py install -O1 --skip-build --root %{buildroot} %check -%{__python} setup.py test +nosetests %if 0%{?with_python3} pushd %{py3dir} -%{__python3} setup.py test +nosetests-3.3 popd %endif %files -%doc README +%doc CHANGES.rst README.rst LICENSE %{python_sitelib}/%{modulename}-*.egg-info %{python_sitelib}/%{modulename} %if 0%{?with_python3} %files -n python3-%{modulename} -%doc README +%doc CHANGES.rst LICENSE README.rst %{python3_sitelib}/%{modulename}-*.egg-info %{python3_sitelib}/%{modulename} %endif %changelog +* Wed Jul 8 2013 Praveen Kumar - 1.0b2-1 +- Updated new source + * Thu Feb 14 2013 Fedora Release Engineering - 0.95-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild diff --git a/sources b/sources index 99a1d03..edb0ec7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fe607f9917d81763e842f818f23464ee html5lib-0.95.tar.gz +ce0b9317628e40bf55a9d71f6948cbba html5lib-1.0b2.tar.gz From 72dca3af3568f2f55f4399dbac9d73767596f661 Mon Sep 17 00:00:00 2001 From: Praveen Kumar Date: Mon, 8 Jul 2013 21:51:51 +0530 Subject: [PATCH 09/62] Added python3 support which accidently removed from spec --- python-html5lib.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python-html5lib.spec b/python-html5lib.spec index 40ce9a2..b255461 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -1,4 +1,5 @@ %global modulename html5lib +%global with_python3 1 Name: python-%{modulename} Summary: A python based HTML parser/tokenizer @@ -20,6 +21,7 @@ BuildRequires: python-six BuildRequires: python3-devel BuildRequires: python-tools BuildRequires: python3-nose +BuildRequires: python3-six BuildRequires: python3-setuptools %endif From 2d6f0148a5d892f6b89429ee1afc95e420c9924e Mon Sep 17 00:00:00 2001 From: Praveen Kumar Date: Mon, 8 Jul 2013 22:17:19 +0530 Subject: [PATCH 10/62] clog --- python-html5lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index b255461..4ebab0f 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -4,7 +4,7 @@ Name: python-%{modulename} Summary: A python based HTML parser/tokenizer Version: 1.0b2 -Release: 1%{?dist} +Release: 2%{?dist} Group: Development/Libraries License: MIT URL: https://pypi.python.org/pypi/%{modulename} @@ -92,6 +92,9 @@ popd %changelog +* Wed Jul 8 2013 Praveen Kumar - 1.0b2-2 +- Updated python3 support which accidently removed from previous revision. + * Wed Jul 8 2013 Praveen Kumar - 1.0b2-1 - Updated new source From 17f85b40b5c24096b75761c26c7911cf4153bce2 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 4 Aug 2013 02:58:45 -0500 Subject: [PATCH 11/62] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- python-html5lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 4ebab0f..0e731f3 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -4,7 +4,7 @@ Name: python-%{modulename} Summary: A python based HTML parser/tokenizer Version: 1.0b2 -Release: 2%{?dist} +Release: 3%{?dist} Group: Development/Libraries License: MIT URL: https://pypi.python.org/pypi/%{modulename} @@ -92,6 +92,9 @@ popd %changelog +* Sun Aug 04 2013 Fedora Release Engineering - 1.0b2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Wed Jul 8 2013 Praveen Kumar - 1.0b2-2 - Updated python3 support which accidently removed from previous revision. From 3e2128f1064c783551949cd1e5e6f8025a239607 Mon Sep 17 00:00:00 2001 From: Praveen Kumar Date: Sat, 1 Mar 2014 21:55:14 +0530 Subject: [PATCH 12/62] clog --- python-html5lib.spec | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 0e731f3..b189be9 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -3,13 +3,14 @@ Name: python-%{modulename} Summary: A python based HTML parser/tokenizer -Version: 1.0b2 -Release: 3%{?dist} +Version: 0.999 +Release: 1%{?dist} +Epoch: 1 Group: Development/Libraries License: MIT URL: https://pypi.python.org/pypi/%{modulename} -Source0: https://pypi.python.org/packages/source/h/%{modulename}/%{modulename}-1.0b2.tar.gz +Source0: https://pypi.python.org/packages/source/h/%{modulename}/%{modulename}-%{version}.tar.gz BuildArch: noarch BuildRequires: python-setuptools @@ -92,13 +93,20 @@ popd %changelog +* Sat Mar 01 2014 Praveen Kumar 0.999-1 +- Added epoch information + +* Wed Feb 26 2014 Dan Scott - 0.999-1 +- Updated for new version +- Fixed bogus dates in changelog + * Sun Aug 04 2013 Fedora Release Engineering - 1.0b2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild -* Wed Jul 8 2013 Praveen Kumar - 1.0b2-2 +* Mon Jul 8 2013 Praveen Kumar - 1.0b2-2 - Updated python3 support which accidently removed from previous revision. -* Wed Jul 8 2013 Praveen Kumar - 1.0b2-1 +* Mon Jul 8 2013 Praveen Kumar - 1.0b2-1 - Updated new source * Thu Feb 14 2013 Fedora Release Engineering - 0.95-4 From 512dc87f8d71ed7fb5b900bc9e7e369b33c02117 Mon Sep 17 00:00:00 2001 From: Praveen Kumar Date: Sat, 1 Mar 2014 21:57:34 +0530 Subject: [PATCH 13/62] Update to latest upstream release --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e6c9c6c..a7f2129 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /html5lib-0.90.zip /html5lib-0.95.tar.gz /html5lib-1.0b2.tar.gz +/html5lib-0.999.tar.gz diff --git a/sources b/sources index edb0ec7..d04228f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ce0b9317628e40bf55a9d71f6948cbba html5lib-1.0b2.tar.gz +acb8ba4d6db5637360a07859192eb7f8 html5lib-0.999.tar.gz From 92a09b16ec3d7b2f7cbe28995777046e6ae0655c Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Wed, 12 Mar 2014 15:37:40 -0400 Subject: [PATCH 14/62] Add six module as a runtime requirement Per https://lists.fedoraproject.org/pipermail/devel/2014-March/196647.html it turns out that "six" is a runtime requirement. Other modules, like rdflib, that depend on functionality will fail in a mock build where six is not installed. Signed-off-by: Dan Scott --- python-html5lib.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index b189be9..9e164de 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -4,8 +4,8 @@ Name: python-%{modulename} Summary: A python based HTML parser/tokenizer Version: 0.999 -Release: 1%{?dist} -Epoch: 1 +Release: 2%{?dist} +Epoch: 1 Group: Development/Libraries License: MIT URL: https://pypi.python.org/pypi/%{modulename} @@ -13,12 +13,14 @@ URL: https://pypi.python.org/pypi/%{modulename} Source0: https://pypi.python.org/packages/source/h/%{modulename}/%{modulename}-%{version}.tar.gz BuildArch: noarch +Requires: python-six BuildRequires: python-setuptools BuildRequires: python2-devel BuildRequires: python-nose BuildRequires: python-six %if 1%{?with_python3} +Requires: python3-six BuildRequires: python3-devel BuildRequires: python-tools BuildRequires: python3-nose @@ -93,6 +95,9 @@ popd %changelog +* Wed Mar 12 2014 Dan Scott - 0.999-2 +- "six" module is a runtime requirement + * Sat Mar 01 2014 Praveen Kumar 0.999-1 - Added epoch information From 5656997aa899f945afe9c54607bdf944912f0e5c Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 9 May 2014 14:23:09 -0500 Subject: [PATCH 15/62] move python3 Requires and BuildRequires into the python3 sub-package --- python-html5lib.spec | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 9e164de..e35aed5 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -4,7 +4,7 @@ Name: python-%{modulename} Summary: A python based HTML parser/tokenizer Version: 0.999 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 1 Group: Development/Libraries License: MIT @@ -19,16 +19,6 @@ BuildRequires: python2-devel BuildRequires: python-nose BuildRequires: python-six -%if 1%{?with_python3} -Requires: python3-six -BuildRequires: python3-devel -BuildRequires: python-tools -BuildRequires: python3-nose -BuildRequires: python3-six -BuildRequires: python3-setuptools -%endif - - %description A python based HTML parser/tokenizer based on the WHATWG HTML5 specification for maximum compatibility with major desktop web browsers. @@ -38,6 +28,13 @@ specification for maximum compatibility with major desktop web browsers. Summary: A python based HTML parser/tokenizer Group: Development/Libraries +Requires: python3-six +BuildRequires: python3-devel +BuildRequires: python-tools +BuildRequires: python3-nose +BuildRequires: python3-six +BuildRequires: python3-setuptools + %description -n python3-%{modulename} A python based HTML parser/tokenizer based on the WHATWG HTML5 specification for maximum compatibility with major desktop web browsers. @@ -95,6 +92,9 @@ popd %changelog +* Fri May 09 2014 Dennis Gilmore - 0.999-3 +- move python3 Requires and BuildRequires into the python3 sub-package + * Wed Mar 12 2014 Dan Scott - 0.999-2 - "six" module is a runtime requirement From 4cc39b6e6ea5c7c13eef836fa5bfeb16cd406536 Mon Sep 17 00:00:00 2001 From: Slavek Kabrda Date: Thu, 15 May 2014 15:45:00 +0200 Subject: [PATCH 16/62] Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 --- python-html5lib.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index e35aed5..59da8ef 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -4,7 +4,7 @@ Name: python-%{modulename} Summary: A python based HTML parser/tokenizer Version: 0.999 -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 1 Group: Development/Libraries License: MIT @@ -74,7 +74,7 @@ nosetests %if 0%{?with_python3} pushd %{py3dir} -nosetests-3.3 +nosetests-%{python3_version} popd %endif @@ -92,6 +92,9 @@ popd %changelog +* Wed May 14 2014 Bohuslav Kabrda - 1:0.999-4 +- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 + * Fri May 09 2014 Dennis Gilmore - 0.999-3 - move python3 Requires and BuildRequires into the python3 sub-package From 454acd3ffba1bff37a19ebcca896e22bf7c60f0e Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 15:48:44 -0500 Subject: [PATCH 17/62] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- python-html5lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 59da8ef..17a302a 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -4,7 +4,7 @@ Name: python-%{modulename} Summary: A python based HTML parser/tokenizer Version: 0.999 -Release: 4%{?dist} +Release: 5%{?dist} Epoch: 1 Group: Development/Libraries License: MIT @@ -92,6 +92,9 @@ popd %changelog +* Sat Jun 07 2014 Fedora Release Engineering - 1:0.999-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Wed May 14 2014 Bohuslav Kabrda - 1:0.999-4 - Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 From 189d28f8561bc426c239582311bf3008e7d056e3 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 18 Jun 2014 08:42:54 -0500 Subject: [PATCH 18/62] no python3 in epel (yet) --- python-html5lib.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python-html5lib.spec b/python-html5lib.spec index 17a302a..b6ee0cb 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -1,5 +1,7 @@ %global modulename html5lib +%if 0%{?fedora} %global with_python3 1 +%endif Name: python-%{modulename} Summary: A python based HTML parser/tokenizer From d2040145ee33d593394f18e40ea52929dfb7464e Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 18 Jun 2015 19:36:06 +0000 Subject: [PATCH 19/62] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- python-html5lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index b6ee0cb..7fa92b4 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -6,7 +6,7 @@ Name: python-%{modulename} Summary: A python based HTML parser/tokenizer Version: 0.999 -Release: 5%{?dist} +Release: 6%{?dist} Epoch: 1 Group: Development/Libraries License: MIT @@ -94,6 +94,9 @@ popd %changelog +* Thu Jun 18 2015 Fedora Release Engineering - 1:0.999-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Sat Jun 07 2014 Fedora Release Engineering - 1:0.999-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From 9aa598d3e5fcf7c35b611bbf4d61fae00cfd2631 Mon Sep 17 00:00:00 2001 From: Robert Kuska Date: Tue, 3 Nov 2015 20:15:12 +0100 Subject: [PATCH 20/62] Rebuilt for Python3.5 rebuild --- python-html5lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 7fa92b4..4fd90e9 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -6,7 +6,7 @@ Name: python-%{modulename} Summary: A python based HTML parser/tokenizer Version: 0.999 -Release: 6%{?dist} +Release: 7%{?dist} Epoch: 1 Group: Development/Libraries License: MIT @@ -94,6 +94,9 @@ popd %changelog +* Tue Nov 03 2015 Robert Kuska - 1:0.999-7 +- Rebuilt for Python3.5 rebuild + * Thu Jun 18 2015 Fedora Release Engineering - 1:0.999-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From bb05b33f2c2560517f203a7fed15f878263be194 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 4 Feb 2016 19:52:15 +0000 Subject: [PATCH 21/62] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- python-html5lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 4fd90e9..b802239 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -6,7 +6,7 @@ Name: python-%{modulename} Summary: A python based HTML parser/tokenizer Version: 0.999 -Release: 7%{?dist} +Release: 8%{?dist} Epoch: 1 Group: Development/Libraries License: MIT @@ -94,6 +94,9 @@ popd %changelog +* Thu Feb 04 2016 Fedora Release Engineering - 1:0.999-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Tue Nov 03 2015 Robert Kuska - 1:0.999-7 - Rebuilt for Python3.5 rebuild From 5140d18684831bb4b4fa9751a89373ec9bc22e17 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 19 Jul 2016 10:00:15 +0000 Subject: [PATCH 22/62] - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages --- python-html5lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index b802239..b14fd85 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -6,7 +6,7 @@ Name: python-%{modulename} Summary: A python based HTML parser/tokenizer Version: 0.999 -Release: 8%{?dist} +Release: 9%{?dist} Epoch: 1 Group: Development/Libraries License: MIT @@ -94,6 +94,9 @@ popd %changelog +* Tue Jul 19 2016 Fedora Release Engineering - 1:0.999-9 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + * Thu Feb 04 2016 Fedora Release Engineering - 1:0.999-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From bf3e7d8ed57caab9c7f20bc2f4a7b1b6ba176b9f Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Mon, 12 Dec 2016 19:17:03 +0100 Subject: [PATCH 23/62] Rebuild for Python 3.6 Added patch for fixing invalid escape sequences with Python 3.6 --- fix-invalid-escape-sequences.patch | 52 ++++++++++++++++++++++++++++++ python-html5lib.spec | 11 +++++-- 2 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 fix-invalid-escape-sequences.patch diff --git a/fix-invalid-escape-sequences.patch b/fix-invalid-escape-sequences.patch new file mode 100644 index 0000000..a1eb131 --- /dev/null +++ b/fix-invalid-escape-sequences.patch @@ -0,0 +1,52 @@ +diff --git a/html5lib/sanitizer.py b/html5lib/sanitizer.py +index 71dc521..56e3ac7 100644 +--- a/html5lib/sanitizer.py ++++ b/html5lib/sanitizer.py +@@ -185,7 +185,7 @@ class HTMLSanitizerMixin(object): + for attr in self.attr_val_is_uri: + if attr not in attrs: + continue +- val_unescaped = re.sub("[`\000-\040\177-\240\s]+", '', ++ val_unescaped = re.sub(r"[`\000-\040\177-\240\s]+", '', + unescape(attrs[attr])).lower() + # remove replacement characters from unescaped characters + val_unescaped = val_unescaped.replace("\ufffd", "") +@@ -199,7 +199,7 @@ class HTMLSanitizerMixin(object): + ' ', + unescape(attrs[attr])) + if (token["name"] in self.svg_allow_local_href and +- 'xlink:href' in attrs and re.search('^\s*[^#\s].*', ++ 'xlink:href' in attrs and re.search(r'^\s*[^#\s].*', + attrs['xlink:href'])): + del attrs['xlink:href'] + if 'style' in attrs: +@@ -228,16 +228,16 @@ class HTMLSanitizerMixin(object): + + def sanitize_css(self, style): + # disallow urls +- style = re.compile('url\s*\(\s*[^\s)]+?\s*\)\s*').sub(' ', style) ++ style = re.compile(r'url\s*\(\s*[^\s)]+?\s*\)\s*').sub(' ', style) + + # gauntlet +- if not re.match("""^([:,;#%.\sa-zA-Z0-9!]|\w-\w|'[\s\w]+'|"[\s\w]+"|\([\d,\s]+\))*$""", style): ++ if not re.match(r"""^([:,;#%.\sa-zA-Z0-9!]|\w-\w|'[\s\w]+'|"[\s\w]+"|\([\d,\s]+\))*$""", style): + return '' +- if not re.match("^\s*([-\w]+\s*:[^:;]*(;\s*|$))*$", style): ++ if not re.match(r"^\s*([-\w]+\s*:[^:;]*(;\s*|$))*$", style): + return '' + + clean = [] +- for prop, value in re.findall("([-\w]+)\s*:\s*([^:;]*)", style): ++ for prop, value in re.findall(r"([-\w]+)\s*:\s*([^:;]*)", style): + if not value: + continue + if prop.lower() in self.allowed_css_properties: +@@ -246,7 +246,7 @@ class HTMLSanitizerMixin(object): + 'padding']: + for keyword in value.split(): + if not keyword in self.acceptable_css_keywords and \ +- not re.match("^(#[0-9a-f]+|rgb\(\d+%?,\d*%?,?\d*%?\)?|\d{0,2}\.?\d{0,2}(cm|em|ex|in|mm|pc|pt|px|%|,|\))?)$", keyword): ++ not re.match(r"^(#[0-9a-f]+|rgb\(\d+%?,\d*%?,?\d*%?\)?|\d{0,2}\.?\d{0,2}(cm|em|ex|in|mm|pc|pt|px|%|,|\))?)$", keyword): + break + else: + clean.append(prop + ': ' + value + ';') diff --git a/python-html5lib.spec b/python-html5lib.spec index b14fd85..8fad3f4 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -6,13 +6,15 @@ Name: python-%{modulename} Summary: A python based HTML parser/tokenizer Version: 0.999 -Release: 9%{?dist} +Release: 10%{?dist} Epoch: 1 Group: Development/Libraries License: MIT URL: https://pypi.python.org/pypi/%{modulename} -Source0: https://pypi.python.org/packages/source/h/%{modulename}/%{modulename}-%{version}.tar.gz +Source0: https://pypi.python.org/packages/source/h/%{modulename}/%{modulename}-%{version}.tar.gz +# Patch for fixing invalid escape sequences with Python 3.6 +Patch0: fix-invalid-escape-sequences.patch BuildArch: noarch Requires: python-six @@ -45,6 +47,7 @@ specification for maximum compatibility with major desktop web browsers. %prep %setup -q -n %{modulename}-%{version} +%patch0 -p1 %if 0%{?with_python3} rm -rf %{py3dir} @@ -94,6 +97,10 @@ popd %changelog +* Mon Dec 12 2016 Charalampos Stratakis - 1:0.999-10 +- Rebuild for Python 3.6 +- Fix invalid escape sequences + * Tue Jul 19 2016 Fedora Release Engineering - 1:0.999-9 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages From 5580b93d3da1d289ff71d6ab2c33512d9767f9c8 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Fri, 30 Dec 2016 16:56:20 -0700 Subject: [PATCH 24/62] Ship python2-html5lib Modernize spec Use %license --- python-html5lib.spec | 52 ++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 8fad3f4..3dab362 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -6,7 +6,7 @@ Name: python-%{modulename} Summary: A python based HTML parser/tokenizer Version: 0.999 -Release: 10%{?dist} +Release: 11%{?dist} Epoch: 1 Group: Development/Libraries License: MIT @@ -17,13 +17,23 @@ Source0: https://pypi.python.org/packages/source/h/%{modulename}/%{modulename}-% Patch0: fix-invalid-escape-sequences.patch BuildArch: noarch + +%description +A python based HTML parser/tokenizer based on the WHATWG HTML5 +specification for maximum compatibility with major desktop web browsers. + +%package -n python2-%{modulename} +Summary: A python based HTML parser/tokenizer +Group: Development/Libraries + Requires: python-six BuildRequires: python-setuptools BuildRequires: python2-devel BuildRequires: python-nose BuildRequires: python-six +%{?python_provide;%python_provide python2-%{modulename}} -%description +%description -n python2-%{modulename} A python based HTML parser/tokenizer based on the WHATWG HTML5 specification for maximum compatibility with major desktop web browsers. @@ -34,10 +44,10 @@ Group: Development/Libraries Requires: python3-six BuildRequires: python3-devel -BuildRequires: python-tools +BuildRequires: python3-setuptools BuildRequires: python3-nose BuildRequires: python3-six -BuildRequires: python3-setuptools +%{?python_provide;%python_provide python3-%{modulename}} %description -n python3-%{modulename} A python based HTML parser/tokenizer based on the WHATWG HTML5 @@ -49,54 +59,50 @@ specification for maximum compatibility with major desktop web browsers. %setup -q -n %{modulename}-%{version} %patch0 -p1 -%if 0%{?with_python3} -rm -rf %{py3dir} -cp -a . %{py3dir} -%endif %build -%{__python} setup.py build +%py2_build %if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py build -popd +%py3_build %endif %install - %if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py install -O1 --skip-build --root %{buildroot} -popd +%py3_install %endif -%{__python} setup.py install -O1 --skip-build --root %{buildroot} +%py2_install %check -nosetests +nosetests-%{python2_version} %if 0%{?with_python3} -pushd %{py3dir} nosetests-%{python3_version} -popd %endif -%files -%doc CHANGES.rst README.rst LICENSE +%files -n python2-%{modulename} +%license LICENSE +%doc CHANGES.rst README.rst %{python_sitelib}/%{modulename}-*.egg-info %{python_sitelib}/%{modulename} %if 0%{?with_python3} %files -n python3-%{modulename} -%doc CHANGES.rst LICENSE README.rst +%license LICENSE +%doc CHANGES.rst README.rst %{python3_sitelib}/%{modulename}-*.egg-info %{python3_sitelib}/%{modulename} %endif %changelog +* Fri Dec 30 2016 Orion Poplawski - 1:0.999-11 +- Ship python2-html5lib +- Modernize spec +- Use %%license + * Mon Dec 12 2016 Charalampos Stratakis - 1:0.999-10 - Rebuild for Python 3.6 - Fix invalid escape sequences From 86bdc60a9966accd9555856d9d714371fa08c931 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Fri, 30 Dec 2016 23:07:18 -0800 Subject: [PATCH 25/62] Correct usage of python_provide macro --- python-html5lib.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 3dab362..d9c570a 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -6,7 +6,7 @@ Name: python-%{modulename} Summary: A python based HTML parser/tokenizer Version: 0.999 -Release: 11%{?dist} +Release: 12%{?dist} Epoch: 1 Group: Development/Libraries License: MIT @@ -31,7 +31,7 @@ BuildRequires: python-setuptools BuildRequires: python2-devel BuildRequires: python-nose BuildRequires: python-six -%{?python_provide;%python_provide python2-%{modulename}} +%{?python_provide:%python_provide python2-%{modulename}} %description -n python2-%{modulename} A python based HTML parser/tokenizer based on the WHATWG HTML5 @@ -47,7 +47,7 @@ BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-nose BuildRequires: python3-six -%{?python_provide;%python_provide python3-%{modulename}} +%{?python_provide:%python_provide python3-%{modulename}} %description -n python3-%{modulename} A python based HTML parser/tokenizer based on the WHATWG HTML5 @@ -98,6 +98,9 @@ nosetests-%{python3_version} %changelog +* Fri Dec 30 2016 Toshio Kuratomi - 1:0.999-12 +- Correct usage of the %%python_provide macro + * Fri Dec 30 2016 Orion Poplawski - 1:0.999-11 - Ship python2-html5lib - Modernize spec From 989dad4b908ffd63a6adc5662a8ea55c821f1e87 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 11 Feb 2017 09:15:09 +0000 Subject: [PATCH 26/62] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- python-html5lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index d9c570a..da4a87b 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -6,7 +6,7 @@ Name: python-%{modulename} Summary: A python based HTML parser/tokenizer Version: 0.999 -Release: 12%{?dist} +Release: 13%{?dist} Epoch: 1 Group: Development/Libraries License: MIT @@ -98,6 +98,9 @@ nosetests-%{python3_version} %changelog +* Sat Feb 11 2017 Fedora Release Engineering - 1:0.999-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Fri Dec 30 2016 Toshio Kuratomi - 1:0.999-12 - Correct usage of the %%python_provide macro From d4e91d45c3b49396365ef7ca0dac2acadf0163e1 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Fri, 21 Jul 2017 13:55:13 -0700 Subject: [PATCH 27/62] Update to 0.999999999. Fixes bug #1431378 and #1305828 Security fix for CVE-2016-9909, CVE-2016-9910. Fixes bug #1402706 and #1402707 --- .gitignore | 1 + fix-invalid-escape-sequences.patch | 52 ------------------------------ python-html5lib.spec | 29 ++++++++--------- sources | 2 +- 4 files changed, 16 insertions(+), 68 deletions(-) delete mode 100644 fix-invalid-escape-sequences.patch diff --git a/.gitignore b/.gitignore index a7f2129..423833f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /html5lib-0.95.tar.gz /html5lib-1.0b2.tar.gz /html5lib-0.999.tar.gz +/0.999999999.tar.gz diff --git a/fix-invalid-escape-sequences.patch b/fix-invalid-escape-sequences.patch deleted file mode 100644 index a1eb131..0000000 --- a/fix-invalid-escape-sequences.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff --git a/html5lib/sanitizer.py b/html5lib/sanitizer.py -index 71dc521..56e3ac7 100644 ---- a/html5lib/sanitizer.py -+++ b/html5lib/sanitizer.py -@@ -185,7 +185,7 @@ class HTMLSanitizerMixin(object): - for attr in self.attr_val_is_uri: - if attr not in attrs: - continue -- val_unescaped = re.sub("[`\000-\040\177-\240\s]+", '', -+ val_unescaped = re.sub(r"[`\000-\040\177-\240\s]+", '', - unescape(attrs[attr])).lower() - # remove replacement characters from unescaped characters - val_unescaped = val_unescaped.replace("\ufffd", "") -@@ -199,7 +199,7 @@ class HTMLSanitizerMixin(object): - ' ', - unescape(attrs[attr])) - if (token["name"] in self.svg_allow_local_href and -- 'xlink:href' in attrs and re.search('^\s*[^#\s].*', -+ 'xlink:href' in attrs and re.search(r'^\s*[^#\s].*', - attrs['xlink:href'])): - del attrs['xlink:href'] - if 'style' in attrs: -@@ -228,16 +228,16 @@ class HTMLSanitizerMixin(object): - - def sanitize_css(self, style): - # disallow urls -- style = re.compile('url\s*\(\s*[^\s)]+?\s*\)\s*').sub(' ', style) -+ style = re.compile(r'url\s*\(\s*[^\s)]+?\s*\)\s*').sub(' ', style) - - # gauntlet -- if not re.match("""^([:,;#%.\sa-zA-Z0-9!]|\w-\w|'[\s\w]+'|"[\s\w]+"|\([\d,\s]+\))*$""", style): -+ if not re.match(r"""^([:,;#%.\sa-zA-Z0-9!]|\w-\w|'[\s\w]+'|"[\s\w]+"|\([\d,\s]+\))*$""", style): - return '' -- if not re.match("^\s*([-\w]+\s*:[^:;]*(;\s*|$))*$", style): -+ if not re.match(r"^\s*([-\w]+\s*:[^:;]*(;\s*|$))*$", style): - return '' - - clean = [] -- for prop, value in re.findall("([-\w]+)\s*:\s*([^:;]*)", style): -+ for prop, value in re.findall(r"([-\w]+)\s*:\s*([^:;]*)", style): - if not value: - continue - if prop.lower() in self.allowed_css_properties: -@@ -246,7 +246,7 @@ class HTMLSanitizerMixin(object): - 'padding']: - for keyword in value.split(): - if not keyword in self.acceptable_css_keywords and \ -- not re.match("^(#[0-9a-f]+|rgb\(\d+%?,\d*%?,?\d*%?\)?|\d{0,2}\.?\d{0,2}(cm|em|ex|in|mm|pc|pt|px|%|,|\))?)$", keyword): -+ not re.match(r"^(#[0-9a-f]+|rgb\(\d+%?,\d*%?,?\d*%?\)?|\d{0,2}\.?\d{0,2}(cm|em|ex|in|mm|pc|pt|px|%|,|\))?)$", keyword): - break - else: - clean.append(prop + ': ' + value + ';') diff --git a/python-html5lib.spec b/python-html5lib.spec index da4a87b..52a28e6 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -5,17 +5,13 @@ Name: python-%{modulename} Summary: A python based HTML parser/tokenizer -Version: 0.999 -Release: 13%{?dist} +Version: 0.999999999 +Release: 1%{?dist} Epoch: 1 Group: Development/Libraries License: MIT URL: https://pypi.python.org/pypi/%{modulename} - -Source0: https://pypi.python.org/packages/source/h/%{modulename}/%{modulename}-%{version}.tar.gz -# Patch for fixing invalid escape sequences with Python 3.6 -Patch0: fix-invalid-escape-sequences.patch - +Source0: https://github.com/html5lib/html5lib-python/archive/%{version}.tar.gz BuildArch: noarch %description @@ -56,9 +52,7 @@ specification for maximum compatibility with major desktop web browsers. %prep -%setup -q -n %{modulename}-%{version} -%patch0 -p1 - +%autosetup -n %{modulename}-python-%{version} %build %py2_build @@ -75,12 +69,13 @@ specification for maximum compatibility with major desktop web browsers. %py2_install -%check -nosetests-%{python2_version} +#check +#nosetests-%{python2_version} +# we need python-webencodings packaged -%if 0%{?with_python3} -nosetests-%{python3_version} -%endif +#if 0%{?with_python3} +#nosetests-%{python3_version} +#endif %files -n python2-%{modulename} %license LICENSE @@ -98,6 +93,10 @@ nosetests-%{python3_version} %changelog +* Fri Jul 21 2017 Kevin Fenzi - 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 - 1:0.999-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/sources b/sources index d04228f..5f63c29 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -acb8ba4d6db5637360a07859192eb7f8 html5lib-0.999.tar.gz +SHA512 (0.999999999.tar.gz) = 74205c25ea38a1a0690181d56bdf4560ef36cf0d39acbb1ab16e2199e3657f87636508ba128d522970876c9a0ba2ac8df877053ff0179403668a2f0300af7877 From d2380103784a31967845c4bb781f24f261813430 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 27 Jul 2017 10:34:04 +0000 Subject: [PATCH 28/62] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- python-html5lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 52a28e6..984ba48 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -6,7 +6,7 @@ Name: python-%{modulename} Summary: A python based HTML parser/tokenizer Version: 0.999999999 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 1 Group: Development/Libraries License: MIT @@ -93,6 +93,9 @@ specification for maximum compatibility with major desktop web browsers. %changelog +* Thu Jul 27 2017 Fedora Release Engineering - 1:0.999999999-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Fri Jul 21 2017 Kevin Fenzi - 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 From 1f453246c9462ccb39f914700d7b4d15ebe6db3e Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 27 Jul 2017 11:54:05 -0700 Subject: [PATCH 29/62] Add Requires on python-webencodings. Fixes bug #1474883 --- python-html5lib.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 984ba48..f0329d8 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -6,7 +6,7 @@ Name: python-%{modulename} Summary: A python based HTML parser/tokenizer Version: 0.999999999 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 1 Group: Development/Libraries License: MIT @@ -23,6 +23,7 @@ Summary: A python based HTML parser/tokenizer Group: Development/Libraries Requires: python-six +Requires: python2-webencodings BuildRequires: python-setuptools BuildRequires: python2-devel BuildRequires: python-nose @@ -39,6 +40,7 @@ Summary: A python based HTML parser/tokenizer Group: Development/Libraries Requires: python3-six +Requires: python3-webencodings BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-nose @@ -93,6 +95,9 @@ specification for maximum compatibility with major desktop web browsers. %changelog +* Thu Jul 27 2017 Kevin Fenzi - 0.999999999-3 +- Add Requires on python-webencodings. Fixes bug #1474883 + * Thu Jul 27 2017 Fedora Release Engineering - 1:0.999999999-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 3281e2d9350ea31276e9ae1ec4e3339108c1395a Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Fri, 29 Sep 2017 08:30:29 -0700 Subject: [PATCH 30/62] Cleanup spec file conditionals --- python-html5lib.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index f0329d8..0f350da 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -1,12 +1,12 @@ %global modulename html5lib -%if 0%{?fedora} +%if 0%{?fedora} || 0%{?rhel} > 7 %global with_python3 1 %endif Name: python-%{modulename} Summary: A python based HTML parser/tokenizer Version: 0.999999999 -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 1 Group: Development/Libraries License: MIT @@ -95,6 +95,9 @@ specification for maximum compatibility with major desktop web browsers. %changelog +* Fri Sep 29 2017 Troy Dawson - 0.999999999-4 +- Cleanup spec file conditionals + * Thu Jul 27 2017 Kevin Fenzi - 0.999999999-3 - Add Requires on python-webencodings. Fixes bug #1474883 From a6b47afeca04ae156d9db945ae088b2ef6b77303 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 9 Feb 2018 08:17:08 +0000 Subject: [PATCH 31/62] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-html5lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 0f350da..57ccae7 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -6,7 +6,7 @@ Name: python-%{modulename} Summary: A python based HTML parser/tokenizer Version: 0.999999999 -Release: 4%{?dist} +Release: 5%{?dist} Epoch: 1 Group: Development/Libraries License: MIT @@ -95,6 +95,9 @@ specification for maximum compatibility with major desktop web browsers. %changelog +* Fri Feb 09 2018 Fedora Release Engineering - 1:0.999999999-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Fri Sep 29 2017 Troy Dawson - 0.999999999-4 - Cleanup spec file conditionals From 327fc13734d78e70a0dbfbc77b8eaf7128357147 Mon Sep 17 00:00:00 2001 From: Iryna Shcherbina Date: Mon, 12 Feb 2018 03:10:54 +0100 Subject: [PATCH 32/62] Update Python 2 dependency declarations to new packaging standards --- python-html5lib.spec | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 57ccae7..c51c822 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -6,7 +6,7 @@ Name: python-%{modulename} Summary: A python based HTML parser/tokenizer Version: 0.999999999 -Release: 5%{?dist} +Release: 6%{?dist} Epoch: 1 Group: Development/Libraries License: MIT @@ -22,12 +22,12 @@ specification for maximum compatibility with major desktop web browsers. Summary: A python based HTML parser/tokenizer Group: Development/Libraries -Requires: python-six +Requires: python2-six Requires: python2-webencodings -BuildRequires: python-setuptools +BuildRequires: python2-setuptools BuildRequires: python2-devel -BuildRequires: python-nose -BuildRequires: python-six +BuildRequires: python2-nose +BuildRequires: python2-six %{?python_provide:%python_provide python2-%{modulename}} %description -n python2-%{modulename} @@ -95,6 +95,10 @@ specification for maximum compatibility with major desktop web browsers. %changelog +* Mon Feb 12 2018 Iryna Shcherbina - 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 - 1:0.999999999-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From ba7251638784a3b26db0d4bb1bd58241a5b47de0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sat, 16 Jun 2018 10:10:43 +0200 Subject: [PATCH 33/62] Rebuilt for Python 3.7 --- python-html5lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index c51c822..4d7839e 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -6,7 +6,7 @@ Name: python-%{modulename} Summary: A python based HTML parser/tokenizer Version: 0.999999999 -Release: 6%{?dist} +Release: 7%{?dist} Epoch: 1 Group: Development/Libraries License: MIT @@ -95,6 +95,9 @@ specification for maximum compatibility with major desktop web browsers. %changelog +* Sat Jun 16 2018 Miro Hrončok - 1:0.999999999-7 +- Rebuilt for Python 3.7 + * Mon Feb 12 2018 Iryna Shcherbina - 1:0.999999999-6 - Update Python 2 dependency declarations to new packaging standards (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) From 3e8868619a4f1e06a13716159b2097facff3e5fd Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 14 Jul 2018 00:32:18 +0000 Subject: [PATCH 34/62] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-html5lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 4d7839e..c988436 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -6,7 +6,7 @@ Name: python-%{modulename} Summary: A python based HTML parser/tokenizer Version: 0.999999999 -Release: 7%{?dist} +Release: 8%{?dist} Epoch: 1 Group: Development/Libraries License: MIT @@ -95,6 +95,9 @@ specification for maximum compatibility with major desktop web browsers. %changelog +* Sat Jul 14 2018 Fedora Release Engineering - 1:0.999999999-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Sat Jun 16 2018 Miro Hrončok - 1:0.999999999-7 - Rebuilt for Python 3.7 From e4e13ab47e23523cdcdac784b7873b31f61ad1f0 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sun, 29 Jul 2018 23:11:35 +0200 Subject: [PATCH 35/62] =?UTF-8?q?%{python=5Fsitelib}=20=E2=86=92=20%{pytho?= =?UTF-8?q?n2=5Fsitelib}?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Igor Gnatenko --- python-html5lib.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index c988436..669db81 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -82,8 +82,8 @@ specification for maximum compatibility with major desktop web browsers. %files -n python2-%{modulename} %license LICENSE %doc CHANGES.rst README.rst -%{python_sitelib}/%{modulename}-*.egg-info -%{python_sitelib}/%{modulename} +%{python2_sitelib}/%{modulename}-*.egg-info +%{python2_sitelib}/%{modulename} %if 0%{?with_python3} %files -n python3-%{modulename} From 3dc5755f571e2a522f125b9c575eff04bfd45b63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 21 Aug 2018 00:22:12 +0200 Subject: [PATCH 36/62] Update to 1.0.1 (#1584176), run some tests (#1593231) --- .gitignore | 1 + python-html5lib.spec | 134 ++++++++++++++++++++++++------------------- sources | 2 +- 3 files changed, 76 insertions(+), 61 deletions(-) diff --git a/.gitignore b/.gitignore index 423833f..4337e94 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /html5lib-1.0b2.tar.gz /html5lib-0.999.tar.gz /0.999999999.tar.gz +/html5lib-1.0.1.tar.gz diff --git a/python-html5lib.spec b/python-html5lib.spec index 669db81..62fcfed 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -1,100 +1,114 @@ -%global modulename html5lib -%if 0%{?fedora} || 0%{?rhel} > 7 -%global with_python3 1 -%endif - -Name: python-%{modulename} -Summary: A python based HTML parser/tokenizer -Version: 0.999999999 -Release: 8%{?dist} -Epoch: 1 -Group: Development/Libraries -License: MIT -URL: https://pypi.python.org/pypi/%{modulename} -Source0: https://github.com/html5lib/html5lib-python/archive/%{version}.tar.gz -BuildArch: noarch +%global srcname html5lib +Name: python-%{srcname} +Summary: A python based HTML parser/tokenizer +Version: 1.0.1 +Release: 1%{?dist} +Epoch: 1 +License: MIT +URL: https://github.com/html5lib/html5lib-python +Source0: %pypi_source +BuildArch: noarch + +%?python_enable_dependency_generator %description A python based HTML parser/tokenizer based on the WHATWG HTML5 specification for maximum compatibility with major desktop web browsers. -%package -n python2-%{modulename} -Summary: A python based HTML parser/tokenizer -Group: Development/Libraries -Requires: python2-six -Requires: python2-webencodings -BuildRequires: python2-setuptools -BuildRequires: python2-devel -BuildRequires: python2-nose -BuildRequires: python2-six -%{?python_provide:%python_provide python2-%{modulename}} +%package -n python2-%{srcname} +Summary: %summary +BuildRequires: python2-devel +BuildRequires: python2-setuptools -%description -n python2-%{modulename} +# Test deps +BuildRequires: python2-mock +BuildRequires: python2-pytest +BuildRequires: python2-six +BuildRequires: python2-webencodings + +# Optional test deps: +BuildRequires: python2-chardet +BuildRequires: python2-genshi +BuildRequires: python2-lxml + +%{?python_provide:%python_provide python2-%{srcname}} + +%description -n python2-%{srcname} A python based HTML parser/tokenizer based on the WHATWG HTML5 specification for maximum compatibility with major desktop web browsers. -%if 0%{?with_python3} -%package -n python3-%{modulename} -Summary: A python based HTML parser/tokenizer -Group: Development/Libraries -Requires: python3-six -Requires: python3-webencodings -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-nose -BuildRequires: python3-six -%{?python_provide:%python_provide python3-%{modulename}} +%package -n python3-%{srcname} +Summary: %summary +BuildRequires: python3-devel +BuildRequires: python3-setuptools + +# Test deps +BuildRequires: python3-mock +BuildRequires: python3-pytest +BuildRequires: python3-six +BuildRequires: python3-webencodings + +# Optional test deps: +BuildRequires: python3-chardet +BuildRequires: python3-genshi +BuildRequires: python3-lxml + +%{?python_provide:%python_provide python3-%{srcname}} -%description -n python3-%{modulename} +%description -n python3-%{srcname} A python based HTML parser/tokenizer based on the WHATWG HTML5 specification for maximum compatibility with major desktop web browsers. -%endif %prep -%autosetup -n %{modulename}-python-%{version} +%autosetup -n %{srcname}-%{version} %build %py2_build - -%if 0%{?with_python3} %py3_build -%endif %install -%if 0%{?with_python3} +%py2_install %py3_install -%endif -%py2_install -#check -#nosetests-%{python2_version} -# we need python-webencodings packaged +%check +# we don't have pytest-expect, this is hack, TODO: package pytest-expect +sed -i \ + -e 's/config.option.update_xfail/False/' \ + -e 's/^fail_if_missing_pytest_expect.*//' \ + html5lib/tests/conftest.py -#if 0%{?with_python3} -#nosetests-%{python3_version} -#endif +# there are hundreds of tests in here, but lot of them xfail only with pytest-expect: +mv html5lib/tests/testdata{,_nope} +mkdir -p html5lib/tests/testdata/encoding/chardet/ +cp html5lib/tests/testdata{_nope,}/encoding/chardet/test_big5.txt +# hack ends here -%files -n python2-%{modulename} +%{__python2} -m pytest +%{__python3} -m pytest + + +%files -n python2-%{srcname} %license LICENSE %doc CHANGES.rst README.rst -%{python2_sitelib}/%{modulename}-*.egg-info -%{python2_sitelib}/%{modulename} +%{python2_sitelib}/%{srcname}-*.egg-info/ +%{python2_sitelib}/%{srcname}/ -%if 0%{?with_python3} -%files -n python3-%{modulename} +%files -n python3-%{srcname} %license LICENSE %doc CHANGES.rst README.rst -%{python3_sitelib}/%{modulename}-*.egg-info -%{python3_sitelib}/%{modulename} -%endif +%{python3_sitelib}/%{srcname}-*.egg-info/ +%{python3_sitelib}/%{srcname}/ %changelog +* Mon Aug 20 2018 Miro Hrončok - 1:1.0.1-1 +- Update to 1.0.1 (#1584176) + * Sat Jul 14 2018 Fedora Release Engineering - 1:0.999999999-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index 5f63c29..b3c2d48 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (0.999999999.tar.gz) = 74205c25ea38a1a0690181d56bdf4560ef36cf0d39acbb1ab16e2199e3657f87636508ba128d522970876c9a0ba2ac8df877053ff0179403668a2f0300af7877 +SHA512 (html5lib-1.0.1.tar.gz) = 35939b4450893864da04e735ee5e0addacf1dd34bae6a6909c76572abf6bfded446a78a713dfde91c1485ba45867d7abeb6a45cf0545c16ea968707be7de5dd2 From 4bf006ca4bff80e8b167803e2a6f88e46ab1a9c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 21 Aug 2018 16:56:38 +0200 Subject: [PATCH 37/62] Use pytest-expect on python3 (#1593231) --- python-html5lib.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 62fcfed..fc5d0c6 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -47,6 +47,7 @@ BuildRequires: python3-setuptools # Test deps BuildRequires: python3-mock BuildRequires: python3-pytest +BuildRequires: python3-pytest-expect BuildRequires: python3-six BuildRequires: python3-webencodings @@ -76,7 +77,10 @@ specification for maximum compatibility with major desktop web browsers. %check -# we don't have pytest-expect, this is hack, TODO: package pytest-expect +# we have python3-pytest-expect, so python3 tests first +%{__python3} -m pytest + +# we don't have python2-pytest-expect, this is a workaround sed -i \ -e 's/config.option.update_xfail/False/' \ -e 's/^fail_if_missing_pytest_expect.*//' \ @@ -86,10 +90,9 @@ sed -i \ mv html5lib/tests/testdata{,_nope} mkdir -p html5lib/tests/testdata/encoding/chardet/ cp html5lib/tests/testdata{_nope,}/encoding/chardet/test_big5.txt -# hack ends here +# workaround ends here %{__python2} -m pytest -%{__python3} -m pytest %files -n python2-%{srcname} From 05a4c7d0787804ccd1e69b84144f958e2361703b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 24 Sep 2018 15:13:19 +0200 Subject: [PATCH 38/62] Fix dire deprecation warnings (#1627071) --- collections-abc.patch | 44 +++++++++++++++++++++++++++++++++++++++++++ python-html5lib.spec | 9 +++++++-- 2 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 collections-abc.patch diff --git a/collections-abc.patch b/collections-abc.patch new file mode 100644 index 0000000..4a7ff78 --- /dev/null +++ b/collections-abc.patch @@ -0,0 +1,44 @@ +From 322a2d57bfdc52a9ce14bee93f9abb372cc08487 Mon Sep 17 00:00:00 2001 +From: 5j9 <5j9@users.noreply.github.com> +Date: Sun, 23 Sep 2018 11:32:46 +0330 +Subject: [PATCH] Try to import MutableMapping from collections.abc + +Note that collections.abc has been added in Python 3.3. + +Fixes #402 +--- + html5lib/_trie/_base.py | 5 ++++- + html5lib/treebuilders/dom.py | 5 ++++- + 2 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/html5lib/_trie/_base.py b/html5lib/_trie/_base.py +index a1158bbb..6b71975f 100644 +--- a/html5lib/_trie/_base.py ++++ b/html5lib/_trie/_base.py +@@ -1,6 +1,9 @@ + from __future__ import absolute_import, division, unicode_literals + +-from collections import Mapping ++try: ++ from collections.abc import Mapping ++except ImportError: # Python 2.7 ++ from collections import Mapping + + + class Trie(Mapping): +diff --git a/html5lib/treebuilders/dom.py b/html5lib/treebuilders/dom.py +index dcfac220..d8b53004 100644 +--- a/html5lib/treebuilders/dom.py ++++ b/html5lib/treebuilders/dom.py +@@ -1,7 +1,10 @@ + from __future__ import absolute_import, division, unicode_literals + + +-from collections import MutableMapping ++try: ++ from collections.abc import MutableMapping ++except ImportError: # Python 2.7 ++ from collections import MutableMapping + from xml.dom import minidom, Node + import weakref + diff --git a/python-html5lib.spec b/python-html5lib.spec index fc5d0c6..628eceb 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -2,11 +2,13 @@ Name: python-%{srcname} Summary: A python based HTML parser/tokenizer Version: 1.0.1 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 1 License: MIT URL: https://github.com/html5lib/html5lib-python Source0: %pypi_source +Patch0: %{url}/pull/403.patch#/collections-abc.patch + BuildArch: noarch %?python_enable_dependency_generator @@ -64,7 +66,7 @@ specification for maximum compatibility with major desktop web browsers. %prep -%autosetup -n %{srcname}-%{version} +%autosetup -p1 -n %{srcname}-%{version} %build %py2_build @@ -109,6 +111,9 @@ cp html5lib/tests/testdata{_nope,}/encoding/chardet/test_big5.txt %changelog +* Mon Sep 24 2018 Miro Hrončok - 1:1.0.1-2 +- Fix dire deprecation warnings (#1627071) + * Mon Aug 20 2018 Miro Hrončok - 1:1.0.1-1 - Update to 1.0.1 (#1584176) From 9171f31ea91a743e8226e738d62a62e11d94db19 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 2 Feb 2019 07:11:50 +0000 Subject: [PATCH 39/62] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-html5lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 628eceb..af92405 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -2,7 +2,7 @@ Name: python-%{srcname} Summary: A python based HTML parser/tokenizer Version: 1.0.1 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 1 License: MIT URL: https://github.com/html5lib/html5lib-python @@ -111,6 +111,9 @@ cp html5lib/tests/testdata{_nope,}/encoding/chardet/test_big5.txt %changelog +* Sat Feb 02 2019 Fedora Release Engineering - 1:1.0.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Mon Sep 24 2018 Miro Hrončok - 1:1.0.1-2 - Fix dire deprecation warnings (#1627071) From 67d7f86944e224d0cff27f6f2857fb5e1671a23b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 26 Jul 2019 13:54:09 +0000 Subject: [PATCH 40/62] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-html5lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index af92405..6016265 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -2,7 +2,7 @@ Name: python-%{srcname} Summary: A python based HTML parser/tokenizer Version: 1.0.1 -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 1 License: MIT URL: https://github.com/html5lib/html5lib-python @@ -111,6 +111,9 @@ cp html5lib/tests/testdata{_nope,}/encoding/chardet/test_big5.txt %changelog +* Fri Jul 26 2019 Fedora Release Engineering - 1:1.0.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Sat Feb 02 2019 Fedora Release Engineering - 1:1.0.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From d0f57798529e056ca05d15c1263ba0a21f5bd805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 30 Jul 2019 01:26:11 +0200 Subject: [PATCH 41/62] Fix FTBFS with Pytest 4, deselect test_encoding ________________________________ test_encoding _________________________________ def test_encoding(): for filename in get_data_files("encoding"): tests = _TestData(filename, b"data", encoding=None) for test in tests: > runParserEncodingTest(test[b'data'], test[b'encoding']) html5lib/tests/test_encoding.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ data = b'\n' encoding = 'iso-8859-2' def runParserEncodingTest(data, encoding): p = HTMLParser() assert p.documentEncoding is None p.parse(data, useChardet=False) encoding = encoding.lower().decode("ascii") > assert encoding == p.documentEncoding, errorMessage(data, encoding, p.documentEncoding) E AssertionError: Input: E b'\n' E Expected: E 'iso-8859-2' E Recieved E 'windows-1252' E E assert 'iso-8859-2' == 'windows-1252' E - iso-8859-2 E + windows-1252 html5lib/tests/test_encoding.py:84: AssertionError --- pytest4.patch | 140 +++++++++++++++++++++++++++++++++++++++++++ python-html5lib.spec | 5 +- 2 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 pytest4.patch diff --git a/pytest4.patch b/pytest4.patch new file mode 100644 index 0000000..e69efea --- /dev/null +++ b/pytest4.patch @@ -0,0 +1,140 @@ +From dd117cc62d961573e9867d79ae1c3461a42e6167 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Thu, 28 Mar 2019 01:45:43 +0100 +Subject: [PATCH] Support pytest 4 + +Fixes https://github.com/html5lib/html5lib-python/issues/411 +--- + html5lib/tests/test_encoding.py | 4 ++-- + html5lib/tests/test_sanitizer.py | 14 +++++++------- + html5lib/tests/test_serializer.py | 2 +- + html5lib/tests/test_stream.py | 7 ++++--- + html5lib/tests/test_treewalkers.py | 2 +- + requirements-test.txt | 2 +- + tox.ini | 2 +- + 7 files changed, 17 insertions(+), 16 deletions(-) + +diff --git a/html5lib/tests/test_encoding.py b/html5lib/tests/test_encoding.py +index 9a411c77..97b6ca2a 100644 +--- a/html5lib/tests/test_encoding.py ++++ b/html5lib/tests/test_encoding.py +@@ -99,8 +99,8 @@ def test_encoding(): + for filename in get_data_files("encoding"): + tests = _TestData(filename, b"data", encoding=None) + for test in tests: +- yield (runParserEncodingTest, test[b'data'], test[b'encoding']) +- yield (runPreScanEncodingTest, test[b'data'], test[b'encoding']) ++ runParserEncodingTest(test[b'data'], test[b'encoding']) ++ runPreScanEncodingTest(test[b'data'], test[b'encoding']) + + + # pylint:disable=wrong-import-position +diff --git a/html5lib/tests/test_sanitizer.py b/html5lib/tests/test_sanitizer.py +index 45046d57..1b7285fc 100644 +--- a/html5lib/tests/test_sanitizer.py ++++ b/html5lib/tests/test_sanitizer.py +@@ -67,19 +67,19 @@ def test_sanitizer(): + 'tfoot', 'th', 'thead', 'tr', 'select']: + continue # TODO + if tag_name == 'image': +- yield (runSanitizerTest, "test_should_allow_%s_tag" % tag_name, ++ runSanitizerTest("test_should_allow_%s_tag" % tag_name, + "foo <bad>bar</bad> baz", + "<%s title='1'>foo bar baz" % (tag_name, tag_name)) + elif tag_name == 'br': +- yield (runSanitizerTest, "test_should_allow_%s_tag" % tag_name, ++ runSanitizerTest("test_should_allow_%s_tag" % tag_name, + "
foo <bad>bar</bad> baz
", + "<%s title='1'>foo bar baz" % (tag_name, tag_name)) + elif tag_name in constants.voidElements: +- yield (runSanitizerTest, "test_should_allow_%s_tag" % tag_name, ++ runSanitizerTest("test_should_allow_%s_tag" % tag_name, + "<%s title=\"1\"/>foo <bad>bar</bad> baz" % tag_name, + "<%s title='1'>foo bar baz" % (tag_name, tag_name)) + else: +- yield (runSanitizerTest, "test_should_allow_%s_tag" % tag_name, ++ runSanitizerTest("test_should_allow_%s_tag" % tag_name, + "<%s title=\"1\">foo <bad>bar</bad> baz" % (tag_name, tag_name), + "<%s title='1'>foo bar baz" % (tag_name, tag_name)) + +@@ -93,7 +93,7 @@ def test_sanitizer(): + attribute_value = 'foo' + if attribute_name in sanitizer.attr_val_is_uri: + attribute_value = '%s://sub.domain.tld/path/object.ext' % sanitizer.allowed_protocols[0] +- yield (runSanitizerTest, "test_should_allow_%s_attribute" % attribute_name, ++ runSanitizerTest("test_should_allow_%s_attribute" % attribute_name, + "

foo <bad>bar</bad> baz

" % (attribute_name, attribute_value), + "

foo bar baz

" % (attribute_name, attribute_value)) + +@@ -101,7 +101,7 @@ def test_sanitizer(): + rest_of_uri = '//sub.domain.tld/path/object.ext' + if protocol == 'data': + rest_of_uri = 'image/png;base64,aGVsbG8gd29ybGQ=' +- yield (runSanitizerTest, "test_should_allow_uppercase_%s_uris" % protocol, ++ runSanitizerTest("test_should_allow_uppercase_%s_uris" % protocol, + "foo" % (protocol, rest_of_uri), + """foo""" % (protocol, rest_of_uri)) + +@@ -110,7 +110,7 @@ def test_sanitizer(): + if protocol == 'data': + rest_of_uri = 'image/png;base64,aGVsbG8gd29ybGQ=' + protocol = protocol.upper() +- yield (runSanitizerTest, "test_should_allow_uppercase_%s_uris" % protocol, ++ runSanitizerTest("test_should_allow_uppercase_%s_uris" % protocol, + "foo" % (protocol, rest_of_uri), + """foo""" % (protocol, rest_of_uri)) + +diff --git a/html5lib/tests/test_serializer.py b/html5lib/tests/test_serializer.py +index 9333286e..29bbb492 100644 +--- a/html5lib/tests/test_serializer.py ++++ b/html5lib/tests/test_serializer.py +@@ -222,4 +222,4 @@ def test_serializer(): + with open(filename) as fp: + tests = json.load(fp) + for test in tests['tests']: +- yield runSerializerTest, test["input"], test["expected"], test.get("options", {}) ++ runSerializerTest(test["input"], test["expected"], test.get("options", {})) +diff --git a/html5lib/tests/test_stream.py b/html5lib/tests/test_stream.py +index 27c39538..a9b3ebbe 100644 +--- a/html5lib/tests/test_stream.py ++++ b/html5lib/tests/test_stream.py +@@ -308,9 +308,10 @@ def test_invalid_codepoints(inp, num): + ("'\\uD800\\uD800\\uD800'", 3), + ("'a\\uD800a\\uD800a\\uD800a'", 3), + ("'\\uDFFF\\uDBFF'", 2), +- pytest.mark.skipif(sys.maxunicode == 0xFFFF, +- ("'\\uDBFF\\uDFFF'", 2), +- reason="narrow Python")]) ++ pytest.param( ++ "'\\uDBFF\\uDFFF'", 2, ++ mark=pytest.mark.skipif(sys.maxunicode == 0xFFFF, ++ reason="narrow Python"))]) + def test_invalid_codepoints_surrogates(inp, num): + inp = eval(inp) # pylint:disable=eval-used + fp = StringIO(inp) +diff --git a/html5lib/tests/test_treewalkers.py b/html5lib/tests/test_treewalkers.py +index 67fc89e5..c2323b7e 100644 +--- a/html5lib/tests/test_treewalkers.py ++++ b/html5lib/tests/test_treewalkers.py +@@ -99,7 +99,7 @@ def test_treewalker_six_mix(): + + for tree in sorted(treeTypes.items()): + for intext, attrs, expected in sm_tests: +- yield runTreewalkerEditTest, intext, expected, attrs, tree ++ runTreewalkerEditTest(intext, expected, attrs, tree) + + + @pytest.mark.parametrize("tree,char", itertools.product(sorted(treeTypes.items()), ["x", "\u1234"])) +diff --git a/requirements-test.txt b/requirements-test.txt +index 4e223a3f..b936e0fa 100644 +--- a/requirements-test.txt ++++ b/requirements-test.txt +@@ -4,7 +4,7 @@ tox + + flake8<3.0 + +-pytest==3.2.5 ++pytest>=4.3,<4.4 + coverage + pytest-expect>=1.1,<2.0 + mock diff --git a/python-html5lib.spec b/python-html5lib.spec index 6016265..2417683 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -8,6 +8,8 @@ License: MIT URL: https://github.com/html5lib/html5lib-python Source0: %pypi_source Patch0: %{url}/pull/403.patch#/collections-abc.patch +#{url}/pull/414.patch#/pytest4.patch (tox.ini hunk fails) +Patch1: pytest4.patch BuildArch: noarch @@ -80,7 +82,8 @@ specification for maximum compatibility with major desktop web browsers. %check # we have python3-pytest-expect, so python3 tests first -%{__python3} -m pytest +# XXX figure out the failure in test_encoding +%{__python3} -m pytest -k "not test_encoding" # we don't have python2-pytest-expect, this is a workaround sed -i \ From 7eca60e7a90a38680c6c2ce34f3d4934a450eb92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 16 Aug 2019 15:14:02 +0200 Subject: [PATCH 42/62] Rebuilt for Python 3.8 --- python-html5lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 2417683..1ae491d 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -2,7 +2,7 @@ Name: python-%{srcname} Summary: A python based HTML parser/tokenizer Version: 1.0.1 -Release: 4%{?dist} +Release: 5%{?dist} Epoch: 1 License: MIT URL: https://github.com/html5lib/html5lib-python @@ -114,6 +114,9 @@ cp html5lib/tests/testdata{_nope,}/encoding/chardet/test_big5.txt %changelog +* Fri Aug 16 2019 Miro Hrončok - 1:1.0.1-5 +- Rebuilt for Python 3.8 + * Fri Jul 26 2019 Fedora Release Engineering - 1:1.0.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 63d8f6fb849f13df892d9736159bb2a2ff703def Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 26 Aug 2019 13:22:13 +0200 Subject: [PATCH 43/62] Reduce Python 2 build dependencies --- python-html5lib.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 1ae491d..d4168dc 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -2,7 +2,7 @@ Name: python-%{srcname} Summary: A python based HTML parser/tokenizer Version: 1.0.1 -Release: 5%{?dist} +Release: 6%{?dist} Epoch: 1 License: MIT URL: https://github.com/html5lib/html5lib-python @@ -25,6 +25,7 @@ Summary: %summary BuildRequires: python2-devel BuildRequires: python2-setuptools +%if 0%{?fedora} < 32 # Test deps BuildRequires: python2-mock BuildRequires: python2-pytest @@ -35,6 +36,7 @@ BuildRequires: python2-webencodings BuildRequires: python2-chardet BuildRequires: python2-genshi BuildRequires: python2-lxml +%endif %{?python_provide:%python_provide python2-%{srcname}} @@ -85,6 +87,7 @@ specification for maximum compatibility with major desktop web browsers. # XXX figure out the failure in test_encoding %{__python3} -m pytest -k "not test_encoding" +%if 0%{?fedora} < 32 # we don't have python2-pytest-expect, this is a workaround sed -i \ -e 's/config.option.update_xfail/False/' \ @@ -98,6 +101,7 @@ cp html5lib/tests/testdata{_nope,}/encoding/chardet/test_big5.txt # workaround ends here %{__python2} -m pytest +%endif %files -n python2-%{srcname} @@ -114,6 +118,9 @@ cp html5lib/tests/testdata{_nope,}/encoding/chardet/test_big5.txt %changelog +* Mon Aug 26 2019 Miro Hrončok - 1:1.0.1-6 +- Reduce Python 2 build dependencies + * Fri Aug 16 2019 Miro Hrončok - 1:1.0.1-5 - Rebuilt for Python 3.8 From 4f49aca776f642bd1b1904b839d96111e8a2751d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 16 Sep 2019 12:05:41 +0200 Subject: [PATCH 44/62] Drop python2-html5lib --- python-html5lib.spec | 55 ++++---------------------------------------- 1 file changed, 4 insertions(+), 51 deletions(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index d4168dc..2a7f936 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -2,7 +2,7 @@ Name: python-%{srcname} Summary: A python based HTML parser/tokenizer Version: 1.0.1 -Release: 6%{?dist} +Release: 7%{?dist} Epoch: 1 License: MIT URL: https://github.com/html5lib/html5lib-python @@ -20,31 +20,6 @@ A python based HTML parser/tokenizer based on the WHATWG HTML5 specification for maximum compatibility with major desktop web browsers. -%package -n python2-%{srcname} -Summary: %summary -BuildRequires: python2-devel -BuildRequires: python2-setuptools - -%if 0%{?fedora} < 32 -# Test deps -BuildRequires: python2-mock -BuildRequires: python2-pytest -BuildRequires: python2-six -BuildRequires: python2-webencodings - -# Optional test deps: -BuildRequires: python2-chardet -BuildRequires: python2-genshi -BuildRequires: python2-lxml -%endif - -%{?python_provide:%python_provide python2-%{srcname}} - -%description -n python2-%{srcname} -A python based HTML parser/tokenizer based on the WHATWG HTML5 -specification for maximum compatibility with major desktop web browsers. - - %package -n python3-%{srcname} Summary: %summary BuildRequires: python3-devel @@ -73,42 +48,17 @@ specification for maximum compatibility with major desktop web browsers. %autosetup -p1 -n %{srcname}-%{version} %build -%py2_build %py3_build %install -%py2_install %py3_install %check -# we have python3-pytest-expect, so python3 tests first # XXX figure out the failure in test_encoding %{__python3} -m pytest -k "not test_encoding" -%if 0%{?fedora} < 32 -# we don't have python2-pytest-expect, this is a workaround -sed -i \ - -e 's/config.option.update_xfail/False/' \ - -e 's/^fail_if_missing_pytest_expect.*//' \ - html5lib/tests/conftest.py - -# there are hundreds of tests in here, but lot of them xfail only with pytest-expect: -mv html5lib/tests/testdata{,_nope} -mkdir -p html5lib/tests/testdata/encoding/chardet/ -cp html5lib/tests/testdata{_nope,}/encoding/chardet/test_big5.txt -# workaround ends here - -%{__python2} -m pytest -%endif - - -%files -n python2-%{srcname} -%license LICENSE -%doc CHANGES.rst README.rst -%{python2_sitelib}/%{srcname}-*.egg-info/ -%{python2_sitelib}/%{srcname}/ %files -n python3-%{srcname} %license LICENSE @@ -118,6 +68,9 @@ cp html5lib/tests/testdata{_nope,}/encoding/chardet/test_big5.txt %changelog +* Mon Sep 16 2019 Miro Hrončok - 1:1.0.1-7 +- Drop python2-html5lib + * Mon Aug 26 2019 Miro Hrončok - 1:1.0.1-6 - Reduce Python 2 build dependencies From b28d4188f27cfa8bc6f0a28668bbd7cda7e2ab76 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 30 Jan 2020 12:38:30 +0000 Subject: [PATCH 45/62] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-html5lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 2a7f936..cec78ce 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -2,7 +2,7 @@ Name: python-%{srcname} Summary: A python based HTML parser/tokenizer Version: 1.0.1 -Release: 7%{?dist} +Release: 8%{?dist} Epoch: 1 License: MIT URL: https://github.com/html5lib/html5lib-python @@ -68,6 +68,9 @@ specification for maximum compatibility with major desktop web browsers. %changelog +* Thu Jan 30 2020 Fedora Release Engineering - 1:1.0.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Mon Sep 16 2019 Miro Hrončok - 1:1.0.1-7 - Drop python2-html5lib From bc2d4314d8ed393c299da1fe6723d392dfaaf62c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sat, 23 May 2020 09:04:34 +0200 Subject: [PATCH 46/62] Rebuilt for Python 3.9 --- python-html5lib.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index cec78ce..0908f74 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -2,7 +2,7 @@ Name: python-%{srcname} Summary: A python based HTML parser/tokenizer Version: 1.0.1 -Release: 8%{?dist} +Release: 9%{?dist} Epoch: 1 License: MIT URL: https://github.com/html5lib/html5lib-python @@ -34,7 +34,7 @@ BuildRequires: python3-webencodings # Optional test deps: BuildRequires: python3-chardet -BuildRequires: python3-genshi +#BuildRequires: python3-genshi -- https://bugzilla.redhat.com/show_bug.cgi?id=1817711 BuildRequires: python3-lxml %{?python_provide:%python_provide python3-%{srcname}} @@ -68,6 +68,9 @@ specification for maximum compatibility with major desktop web browsers. %changelog +* Sat May 23 2020 Miro Hrončok - 1:1.0.1-9 +- Rebuilt for Python 3.9 + * Thu Jan 30 2020 Fedora Release Engineering - 1:1.0.1-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From dcc846ee9ed79b771d495dadc690b1ffbbb9134a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sat, 30 May 2020 11:03:49 +0200 Subject: [PATCH 47/62] Use pytest 4 --- python-html5lib.spec | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 0908f74..eceba4f 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -2,7 +2,7 @@ Name: python-%{srcname} Summary: A python based HTML parser/tokenizer Version: 1.0.1 -Release: 9%{?dist} +Release: 10%{?dist} Epoch: 1 License: MIT URL: https://github.com/html5lib/html5lib-python @@ -26,16 +26,16 @@ BuildRequires: python3-devel BuildRequires: python3-setuptools # Test deps -BuildRequires: python3-mock -BuildRequires: python3-pytest -BuildRequires: python3-pytest-expect -BuildRequires: python3-six -BuildRequires: python3-webencodings +BuildRequires: python3dist(mock) +BuildRequires: python3dist(pytest) < 5 +BuildRequires: python3dist(pytest-expect) +BuildRequires: python3dist(six) +BuildRequires: python3dist(webencodings) # Optional test deps: -BuildRequires: python3-chardet -#BuildRequires: python3-genshi -- https://bugzilla.redhat.com/show_bug.cgi?id=1817711 -BuildRequires: python3-lxml +BuildRequires: python3dist(chardet) +#BuildRequires: python3dist(genshi) -- https://bugzilla.redhat.com/show_bug.cgi?id=1817711 +BuildRequires: python3dist(lxml) %{?python_provide:%python_provide python3-%{srcname}} @@ -68,6 +68,9 @@ specification for maximum compatibility with major desktop web browsers. %changelog +* Sat May 30 2020 Miro Hrončok - 1:1.0.1-10 +- Use pytest 4 + * Sat May 23 2020 Miro Hrončok - 1:1.0.1-9 - Rebuilt for Python 3.9 From 6e51503f96f87c81db081e0634de14673dc39969 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Wed, 1 Jul 2020 13:11:54 +0200 Subject: [PATCH 48/62] Update to 1.1 (#1849837) Use pytest 5 --- .gitignore | 1 + collections-abc.patch | 44 ------------- pytest4.patch | 140 ------------------------------------------ python-html5lib.spec | 18 +++--- sources | 2 +- 5 files changed, 11 insertions(+), 194 deletions(-) delete mode 100644 collections-abc.patch delete mode 100644 pytest4.patch diff --git a/.gitignore b/.gitignore index 4337e94..c90028f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /html5lib-0.999.tar.gz /0.999999999.tar.gz /html5lib-1.0.1.tar.gz +/html5lib-1.1.tar.gz diff --git a/collections-abc.patch b/collections-abc.patch deleted file mode 100644 index 4a7ff78..0000000 --- a/collections-abc.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 322a2d57bfdc52a9ce14bee93f9abb372cc08487 Mon Sep 17 00:00:00 2001 -From: 5j9 <5j9@users.noreply.github.com> -Date: Sun, 23 Sep 2018 11:32:46 +0330 -Subject: [PATCH] Try to import MutableMapping from collections.abc - -Note that collections.abc has been added in Python 3.3. - -Fixes #402 ---- - html5lib/_trie/_base.py | 5 ++++- - html5lib/treebuilders/dom.py | 5 ++++- - 2 files changed, 8 insertions(+), 2 deletions(-) - -diff --git a/html5lib/_trie/_base.py b/html5lib/_trie/_base.py -index a1158bbb..6b71975f 100644 ---- a/html5lib/_trie/_base.py -+++ b/html5lib/_trie/_base.py -@@ -1,6 +1,9 @@ - from __future__ import absolute_import, division, unicode_literals - --from collections import Mapping -+try: -+ from collections.abc import Mapping -+except ImportError: # Python 2.7 -+ from collections import Mapping - - - class Trie(Mapping): -diff --git a/html5lib/treebuilders/dom.py b/html5lib/treebuilders/dom.py -index dcfac220..d8b53004 100644 ---- a/html5lib/treebuilders/dom.py -+++ b/html5lib/treebuilders/dom.py -@@ -1,7 +1,10 @@ - from __future__ import absolute_import, division, unicode_literals - - --from collections import MutableMapping -+try: -+ from collections.abc import MutableMapping -+except ImportError: # Python 2.7 -+ from collections import MutableMapping - from xml.dom import minidom, Node - import weakref - diff --git a/pytest4.patch b/pytest4.patch deleted file mode 100644 index e69efea..0000000 --- a/pytest4.patch +++ /dev/null @@ -1,140 +0,0 @@ -From dd117cc62d961573e9867d79ae1c3461a42e6167 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Thu, 28 Mar 2019 01:45:43 +0100 -Subject: [PATCH] Support pytest 4 - -Fixes https://github.com/html5lib/html5lib-python/issues/411 ---- - html5lib/tests/test_encoding.py | 4 ++-- - html5lib/tests/test_sanitizer.py | 14 +++++++------- - html5lib/tests/test_serializer.py | 2 +- - html5lib/tests/test_stream.py | 7 ++++--- - html5lib/tests/test_treewalkers.py | 2 +- - requirements-test.txt | 2 +- - tox.ini | 2 +- - 7 files changed, 17 insertions(+), 16 deletions(-) - -diff --git a/html5lib/tests/test_encoding.py b/html5lib/tests/test_encoding.py -index 9a411c77..97b6ca2a 100644 ---- a/html5lib/tests/test_encoding.py -+++ b/html5lib/tests/test_encoding.py -@@ -99,8 +99,8 @@ def test_encoding(): - for filename in get_data_files("encoding"): - tests = _TestData(filename, b"data", encoding=None) - for test in tests: -- yield (runParserEncodingTest, test[b'data'], test[b'encoding']) -- yield (runPreScanEncodingTest, test[b'data'], test[b'encoding']) -+ runParserEncodingTest(test[b'data'], test[b'encoding']) -+ runPreScanEncodingTest(test[b'data'], test[b'encoding']) - - - # pylint:disable=wrong-import-position -diff --git a/html5lib/tests/test_sanitizer.py b/html5lib/tests/test_sanitizer.py -index 45046d57..1b7285fc 100644 ---- a/html5lib/tests/test_sanitizer.py -+++ b/html5lib/tests/test_sanitizer.py -@@ -67,19 +67,19 @@ def test_sanitizer(): - 'tfoot', 'th', 'thead', 'tr', 'select']: - continue # TODO - if tag_name == 'image': -- yield (runSanitizerTest, "test_should_allow_%s_tag" % tag_name, -+ runSanitizerTest("test_should_allow_%s_tag" % tag_name, - "foo <bad>bar</bad> baz", - "<%s title='1'>foo bar baz" % (tag_name, tag_name)) - elif tag_name == 'br': -- yield (runSanitizerTest, "test_should_allow_%s_tag" % tag_name, -+ runSanitizerTest("test_should_allow_%s_tag" % tag_name, - "
foo <bad>bar</bad> baz
", - "<%s title='1'>foo bar baz" % (tag_name, tag_name)) - elif tag_name in constants.voidElements: -- yield (runSanitizerTest, "test_should_allow_%s_tag" % tag_name, -+ runSanitizerTest("test_should_allow_%s_tag" % tag_name, - "<%s title=\"1\"/>foo <bad>bar</bad> baz" % tag_name, - "<%s title='1'>foo bar baz" % (tag_name, tag_name)) - else: -- yield (runSanitizerTest, "test_should_allow_%s_tag" % tag_name, -+ runSanitizerTest("test_should_allow_%s_tag" % tag_name, - "<%s title=\"1\">foo <bad>bar</bad> baz" % (tag_name, tag_name), - "<%s title='1'>foo bar baz" % (tag_name, tag_name)) - -@@ -93,7 +93,7 @@ def test_sanitizer(): - attribute_value = 'foo' - if attribute_name in sanitizer.attr_val_is_uri: - attribute_value = '%s://sub.domain.tld/path/object.ext' % sanitizer.allowed_protocols[0] -- yield (runSanitizerTest, "test_should_allow_%s_attribute" % attribute_name, -+ runSanitizerTest("test_should_allow_%s_attribute" % attribute_name, - "

foo <bad>bar</bad> baz

" % (attribute_name, attribute_value), - "

foo bar baz

" % (attribute_name, attribute_value)) - -@@ -101,7 +101,7 @@ def test_sanitizer(): - rest_of_uri = '//sub.domain.tld/path/object.ext' - if protocol == 'data': - rest_of_uri = 'image/png;base64,aGVsbG8gd29ybGQ=' -- yield (runSanitizerTest, "test_should_allow_uppercase_%s_uris" % protocol, -+ runSanitizerTest("test_should_allow_uppercase_%s_uris" % protocol, - "foo" % (protocol, rest_of_uri), - """foo""" % (protocol, rest_of_uri)) - -@@ -110,7 +110,7 @@ def test_sanitizer(): - if protocol == 'data': - rest_of_uri = 'image/png;base64,aGVsbG8gd29ybGQ=' - protocol = protocol.upper() -- yield (runSanitizerTest, "test_should_allow_uppercase_%s_uris" % protocol, -+ runSanitizerTest("test_should_allow_uppercase_%s_uris" % protocol, - "foo" % (protocol, rest_of_uri), - """foo""" % (protocol, rest_of_uri)) - -diff --git a/html5lib/tests/test_serializer.py b/html5lib/tests/test_serializer.py -index 9333286e..29bbb492 100644 ---- a/html5lib/tests/test_serializer.py -+++ b/html5lib/tests/test_serializer.py -@@ -222,4 +222,4 @@ def test_serializer(): - with open(filename) as fp: - tests = json.load(fp) - for test in tests['tests']: -- yield runSerializerTest, test["input"], test["expected"], test.get("options", {}) -+ runSerializerTest(test["input"], test["expected"], test.get("options", {})) -diff --git a/html5lib/tests/test_stream.py b/html5lib/tests/test_stream.py -index 27c39538..a9b3ebbe 100644 ---- a/html5lib/tests/test_stream.py -+++ b/html5lib/tests/test_stream.py -@@ -308,9 +308,10 @@ def test_invalid_codepoints(inp, num): - ("'\\uD800\\uD800\\uD800'", 3), - ("'a\\uD800a\\uD800a\\uD800a'", 3), - ("'\\uDFFF\\uDBFF'", 2), -- pytest.mark.skipif(sys.maxunicode == 0xFFFF, -- ("'\\uDBFF\\uDFFF'", 2), -- reason="narrow Python")]) -+ pytest.param( -+ "'\\uDBFF\\uDFFF'", 2, -+ mark=pytest.mark.skipif(sys.maxunicode == 0xFFFF, -+ reason="narrow Python"))]) - def test_invalid_codepoints_surrogates(inp, num): - inp = eval(inp) # pylint:disable=eval-used - fp = StringIO(inp) -diff --git a/html5lib/tests/test_treewalkers.py b/html5lib/tests/test_treewalkers.py -index 67fc89e5..c2323b7e 100644 ---- a/html5lib/tests/test_treewalkers.py -+++ b/html5lib/tests/test_treewalkers.py -@@ -99,7 +99,7 @@ def test_treewalker_six_mix(): - - for tree in sorted(treeTypes.items()): - for intext, attrs, expected in sm_tests: -- yield runTreewalkerEditTest, intext, expected, attrs, tree -+ runTreewalkerEditTest(intext, expected, attrs, tree) - - - @pytest.mark.parametrize("tree,char", itertools.product(sorted(treeTypes.items()), ["x", "\u1234"])) -diff --git a/requirements-test.txt b/requirements-test.txt -index 4e223a3f..b936e0fa 100644 ---- a/requirements-test.txt -+++ b/requirements-test.txt -@@ -4,7 +4,7 @@ tox - - flake8<3.0 - --pytest==3.2.5 -+pytest>=4.3,<4.4 - coverage - pytest-expect>=1.1,<2.0 - mock diff --git a/python-html5lib.spec b/python-html5lib.spec index eceba4f..049ac76 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -1,15 +1,12 @@ %global srcname html5lib Name: python-%{srcname} Summary: A python based HTML parser/tokenizer -Version: 1.0.1 -Release: 10%{?dist} +Version: 1.1 +Release: 1%{?dist} Epoch: 1 License: MIT URL: https://github.com/html5lib/html5lib-python Source0: %pypi_source -Patch0: %{url}/pull/403.patch#/collections-abc.patch -#{url}/pull/414.patch#/pytest4.patch (tox.ini hunk fails) -Patch1: pytest4.patch BuildArch: noarch @@ -27,14 +24,14 @@ BuildRequires: python3-setuptools # Test deps BuildRequires: python3dist(mock) -BuildRequires: python3dist(pytest) < 5 +BuildRequires: python3dist(pytest) BuildRequires: python3dist(pytest-expect) BuildRequires: python3dist(six) BuildRequires: python3dist(webencodings) # Optional test deps: BuildRequires: python3dist(chardet) -#BuildRequires: python3dist(genshi) -- https://bugzilla.redhat.com/show_bug.cgi?id=1817711 +BuildRequires: python3dist(genshi) BuildRequires: python3dist(lxml) %{?python_provide:%python_provide python3-%{srcname}} @@ -56,8 +53,7 @@ specification for maximum compatibility with major desktop web browsers. %check -# XXX figure out the failure in test_encoding -%{__python3} -m pytest -k "not test_encoding" +%pytest %files -n python3-%{srcname} @@ -68,6 +64,10 @@ specification for maximum compatibility with major desktop web browsers. %changelog +* Wed Jul 01 2020 Charalampos Stratakis - 1:1.1-1 +- Update to 1.1 (#1849837) +- Use pytest 5 + * Sat May 30 2020 Miro Hrončok - 1:1.0.1-10 - Use pytest 4 diff --git a/sources b/sources index b3c2d48..196f21c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (html5lib-1.0.1.tar.gz) = 35939b4450893864da04e735ee5e0addacf1dd34bae6a6909c76572abf6bfded446a78a713dfde91c1485ba45867d7abeb6a45cf0545c16ea968707be7de5dd2 +SHA512 (html5lib-1.1.tar.gz) = af7c29591007fded99be6c38e3d0ae5a4ac32d71d26046a615918ae732cb1c1ecbf754f47ceca1a53726c3843f3ecea7af87a7362281b45ff3af495815818626 From 5b044c92c7359ce4302f3ec05f30184989d6880a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jul 2020 01:28:20 +0000 Subject: [PATCH 49/62] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-html5lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 049ac76..be371c8 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -2,7 +2,7 @@ Name: python-%{srcname} Summary: A python based HTML parser/tokenizer Version: 1.1 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 1 License: MIT URL: https://github.com/html5lib/html5lib-python @@ -64,6 +64,9 @@ specification for maximum compatibility with major desktop web browsers. %changelog +* Wed Jul 29 2020 Fedora Release Engineering - 1:1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Wed Jul 01 2020 Charalampos Stratakis - 1:1.1-1 - Update to 1.1 (#1849837) - Use pytest 5 From 98d1d099572d9fc04d586c716871f393c32d3cff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 10 Aug 2020 10:53:24 +0200 Subject: [PATCH 50/62] Fix compatibility with pytest 6 --- 506.patch | 163 +++++++++++++++++++++++++++++++++++++++++++ python-html5lib.spec | 8 ++- 2 files changed, 170 insertions(+), 1 deletion(-) create mode 100644 506.patch diff --git a/506.patch b/506.patch new file mode 100644 index 0000000..cdcd31f --- /dev/null +++ b/506.patch @@ -0,0 +1,163 @@ +From e6bd99e8f2497194ffd0a06c6954ebb28d7526bb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +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 + 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' diff --git a/python-html5lib.spec b/python-html5lib.spec index be371c8..bfa849c 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -2,12 +2,15 @@ Name: python-%{srcname} Summary: A python based HTML parser/tokenizer Version: 1.1 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 1 License: MIT URL: https://github.com/html5lib/html5lib-python Source0: %pypi_source +# Fix compatibility with pytest 6 +Patch1: %{url}/pull/506.patch + BuildArch: noarch %?python_enable_dependency_generator @@ -64,6 +67,9 @@ specification for maximum compatibility with major desktop web browsers. %changelog +* Mon Aug 10 2020 Miro Hrončok - 1:1.1-3 +- Fix compatibility with pytest 6 + * Wed Jul 29 2020 Fedora Release Engineering - 1:1.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 92e7903528e2d18b250772d8b73c09644c1dd09b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 27 Jan 2021 11:04:33 +0000 Subject: [PATCH 51/62] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-html5lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index bfa849c..05c180a 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -2,7 +2,7 @@ Name: python-%{srcname} Summary: A python based HTML parser/tokenizer Version: 1.1 -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 1 License: MIT URL: https://github.com/html5lib/html5lib-python @@ -67,6 +67,9 @@ specification for maximum compatibility with major desktop web browsers. %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 1:1.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Mon Aug 10 2020 Miro Hrončok - 1:1.1-3 - Fix compatibility with pytest 6 From a0487bdf59249e4a7ffe469410776c79770bcbd3 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Thu, 3 Jun 2021 13:13:03 +0200 Subject: [PATCH 52/62] Rebuilt for Python 3.10 --- python-html5lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 05c180a..4d812ea 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -2,7 +2,7 @@ Name: python-%{srcname} Summary: A python based HTML parser/tokenizer Version: 1.1 -Release: 4%{?dist} +Release: 5%{?dist} Epoch: 1 License: MIT URL: https://github.com/html5lib/html5lib-python @@ -67,6 +67,9 @@ specification for maximum compatibility with major desktop web browsers. %changelog +* Thu Jun 03 2021 Python Maint - 1:1.1-5 +- Rebuilt for Python 3.10 + * Wed Jan 27 2021 Fedora Release Engineering - 1:1.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From d39ec7f6824be4bed46527332923230fec509bae Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 06:46:05 +0000 Subject: [PATCH 53/62] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-html5lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 4d812ea..90c401c 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -2,7 +2,7 @@ Name: python-%{srcname} Summary: A python based HTML parser/tokenizer Version: 1.1 -Release: 5%{?dist} +Release: 6%{?dist} Epoch: 1 License: MIT URL: https://github.com/html5lib/html5lib-python @@ -67,6 +67,9 @@ specification for maximum compatibility with major desktop web browsers. %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 1:1.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Thu Jun 03 2021 Python Maint - 1:1.1-5 - Rebuilt for Python 3.10 From 23457b85f12efa5bf970d96edcd5764a5c1ebc9c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jan 2022 12:40:42 +0000 Subject: [PATCH 54/62] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-html5lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 90c401c..0f6e53f 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -2,7 +2,7 @@ Name: python-%{srcname} Summary: A python based HTML parser/tokenizer Version: 1.1 -Release: 6%{?dist} +Release: 7%{?dist} Epoch: 1 License: MIT URL: https://github.com/html5lib/html5lib-python @@ -67,6 +67,9 @@ specification for maximum compatibility with major desktop web browsers. %changelog +* Fri Jan 21 2022 Fedora Release Engineering - 1:1.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Fri Jul 23 2021 Fedora Release Engineering - 1:1.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 8443890e117b6ce245bad2040eed6ea8b9ea0d4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 31 Jan 2022 16:49:03 +0100 Subject: [PATCH 55/62] Use standard library unittest.mock instead of 3rd party mock --- python-html5lib.spec | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 0f6e53f..39edeac 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -2,7 +2,7 @@ Name: python-%{srcname} Summary: A python based HTML parser/tokenizer Version: 1.1 -Release: 7%{?dist} +Release: 8%{?dist} Epoch: 1 License: MIT URL: https://github.com/html5lib/html5lib-python @@ -26,7 +26,6 @@ BuildRequires: python3-devel BuildRequires: python3-setuptools # Test deps -BuildRequires: python3dist(mock) BuildRequires: python3dist(pytest) BuildRequires: python3dist(pytest-expect) BuildRequires: python3dist(six) @@ -47,6 +46,10 @@ specification for maximum compatibility with major desktop web browsers. %prep %autosetup -p1 -n %{srcname}-%{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 + %build %py3_build @@ -67,6 +70,9 @@ specification for maximum compatibility with major desktop web browsers. %changelog +* Mon Jan 31 2022 Miro Hrončok - 1:1.1-8 +- Use standard library unittest.mock instead of 3rd party mock + * Fri Jan 21 2022 Fedora Release Engineering - 1:1.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 65c6149f8839b8829f9b63a1dd079182965e6312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 31 Jan 2022 16:50:57 +0100 Subject: [PATCH 56/62] Remove redundant things --- python-html5lib.spec | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 39edeac..6704802 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -6,15 +6,13 @@ Release: 8%{?dist} Epoch: 1 License: MIT URL: https://github.com/html5lib/html5lib-python -Source0: %pypi_source +Source: %pypi_source # Fix compatibility with pytest 6 -Patch1: %{url}/pull/506.patch +Patch: %{url}/pull/506.patch BuildArch: noarch -%?python_enable_dependency_generator - %description A python based HTML parser/tokenizer based on the WHATWG HTML5 specification for maximum compatibility with major desktop web browsers. @@ -36,8 +34,6 @@ BuildRequires: python3dist(chardet) BuildRequires: python3dist(genshi) BuildRequires: python3dist(lxml) -%{?python_provide:%python_provide python3-%{srcname}} - %description -n python3-%{srcname} A python based HTML parser/tokenizer based on the WHATWG HTML5 specification for maximum compatibility with major desktop web browsers. From 52d4532f9a4419a2e7fd613df7447780e28ea8fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 31 Jan 2022 16:51:31 +0100 Subject: [PATCH 57/62] Expand %{srcname} for readability --- python-html5lib.spec | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 6704802..a5bb994 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -1,12 +1,11 @@ -%global srcname html5lib -Name: python-%{srcname} +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 +Source: %{pypi_source html5lib} # Fix compatibility with pytest 6 Patch: %{url}/pull/506.patch @@ -18,7 +17,7 @@ A python based HTML parser/tokenizer based on the WHATWG HTML5 specification for maximum compatibility with major desktop web browsers. -%package -n python3-%{srcname} +%package -n python3-html5lib Summary: %summary BuildRequires: python3-devel BuildRequires: python3-setuptools @@ -34,13 +33,13 @@ BuildRequires: python3dist(chardet) BuildRequires: python3dist(genshi) BuildRequires: python3dist(lxml) -%description -n python3-%{srcname} +%description -n python3-html5lib A python based HTML parser/tokenizer based on the WHATWG HTML5 specification for maximum compatibility with major desktop web browsers. %prep -%autosetup -p1 -n %{srcname}-%{version} +%autosetup -p1 -n html5lib-%{version} # Use standard library unittest.mock instead of 3rd party mock # From https://github.com/html5lib/html5lib-python/pull/536 @@ -58,11 +57,11 @@ sed -i 's/from mock import/from unittest.mock import/' html5lib/tests/test_meta. %pytest -%files -n python3-%{srcname} +%files -n python3-html5lib %license LICENSE %doc CHANGES.rst README.rst -%{python3_sitelib}/%{srcname}-*.egg-info/ -%{python3_sitelib}/%{srcname}/ +%{python3_sitelib}/html5lib-*.egg-info/ +%{python3_sitelib}/html5lib/ %changelog From 32b27391b3382f1682031dcd1b396c8bce21b745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 31 Jan 2022 16:53:43 +0100 Subject: [PATCH 58/62] Align everything --- python-html5lib.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index a5bb994..8ecbe96 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -19,8 +19,8 @@ specification for maximum compatibility with major desktop web browsers. %package -n python3-html5lib Summary: %summary -BuildRequires: python3-devel -BuildRequires: python3-setuptools +BuildRequires: python3-devel +BuildRequires: python3-setuptools # Test deps BuildRequires: python3dist(pytest) From b42ee23f7972edc3f3283404d2a5915bc633e23d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 31 Jan 2022 16:54:01 +0100 Subject: [PATCH 59/62] Use curly brackets around "value"-like macros --- python-html5lib.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 8ecbe96..a006a61 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -18,7 +18,7 @@ specification for maximum compatibility with major desktop web browsers. %package -n python3-html5lib -Summary: %summary +Summary: %{summary} BuildRequires: python3-devel BuildRequires: python3-setuptools From d19cca56ddaf6983d426bce892739818561b23a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 31 Jan 2022 17:01:03 +0100 Subject: [PATCH 60/62] Convert to pyproject-rpm-macros --- python-html5lib.spec | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index a006a61..b2c566d 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -12,6 +12,13 @@ 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. @@ -19,19 +26,6 @@ specification for maximum compatibility with major desktop web browsers. %package -n python3-html5lib Summary: %{summary} -BuildRequires: python3-devel -BuildRequires: python3-setuptools - -# Test deps -BuildRequires: python3dist(pytest) -BuildRequires: python3dist(pytest-expect) -BuildRequires: python3dist(six) -BuildRequires: python3dist(webencodings) - -# Optional test deps: -BuildRequires: python3dist(chardet) -BuildRequires: python3dist(genshi) -BuildRequires: python3dist(lxml) %description -n python3-html5lib A python based HTML parser/tokenizer based on the WHATWG HTML5 @@ -45,23 +39,25 @@ specification for maximum compatibility with major desktop web browsers. # 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 -%py3_build +%pyproject_wheel %install -%py3_install +%pyproject_install +%pyproject_save_files html5lib %check %pytest -%files -n python3-html5lib -%license LICENSE +%files -n python3-html5lib -f %{pyproject_files} %doc CHANGES.rst README.rst -%{python3_sitelib}/html5lib-*.egg-info/ -%{python3_sitelib}/html5lib/ %changelog From b4e68a3d3c604d0dbaf8f4fb3f971b9cced5baa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 31 Jan 2022 17:03:15 +0100 Subject: [PATCH 61/62] Add subpackages with Python extras: lxml genshi chardet all --- python-html5lib.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python-html5lib.spec b/python-html5lib.spec index b2c566d..0444527 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -31,6 +31,8 @@ Summary: %{summary} 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} @@ -63,6 +65,7 @@ sed -i 's/from mock import/from unittest.mock import/' html5lib/tests/test_meta. %changelog * Mon Jan 31 2022 Miro Hrončok - 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 - 1:1.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 78b9cb8f7ce894284335174e4f0b98c9c9514084 Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Mon, 30 Oct 2023 23:55:47 +0300 Subject: [PATCH 62/62] Remove unnecessary files --- sources | 1 - 1 file changed, 1 deletion(-) delete mode 100644 sources diff --git a/sources b/sources deleted file mode 100644 index 196f21c..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -SHA512 (html5lib-1.1.tar.gz) = af7c29591007fded99be6c38e3d0ae5a4ac32d71d26046a615918ae732cb1c1ecbf754f47ceca1a53726c3843f3ecea7af87a7362281b45ff3af495815818626