Sync from SUSE:SLFO:Main python-requests-mock revision d104508230912d49eff262d8ead7e347
This commit is contained in:
parent
8ca75bf653
commit
bdd1339737
@ -1,3 +1,51 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 8 06:40:50 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Use the %pyunittest macro to run tests (because of testtools)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Apr 6 12:15:42 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- update to 1.12.1:
|
||||||
|
* Set python_requires to >3 to prevent installation in python2
|
||||||
|
deployments.
|
||||||
|
- update to 1.12.0:
|
||||||
|
* Remove py2
|
||||||
|
* Allow `raw` parameter to accept callable like body elements
|
||||||
|
* Improve type definition of `Mocker.__call__`
|
||||||
|
* Drop PBR Support
|
||||||
|
* fix(mocker.pyi): fix Mocker class type hints
|
||||||
|
* Remove unused `six` dependency
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Mar 13 06:30:28 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Drop unneeded Requires, and also no longer restrict urllib3.
|
||||||
|
- Switch to pyproject macros.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jul 17 16:25:53 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- update to 1.11.0:
|
||||||
|
* Exposes some public type aliases (for type hinting only, they
|
||||||
|
can't be instanciated)
|
||||||
|
* for the types intended to be used by `requests_mock` users.
|
||||||
|
* The following types are now exposed:
|
||||||
|
* `requests_mock.Context` used in callbacks
|
||||||
|
* `requests_mock.Request` used in callbacks, which is a
|
||||||
|
`requests.PreparedRequest` proxy.
|
||||||
|
* `requests_mock.Callback[T]` which is the callbacks type.
|
||||||
|
* .. _requests-mock_1.11.0_Bug Fixes:
|
||||||
|
* Some typing inconsistencies have been fixed.
|
||||||
|
* Especially for `request` object in signatures which is in
|
||||||
|
fact a `requests_mock.Request` object.
|
||||||
|
* Fix incompatibility with urllib3 >2.0.0. In 2.0.0 they
|
||||||
|
default to enforcing content length checking on returned bodies
|
||||||
|
in responses from the previous default of false. However the flag
|
||||||
|
is still available so for compatibility we can just default
|
||||||
|
the other way.
|
||||||
|
- drop remove-mock.patch (upstream)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Apr 21 12:33:00 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
Fri Apr 21 12:33:00 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-requests-mock
|
# spec file for package python-requests-mock
|
||||||
#
|
#
|
||||||
# Copyright (c) 2023 SUSE LLC
|
# Copyright (c) 2024 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -16,23 +16,22 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-requests-mock
|
Name: python-requests-mock
|
||||||
Version: 1.10.0
|
Version: 1.12.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Module to mock out responses from the requests package
|
Summary: Module to mock out responses from the requests package
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
URL: https://github.com/jamielennox/requests-mock
|
URL: https://github.com/jamielennox/requests-mock
|
||||||
Source: https://files.pythonhosted.org/packages/source/r/requests-mock/requests-mock-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/r/requests-mock/requests-mock-%{version}.tar.gz
|
||||||
Patch0: remove-mock.patch
|
|
||||||
BuildRequires: %{python_module fixtures}
|
BuildRequires: %{python_module fixtures}
|
||||||
BuildRequires: %{python_module pbr}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module purl}
|
BuildRequires: %{python_module purl}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module requests >= 2.3}
|
BuildRequires: %{python_module requests >= 2.3}
|
||||||
BuildRequires: %{python_module requests-futures}
|
BuildRequires: %{python_module requests-futures}
|
||||||
BuildRequires: %{python_module six}
|
BuildRequires: %{python_module setuptools_scm}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
%if 0%{suse_version} >= 1550 || (0%{?suse_version} == 1500 && 0%{?sle_version} >= 154000)
|
%if 0%{suse_version} >= 1550 || (0%{?suse_version} == 1500 && 0%{?sle_version} >= 154000)
|
||||||
BuildRequires: %{python_module dbm}
|
BuildRequires: %{python_module dbm}
|
||||||
@ -41,11 +40,7 @@ BuildRequires: python3-dbm
|
|||||||
%endif
|
%endif
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
Requires: python-requests >= 2.3
|
Requires: python-requests >= 2.3
|
||||||
Requires: python-six
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%if "%python_flavor" != "python2"
|
|
||||||
Requires: python-dbm
|
|
||||||
%endif
|
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -56,18 +51,19 @@ You should checkout the docs for more information.
|
|||||||
%autosetup -p1 -n requests-mock-%{version}
|
%autosetup -p1 -n requests-mock-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%pytest tests
|
%pyunittest
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc AUTHORS README.rst ChangeLog
|
%doc README.rst
|
||||||
%{python_sitelib}/requests_mock*
|
%{python_sitelib}/requests_mock
|
||||||
|
%{python_sitelib}/requests_mock-%{version}.dist-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
Index: requests-mock-1.10.0/tests/test_mocker.py
|
|
||||||
===================================================================
|
|
||||||
--- requests-mock-1.10.0.orig/tests/test_mocker.py
|
|
||||||
+++ requests-mock-1.10.0/tests/test_mocker.py
|
|
||||||
@@ -13,7 +13,10 @@
|
|
||||||
import json
|
|
||||||
import pickle
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+try:
|
|
||||||
+ from unittest import mock
|
|
||||||
+except ImportError:
|
|
||||||
+ import mock
|
|
||||||
import requests
|
|
||||||
|
|
||||||
import requests_mock
|
|
BIN
requests-mock-1.10.0.tar.gz
(Stored with Git LFS)
BIN
requests-mock-1.10.0.tar.gz
(Stored with Git LFS)
Binary file not shown.
BIN
requests-mock-1.12.1.tar.gz
(Stored with Git LFS)
Normal file
BIN
requests-mock-1.12.1.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user