diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 5bdd807..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/unittest2-0.8.0.tar.gz -/unittest2-1.1.0.tar.gz diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..60e7ac4 --- /dev/null +++ b/dead.package @@ -0,0 +1,3 @@ +Retired: Use the unittest module from the Python standard library instead + +See https://bugzilla.redhat.com/show_bug.cgi?id=1794222 diff --git a/python-unittest2.spec b/python-unittest2.spec deleted file mode 100644 index 3579b6f..0000000 --- a/python-unittest2.spec +++ /dev/null @@ -1,181 +0,0 @@ -# Created by pyp2rpm-1.1.1 -%global pypi_name unittest2 -%global bootstrap_traceback2 0 - -Name: python-%{pypi_name} -Version: 1.1.0 -Release: 25%{?dist} -Summary: The new features in unittest backported to Python 2.4+ - -License: BSD -URL: http://pypi.python.org/pypi/unittest2 -Source0: https://pypi.python.org/packages/source/u/%{pypi_name}/%{pypi_name}-%{version}.tar.gz -# we don't need this in Fedora, since we have Python 2.7, which has argparse -Patch0: unittest2-1.1.0-remove-argparse-from-requires.patch -# we only apply this if bootstrap_traceback2 == 1 -Patch1: unittest2-1.1.0-remove-traceback2-from-requires.patch -# this patch backports tests from Python 3.5, that weren't yet merged, thus the tests are failing -# (the test is modified to also pass on Python < 3.5) -# TODO: submit upstream -Patch2: unittest2-1.1.0-backport-tests-from-py3.5.patch -Patch3: unittest2-1.1.0-fix-MutableMapping.patch -BuildArch: noarch - - -%description -unittest2 is a backport of the new features added to the unittest testing -framework in Python 2.7 and onwards. It is tested to run on Python 2.6, 2.7, -3.2, 3.3, 3.4 and pypy. - - -%package -n python3-%{pypi_name} -Summary: The new features in unittest backported to Python 2.4+ -%{?python_provide:%python_provide python3-%{pypi_name}} -Conflicts: python-%{pypi_name} < %{version}-%{release} -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-six -%if ! 0%{?bootstrap_traceback2} -BuildRequires: python3-traceback2 -%endif # bootstrap_traceback2 -Requires: python3-setuptools -Requires: python3-six -%if ! 0%{?bootstrap_traceback2} -Requires: python3-traceback2 -%endif - - -%description -n python3-%{pypi_name} -unittest2 is a backport of the new features added to the unittest testing -framework in Python 2.7 and onwards. It is tested to run on Python 2.6, 2.7, -3.2, 3.3, 3.4 and pypy. - - -%prep -%setup -q -n %{pypi_name}-%{version} -# Remove bundled egg-info -rm -rf %{pypi_name}.egg-info - -%patch0 -p0 -%patch2 -p0 -%if 0%{?bootstrap_traceback2} -%patch1 -p0 -%endif -%patch3 -p0 - - -%build -%py3_build - - -%install -%py3_install -pushd %{buildroot}%{_bindir} -mv unit2 unit2-%{python3_version} -ln -s unit2-%{python3_version} unit2-3 -ln -s unit2-3 unit2 -popd - - -%check -%if ! 0%{?bootstrap_traceback2} -%{__python3} -m unittest2 -%endif # bootstrap_traceback2 - - -%files -n python3-%{pypi_name} -%doc README.txt -%{_bindir}/unit2 -%{_bindir}/unit2-3 -%{_bindir}/unit2-%{python3_version} -%{python3_sitelib}/%{pypi_name} -%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info - - -%changelog -* Tue May 26 2020 Miro Hrončok - 1.1.0-25 -- Rebuilt for Python 3.9 - -* Thu Jan 30 2020 Fedora Release Engineering - 1.1.0-24 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Thu Jan 09 2020 Alfredo Moralejo - 1.1.0-23 -- Fix compatibility with python 3.9 - -* Thu Oct 03 2019 Miro Hrončok - 1.1.0-22 -- Subpackage python2-unittest2 has been removed - See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal - -* Wed Aug 14 2019 Miro Hrončok - 1.1.0-21 -- Rebuilt for Python 3.8 - -* Wed Aug 14 2019 Miro Hrončok - 1.1.0-19 -- Bootstrap for Python 3.8 - -* Fri Jul 26 2019 Fedora Release Engineering - 1.1.0-18 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Mon Jul 22 2019 Miro Hrončok - 1.1.0-17 -- Make /usr/bin/unit2 Python 3 - -* Sat Feb 02 2019 Fedora Release Engineering - 1.1.0-16 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Sat Jul 14 2018 Fedora Release Engineering - 1.1.0-15 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Wed Jun 13 2018 Miro Hrončok - 1.1.0-14 -- Rebuilt for Python 3.7 - -* Wed Jun 13 2018 Miro Hrončok - 1.1.0-13 -- Bootstrap for Python 3.7 - -* Fri Feb 09 2018 Fedora Release Engineering - 1.1.0-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Wed Jan 31 2018 Iryna Shcherbina - 1.1.0-11 -- Update Python 2 dependency declarations to new packaging standards - (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) - -* Thu Jul 27 2017 Fedora Release Engineering - 1.1.0-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Sat Feb 11 2017 Fedora Release Engineering - 1.1.0-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Mon Dec 12 2016 Charalampos Stratakis - 1.1.0-8 -- Disable bootstrap method - -* Fri Dec 09 2016 Charalampos Stratakis - 1.1.0-7 -- Rebuild for Python 3.6 - -* Tue Jul 19 2016 Fedora Release Engineering - 1.1.0-6 -- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages - -* Thu May 19 2016 Carl George - 1.1.0-5 -- Implement new Python packaging guidelines (python2 subpackage) - -* Thu Feb 04 2016 Fedora Release Engineering - 1.1.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Sun Nov 15 2015 Slavek Kabrda - 1.1.0-3 -- Fix tests on Python 3.5 - -* Sat Nov 14 2015 Toshio Kuratomi - - 1.1.0-2 -- traceback2 has been bootstrapped. Remove the bootstrapping conditional - -* Thu Nov 12 2015 bkabrda - 1.1.0-1 -- Update to 1.1.0 -- Bootstrap dependency on traceback2 - -* Tue Nov 10 2015 Fedora Release Engineering - 0.8.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 - -* Thu Jun 18 2015 Fedora Release Engineering - 0.8.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Fri Nov 14 2014 Slavek Kabrda - 0.8.0-2 -- Bump to avoid collision with previously blocked 0.8.0-1 - -* Mon Nov 10 2014 Slavek Kabrda - 0.8.0-1 -- Unretire the package, create a fresh specfile diff --git a/sources b/sources deleted file mode 100644 index 8f49f09..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -f72dae5d44f091df36b6b513305ea000 unittest2-1.1.0.tar.gz diff --git a/unittest2-1.1.0-backport-tests-from-py3.5.patch b/unittest2-1.1.0-backport-tests-from-py3.5.patch deleted file mode 100644 index 74da922..0000000 --- a/unittest2-1.1.0-backport-tests-from-py3.5.patch +++ /dev/null @@ -1,45 +0,0 @@ ---- unittest2/test/test_loader.py.orig 2015-11-15 09:26:43.752421511 +0100 -+++ unittest2/test/test_loader.py 2015-11-15 11:02:43.944233784 +0100 -@@ -512,10 +512,20 @@ - def test_loadTestsFromName__relative_malformed_name(self): - loader = unittest.TestLoader() - -+ # XXX Should this raise AttributeError or ValueError? - suite = loader.loadTestsFromName('abc () //', unittest) - error, test = self.check_deferred_error(loader, suite) -- self.check_module_lookup_error( -- error, test, 'unittest2', 'abc () //', 'abc \(\) //') -+ if sys.version_info[:2] < (3, 5): -+ expected = "'module' object has no attribute 'abc () //'" -+ expected_regex = "'module' object has no attribute 'abc \(\) //'" -+ else: -+ expected = "module 'unittest2' has no attribute 'abc () //'" -+ expected_regex = "module 'unittest2' has no attribute 'abc \(\) //'" -+ self.assertIn( -+ expected, error, -+ 'missing error string in %r' % error) -+ self.assertRaisesRegex( -+ AttributeError, expected_regex, getattr(test, 'abc () //')) - - # "The method optionally resolves name relative to the given module" - # -@@ -924,8 +934,17 @@ - # XXX Should this raise AttributeError or ValueError? - suite = loader.loadTestsFromNames(['abc () //'], unittest) - error, test = self.check_deferred_error(loader, list(suite)[0]) -- self.check_module_lookup_error( -- error, test, 'unittest2', 'abc () //', 'abc \(\) //') -+ if sys.version_info[:2] < (3, 5): -+ expected = "'module' object has no attribute 'abc () //'" -+ expected_regex = "'module' object has no attribute 'abc \(\) //'" -+ else: -+ expected = "module 'unittest2' has no attribute 'abc () //'" -+ expected_regex = "module 'unittest2' has no attribute 'abc \(\) //'" -+ self.assertIn( -+ expected, error, -+ 'missing error string in %r' % error) -+ self.assertRaisesRegex( -+ AttributeError, expected_regex, getattr(test, 'abc () //')) - - # "The method optionally resolves name relative to the given module" - # diff --git a/unittest2-1.1.0-fix-MutableMapping.patch b/unittest2-1.1.0-fix-MutableMapping.patch deleted file mode 100644 index 97ffc60..0000000 --- a/unittest2-1.1.0-fix-MutableMapping.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- unittest2/compatibility.py.orig 2020-01-09 15:15:21.502803247 +0100 -+++ unittest2/compatibility.py 2020-01-09 15:15:53.970890967 +0100 -@@ -1,3 +1,4 @@ -+import collections.abc as abc - import collections - import os - import sys -@@ -140,7 +141,7 @@ - ### ChainMap (helper for configparser and string.Template) - ######################################################################## - -+class ChainMap(abc.MutableMapping): --class ChainMap(collections.MutableMapping): - ''' A ChainMap groups multiple dicts (or other mappings) together - to create a single, updateable view. - diff --git a/unittest2-1.1.0-remove-argparse-from-requires.patch b/unittest2-1.1.0-remove-argparse-from-requires.patch deleted file mode 100644 index 295ce67..0000000 --- a/unittest2-1.1.0-remove-argparse-from-requires.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- setup.py.orig 2015-11-12 15:51:35.557779728 +0100 -+++ setup.py 2015-11-12 15:58:04.618948793 +0100 -@@ -57,7 +57,7 @@ - # Both install and setup requires - because we read VERSION from within the - # package, and the package also exports all the APIs. - # six for compat helpers --REQUIRES = ['argparse', 'six>=1.4', 'traceback2'], -+REQUIRES = ['six>=1.4', 'traceback2'], - - params = dict( - name=NAME, diff --git a/unittest2-1.1.0-remove-traceback2-from-requires.patch b/unittest2-1.1.0-remove-traceback2-from-requires.patch deleted file mode 100644 index 277befc..0000000 --- a/unittest2-1.1.0-remove-traceback2-from-requires.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- setup.py.orig 2015-11-12 16:19:17.850638394 +0100 -+++ setup.py 2015-11-12 16:19:33.605809230 +0100 -@@ -12,8 +12,7 @@ - - class late_version: - def __str__(self): -- from unittest2 import __version__ as VERSION -- return VERSION -+ return '1.1.0' - def __add__(self, other): - return str(self) + other - def replace(self, old, new): -@@ -57,7 +56,7 @@ - # Both install and setup requires - because we read VERSION from within the - # package, and the package also exports all the APIs. - # six for compat helpers --REQUIRES = ['six>=1.4', 'traceback2'], -+REQUIRES = ['six>=1.4'], - - params = dict( - name=NAME,