python-mock package is retired on branch c10s for BAKERY-412
This commit is contained in:
parent
84b364ea40
commit
31311a044c
7
.gitignore
vendored
7
.gitignore
vendored
@ -1,7 +0,0 @@
|
||||
/mock-0.7.2.tar.gz
|
||||
/mock-0.8.0.tar.gz
|
||||
/mock-1.0.1.tar.gz
|
||||
/mock-1.3.0.tar.gz
|
||||
/mock-2.0.0.tar.gz
|
||||
/mock-3.0.5.tar.gz
|
||||
/mock-4.0.3.tar.gz
|
||||
1
dead.package
Normal file
1
dead.package
Normal file
@ -0,0 +1 @@
|
||||
python-mock package is retired on branch c10s for BAKERY-412
|
||||
@ -1,73 +0,0 @@
|
||||
From f3e3d82aab0ede7e25273806dc0505574d85eae2 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Withers <chris@simplistix.co.uk>
|
||||
Date: Thu, 15 Apr 2021 08:27:25 +0100
|
||||
Subject: [PATCH] fix tests that should test mock but were testing
|
||||
unittest.mock
|
||||
|
||||
---
|
||||
mock/tests/testmock.py | 15 ++++++++-------
|
||||
1 file changed, 8 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/mock/tests/testmock.py b/mock/tests/testmock.py
|
||||
index 5702b6d..1a70909 100644
|
||||
--- a/mock/tests/testmock.py
|
||||
+++ b/mock/tests/testmock.py
|
||||
@@ -13,6 +13,7 @@
|
||||
create_autospec, mock
|
||||
)
|
||||
from mock.mock import _Call, _CallList
|
||||
+import mock.mock as mock_module
|
||||
|
||||
|
||||
class Iter(object):
|
||||
@@ -47,7 +48,7 @@ def test_all(self):
|
||||
# if __all__ is badly defined then import * will raise an error
|
||||
# We have to exec it because you can't import * inside a method
|
||||
# in Python 3
|
||||
- exec("from unittest.mock import *")
|
||||
+ exec("from mock.mock import *")
|
||||
|
||||
|
||||
def test_constructor(self):
|
||||
@@ -2137,16 +2138,16 @@ def test_isinstance_under_settrace(self):
|
||||
# test_patch_dict_test_prefix and test_patch_test_prefix not restoring
|
||||
# causes the objects patched to go out of sync
|
||||
|
||||
- old_patch = unittest.mock.patch
|
||||
+ old_patch = mock_module.patch
|
||||
|
||||
# Directly using __setattr__ on unittest.mock causes current imported
|
||||
# reference to be updated. Use a lambda so that during cleanup the
|
||||
# re-imported new reference is updated.
|
||||
- self.addCleanup(lambda patch: setattr(unittest.mock, 'patch', patch),
|
||||
+ self.addCleanup(lambda patch: setattr(mock_module, 'patch', patch),
|
||||
old_patch)
|
||||
|
||||
with patch.dict('sys.modules'):
|
||||
- del sys.modules['unittest.mock']
|
||||
+ del sys.modules['mock']
|
||||
|
||||
# This trace will stop coverage being measured ;-)
|
||||
def trace(frame, event, arg): # pragma: no cover
|
||||
@@ -2155,7 +2156,7 @@ def trace(frame, event, arg): # pragma: no cover
|
||||
self.addCleanup(sys.settrace, sys.gettrace())
|
||||
sys.settrace(trace)
|
||||
|
||||
- from unittest.mock import (
|
||||
+ from mock.mock import (
|
||||
Mock, MagicMock, NonCallableMock, NonCallableMagicMock
|
||||
)
|
||||
|
||||
@@ -2170,10 +2171,10 @@ def trace(frame, event, arg): # pragma: no cover
|
||||
def test_bool_not_called_when_passing_spec_arg(self):
|
||||
class Something:
|
||||
def __init__(self):
|
||||
- self.obj_with_bool_func = unittest.mock.MagicMock()
|
||||
+ self.obj_with_bool_func = mock_module.MagicMock()
|
||||
|
||||
obj = Something()
|
||||
- with unittest.mock.patch.object(obj, 'obj_with_bool_func', autospec=True): pass
|
||||
+ with mock_module.patch.object(obj, 'obj_with_bool_func', autospec=True): pass
|
||||
|
||||
self.assertEqual(obj.obj_with_bool_func.__bool__.call_count, 0)
|
||||
|
||||
255
python-mock.spec
255
python-mock.spec
@ -1,255 +0,0 @@
|
||||
%bcond_without tests
|
||||
|
||||
Name: python-mock
|
||||
Version: 4.0.3
|
||||
Release: 10%{?dist}
|
||||
Summary: Deprecated, use unittest.mock from the standard library instead
|
||||
|
||||
License: BSD-2-Clause
|
||||
URL: https://github.com/testing-cabal/mock
|
||||
Source0: %{url}/archive/%{version}/mock-%{version}.tar.gz
|
||||
|
||||
# Fix tests that should test mock but were testing unittest.mock
|
||||
# Merged upstream
|
||||
Patch1: %{url}/commit/f3e3d82aab.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python%{python3_pkgversion}-devel
|
||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
||||
%if %{with tests}
|
||||
BuildRequires: python%{python3_pkgversion}-pytest
|
||||
BuildRequires: python%{python3_pkgversion}-six
|
||||
%endif
|
||||
|
||||
|
||||
%description
|
||||
This is a deprecated package.
|
||||
|
||||
The mock module is now part of the Python standard library,
|
||||
available as unittest.mock in Python 3.3 onwards.
|
||||
|
||||
https://fedoraproject.org/wiki/Changes/DeprecatePythonMock
|
||||
|
||||
|
||||
%package -n python%{python3_pkgversion}-mock
|
||||
Summary: %{summary}
|
||||
|
||||
# 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
|
||||
This is a deprecated package.
|
||||
|
||||
The mock module is now part of the Python standard library,
|
||||
available as unittest.mock in Python 3.3 onwards.
|
||||
|
||||
https://fedoraproject.org/wiki/Changes/DeprecatePythonMock
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n mock-%{version}
|
||||
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
|
||||
|
||||
%if %{with tests}
|
||||
%check
|
||||
%pytest
|
||||
%endif
|
||||
|
||||
%install
|
||||
%py3_install
|
||||
|
||||
|
||||
%files -n python%{python3_pkgversion}-mock
|
||||
%license LICENSE.txt
|
||||
%doc README.rst
|
||||
%{python3_sitelib}/*.egg-info/
|
||||
%{python3_sitelib}/mock/
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.3-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Fri Jun 16 2023 Python Maint <python-maint@redhat.com> - 4.0.3-9
|
||||
- Rebuilt for Python 3.12
|
||||
|
||||
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 4.0.3-8
|
||||
- Bootstrap for Python 3.12
|
||||
|
||||
* Sun Mar 12 2023 Tim Orling <ticotimo@gmail.com> - 4.0.3-7
|
||||
- migrated to SDPX license
|
||||
|
||||
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.3-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.3-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 4.0.3-4
|
||||
- Rebuilt for Python 3.11
|
||||
|
||||
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 4.0.3-3
|
||||
- Bootstrap for Python 3.11
|
||||
|
||||
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Thu Jan 06 2022 Miro Hrončok <mhroncok@redhat.com> - 4.0.3-1
|
||||
- Update to 4.0.3 for Python 3.11 support
|
||||
- Fixes: rhbz#2019006
|
||||
|
||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.5-17
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 3.0.5-16
|
||||
- Rebuilt for Python 3.10
|
||||
|
||||
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 3.0.5-15
|
||||
- Bootstrap for Python 3.10
|
||||
|
||||
* 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
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Mon Dec 07 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0.5-12
|
||||
- BuildRequire six to fix a build failure
|
||||
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.5-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0.5-10
|
||||
- Rebuilt for Python 3.9
|
||||
|
||||
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0.5-9
|
||||
- Bootstrap for Python 3.9
|
||||
|
||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.5-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Thu Nov 28 2019 Miro Hrončok <mhroncok@redhat.com> - 3.0.5-7
|
||||
- Subpackage python2-mock has been removed
|
||||
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
|
||||
|
||||
* Fri Nov 01 2019 Petr Viktorin <pviktori@redhat.com> - 3.0.5-6
|
||||
- Remove unused dependencies on pbr
|
||||
The current version of Mock does not use pbr.
|
||||
|
||||
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 3.0.5-5
|
||||
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
||||
|
||||
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 3.0.5-4
|
||||
- Rebuilt for Python 3.8
|
||||
|
||||
* Wed Aug 14 2019 Miro Hrončok <mhroncok@redhat.com> - 3.0.5-3
|
||||
- Bootstrap for Python 3.8
|
||||
|
||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.5-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Mon Jul 08 2019 Yatin Karel <ykarel@redhat.com> - 3.0.5-1
|
||||
- Update to 3.0.5 (RHBZ#1721075)
|
||||
|
||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Fri Oct 26 2018 Petr Viktorin <pviktori@redhat.com> - 2.0.0-12
|
||||
- Run tests for Python 3
|
||||
|
||||
* Fri Aug 17 2018 Miro Hrončok <mhroncok@redhat.com> - 2.0.0-11
|
||||
- Don't require funcsigs on python3, it's part of the standard library
|
||||
|
||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Wed Jun 13 2018 Miro Hrončok <mhroncok@redhat.com> - 2.0.0-9
|
||||
- Rebuilt for Python 3.7
|
||||
|
||||
* Fri Mar 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.0.0-8
|
||||
- Update Python 2 dependency declarations to new packaging standards
|
||||
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
||||
|
||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Tue Oct 10 2017 Troy Dawson <tdawson@redhat.com> - 2.0.0-6
|
||||
- Cleanup spec file conditionals
|
||||
|
||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 2.0.0-3
|
||||
- Rebuild for Python 3.6
|
||||
|
||||
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-2
|
||||
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
||||
|
||||
* Tue Jun 14 2016 Praveen Kumar <kumarpraveen.nitdgp@gmail.com> - 2.0.0-1
|
||||
- Upstream 2.0.0 (RHBZ#1244145)
|
||||
|
||||
* Fri Feb 26 2016 Haïkel Guémar <hguemar@fedoraproject.org> - 1.3.0-1
|
||||
- Upstream 1.3.0 (RHBZ#1244145)
|
||||
- Use epel macros rather than rhel
|
||||
|
||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
* Wed Jan 6 2016 Orion Poplawski <orion@cora.nwra.com> - 1.0.1-9
|
||||
- Modernize spec
|
||||
- Run python2 tests, python3 failing
|
||||
|
||||
* Thu Nov 12 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
|
||||
|
||||
* Mon Nov 02 2015 Praveen Kumar <kumarpraveen.nitdgp@gmail.com> 1.0.1-7
|
||||
- Fix #1276771
|
||||
|
||||
* Wed Sep 23 2015 Robert Kuska <rkuska@redhat.com> - 1.0.1-6
|
||||
- Rebuilt for Python3.5 rebuild
|
||||
|
||||
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
* Fri May 09 2014 Dennis Gilmore <dennis@ausil.us> - 1.0.1-3
|
||||
- rebuild for python 3.4
|
||||
- disable test suite deps missing
|
||||
|
||||
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||
|
||||
* Thu Apr 11 2013 Luke Macken <lmacken@redhat.com> - 1.0.1-1
|
||||
- Update to 1.0.1
|
||||
- Run the test suite
|
||||
- Add python-unittest2 as a build requirement
|
||||
|
||||
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||
|
||||
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 0.8.0-4
|
||||
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
|
||||
|
||||
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
* Mon Jul 09 2012 Ralph Bean <rbean@redhat.com> - 0.8.0-2
|
||||
- Python3 support
|
||||
|
||||
* Thu Mar 22 2012 Praveen Kumar <kumarpraveen.nitdgp@gmail.com> - 0.8.0-1
|
||||
- Updated to new version
|
||||
|
||||
* Fri Jul 22 2011 Praveen Kumar <kumarpraveen.nitdgp@gmail.com> - 0.7.2-1
|
||||
- Initial RPM release
|
||||
Loading…
Reference in New Issue
Block a user