Deprecate python3-mock

https://fedoraproject.org/wiki/Changes/DeprecatePythonMock

Cleanup the specfile a bit while doing it.
This commit is contained in:
Miro Hrončok 2021-02-02 16:27:32 +01:00
parent fa49ee92e2
commit accbc84b46

View File

@ -1,19 +1,13 @@
# keeping python3 subpackage as stdlib mock lives in a different namespace
# Some people may have not fixed their imports
# When bootstrapping Python 3, mock is built before pytest
%bcond_without tests %bcond_without tests
%global mod_name mock
Name: python-mock Name: python-mock
Version: 3.0.5 Version: 3.0.5
Release: 13%{?dist} Release: 14%{?dist}
Summary: A Python Mocking and Patching Library for Testing Summary: Deprecated, use unittest.mock from the standard library instead
License: BSD License: BSD
URL: http://www.voidspace.org.uk/python/%{mod_name}/ URL: http://www.voidspace.org.uk/python/mock/
Source0: https://pypi.python.org/packages/source/m/%{mod_name}/%{mod_name}-%{version}.tar.gz Source0: %{pypi_source mock}
BuildArch: noarch BuildArch: noarch
@ -26,31 +20,36 @@ BuildRequires: python%{python3_pkgversion}-six
%description %description
Mock is a Python module that provides a core mock class. It removes the need This is a deprecated package.
to create a host of stubs throughout your test suite. After performing an
action, you can make assertions about which methods / attributes were used and The mock module is now part of the Python standard library,
arguments they were called with. You can also specify return values and set available as unittest.mock in Python 3.3 onwards.
needed attributes in the normal way.
https://fedoraproject.org/wiki/Changes/DeprecatePythonMock
%package -n python%{python3_pkgversion}-mock %package -n python%{python3_pkgversion}-mock
Summary: A Python Mocking and Patching Library for Testing Summary: %{summary}
%{?python_provide:%python_provide python%{python3_pkgversion}-%{mod_name}}
Requires: python3-six >= 1.9.0 # This package is deprecated, no new packages in Fedora can depend on it
# https://fedoraproject.org/wiki/Changes/DeprecatePythonMock
Provides: deprecated()
%description -n python%{python3_pkgversion}-mock %description -n python%{python3_pkgversion}-mock
Mock is a Python module that provides a core mock class. It removes the need This is a deprecated package.
to create a host of stubs throughout your test suite. After performing an
action, you can make assertions about which methods / attributes were used and The mock module is now part of the Python standard library,
arguments they were called with. You can also specify return values and set available as unittest.mock in Python 3.3 onwards.
needed attributes in the normal way.
https://fedoraproject.org/wiki/Changes/DeprecatePythonMock
%prep %prep
%setup -q -n %{mod_name}-%{version} %autosetup -p1 -n mock-%{version}
%build %build
%{py3_build} %py3_build
%if %{with tests} %if %{with tests}
@ -59,17 +58,21 @@ needed attributes in the normal way.
%endif %endif
%install %install
%{py3_install} %py3_install
%files -n python%{python3_pkgversion}-mock %files -n python%{python3_pkgversion}-mock
%license LICENSE.txt %license LICENSE.txt
%doc README.rst %doc README.rst
%{python3_sitelib}/*.egg-info/ %{python3_sitelib}/*.egg-info/
%{python3_sitelib}/%{mod_name} %{python3_sitelib}/mock/
%changelog %changelog
* Tue Feb 02 2021 Miro Hrončok <mhroncok@redhat.com> - 3.0.5-14
- Deprecate python3-mock
- https://fedoraproject.org/wiki/Changes/DeprecatePythonMock
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.5-13 * Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.5-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild