Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ddabfa7d05 | ||
|
|
20d5027035 | ||
|
|
58bc1fca8e | ||
|
|
4ec55d2b7e | ||
|
|
8c0e2273ce | ||
|
|
e08196ae7d | ||
|
|
54c5881c0d | ||
|
|
b4bad83596 |
42
drop-makeSuite.patch
Normal file
42
drop-makeSuite.patch
Normal file
@@ -0,0 +1,42 @@
|
||||
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
|
||||
|
||||
|
||||
@@ -4,16 +4,22 @@
|
||||
%global upstream_version %{base_version}%{?prerel}
|
||||
Name: python-%{pypi_name}
|
||||
Version: %{base_version}%{?prerel:~%{prerel}}
|
||||
Release: 4%{?dist}
|
||||
Release: 12%{?dist}
|
||||
Summary: XML bomb protection for Python stdlib modules
|
||||
License: Python
|
||||
URL: https://github.com/tiran/defusedxml
|
||||
Source0: %{pypi_source %{pypi_name} %{upstream_version}}
|
||||
|
||||
# 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
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python%{python3_pkgversion}-devel
|
||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
||||
BuildRequires: python%{python3_pkgversion}-lxml
|
||||
|
||||
%description
|
||||
The defusedxml package contains several Python-only workarounds and fixes for
|
||||
@@ -56,6 +62,30 @@ module. This is the python%{python3_pkgversion} build.
|
||||
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user