Compare commits

..

No commits in common. 'i10ce' and 'i9ce' have entirely different histories.
i10ce ... i9ce

@ -1,42 +0,0 @@
From 4e6cea5f5bb44bf06dd30a723cf13334693c3150 Mon Sep 17 00:00:00 2001
From: Christian Heimes <christian@python.org>
Date: Fri, 22 Sep 2023 14:01:50 +0200
Subject: [PATCH] Improve tests (partial)
- `makeSuite` is deprecated
diff --git a/tests.py b/tests.py
index ab52aab..c60335e 100644
--- a/tests.py
+++ b/tests.py
@@ -542,17 +559,19 @@ def test_defused_gzip_response(self):
def test_main():
suite = unittest.TestSuite()
- suite.addTests(unittest.makeSuite(TestDefusedcElementTree))
- suite.addTests(unittest.makeSuite(TestDefusedElementTree))
- suite.addTests(unittest.makeSuite(TestDefusedMinidom))
- suite.addTests(unittest.makeSuite(TestDefusedMinidomWithParser))
- suite.addTests(unittest.makeSuite(TestDefusedPulldom))
- suite.addTests(unittest.makeSuite(TestDefusedSax))
- suite.addTests(unittest.makeSuite(TestXmlRpc))
- if lxml is not None:
- suite.addTests(unittest.makeSuite(TestDefusedLxml))
- if gzip is not None:
- suite.addTests(unittest.makeSuite(TestDefusedGzip))
+ cls = [
+ TestDefusedElementTree,
+ TestDefusedcElementTree,
+ TestDefusedMinidom,
+ TestDefusedMinidomWithParser,
+ TestDefusedPulldom,
+ TestDefusedSax,
+ TestDefusedLxml,
+ TestXmlRpc,
+ TestDefusedGzip,
+ ]
+ for c in cls:
+ suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(c))
return suite

@ -1,115 +1,63 @@
## START: Set by rpmautospec
## (rpmautospec version 0.7.3)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 17;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec
Name: python-defusedxml
Version: 0.7.1
Release: %autorelease
%global pypi_name defusedxml
%global base_version 0.7.1
#global prerel ...
%global upstream_version %{base_version}%{?prerel}
Name: python-%{pypi_name}
Version: %{base_version}%{?prerel:~%{prerel}}
Release: 3%{?dist}
Summary: XML bomb protection for Python stdlib modules
License: PSF-2.0
License: Python
URL: https://github.com/tiran/defusedxml
Source: %{pypi_source defusedxml}
# Drop deprecated unittest.makeSuite()
# From https://github.com/tiran/defusedxml/commit/4e6cea5f5b
# (This no longer skips lxml tests when lxml is not installed.)
Patch: drop-makeSuite.patch
Source0: %{pypi_source %{pypi_name} %{upstream_version}}
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-lxml
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
%global _description %{expand:
%description
The defusedxml package contains several Python-only workarounds and fixes for
denial of service and other vulnerabilities in Python's XML libraries. In order
to benefit from the protection you just have to import and use the listed
functions / classes from the right defusedxml module instead of the original
module.}
module.
%description %_description
%package -n python3-defusedxml
%package -n python%{python3_pkgversion}-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
%description -n python3-defusedxml %_description
%description -n python%{python3_pkgversion}-%{pypi_name}
The defusedxml package contains several Python-only workarounds and fixes for
denial of service and other vulnerabilities in Python's XML libraries. In order
to benefit from the protection you just have to import and use the listed
functions / classes from the right defusedxml module instead of the original
module. This is the python%{python3_pkgversion} build.
%prep
%autosetup -p1 -n defusedxml-%{version}
%generate_buildrequires
%pyproject_buildrequires
%autosetup -p1 -n %{pypi_name}-%{upstream_version}
%build
%pyproject_wheel
%py3_build
%install
%pyproject_install
%pyproject_save_files -l defusedxml
%py3_install
%check
%{py3_test_envvars} %{python3} tests.py
%{python3} tests.py
%files -n python3-defusedxml -f %{pyproject_files}
%files -n python%{python3_pkgversion}-%{pypi_name}
%doc README.txt README.html CHANGES.txt
%license LICENSE
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-%{upstream_version}-py%{python3_version}.egg-info/
%changelog
* Wed Jan 01 2025 Arkady L. Shane <tigro@msvsphere-os.ru> - 0.7.1-17
- Rebuilt for MSVSphere 10
## START: Generated by rpmautospec
* Wed Oct 23 2024 Miro Hrončok <miro@hroncok.cz> - 0.7.1-17
- Simplify and modernize packaging
- Use SPDX identifier for License
* Wed Sep 04 2024 Miroslav Suchý <msuchy@redhat.com> - 0.7.1-16
- convert license to SPDX
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 0.7.1-14
- Rebuilt for Python 3.13
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Tue Oct 24 2023 Miro Hrončok <mhroncok@redhat.com> - 0.7.1-10
- Run lxml tests during build, avoid deprecated unittest.makeSuite()
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 0.7.1-8
- Rebuilt for Python 3.12
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.7.1-5
- Rebuilt for Python 3.11
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Mon Mar 25 2024 Arkady L. Shane <tigro@msvsphere-os.ru> - 0.7.1-3
- Rebuilt for MSVSphere 9.3
* Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-3
- Second attempt - Rebuilt for
@ -220,5 +168,3 @@ Summary: %{summary}
* Tue Mar 26 2013 Miro Hrončok <mhroncok@redhat.com> - 0.4-1
- Initial package.
## END: Generated by rpmautospec

Loading…
Cancel
Save