From 2b65f10372ae923f642dfd199454488a553dfa4bd62d6ccfeeaf99494759381c Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 17 Jul 2023 16:29:08 +0000 Subject: [PATCH 1/2] - 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) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests-mock?expand=0&rev=55 --- python-requests-mock.changes | 23 +++++++++++++++++++++++ python-requests-mock.spec | 6 +----- remove-mock.patch | 16 ---------------- requests-mock-1.10.0.tar.gz | 3 --- requests-mock-1.11.0.tar.gz | 3 +++ 5 files changed, 27 insertions(+), 24 deletions(-) delete mode 100644 remove-mock.patch delete mode 100644 requests-mock-1.10.0.tar.gz create mode 100644 requests-mock-1.11.0.tar.gz diff --git a/python-requests-mock.changes b/python-requests-mock.changes index 5f43eaa..166def4 100644 --- a/python-requests-mock.changes +++ b/python-requests-mock.changes @@ -1,3 +1,26 @@ +------------------------------------------------------------------- +Mon Jul 17 16:25:53 UTC 2023 - Dirk Müller + +- 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 diff --git a/python-requests-mock.spec b/python-requests-mock.spec index 08133a8..3514394 100644 --- a/python-requests-mock.spec +++ b/python-requests-mock.spec @@ -16,16 +16,14 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} %{?sle15_python_module_pythons} Name: python-requests-mock -Version: 1.10.0 +Version: 1.11.0 Release: 0 Summary: Module to mock out responses from the requests package License: Apache-2.0 URL: https://github.com/jamielennox/requests-mock 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 pbr} BuildRequires: %{python_module purl} @@ -43,9 +41,7 @@ BuildRequires: fdupes Requires: python-requests >= 2.3 Requires: python-six BuildArch: noarch -%if "%python_flavor" != "python2" Requires: python-dbm -%endif %python_subpackages %description diff --git a/remove-mock.patch b/remove-mock.patch deleted file mode 100644 index 6fb53f8..0000000 --- a/remove-mock.patch +++ /dev/null @@ -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 diff --git a/requests-mock-1.10.0.tar.gz b/requests-mock-1.10.0.tar.gz deleted file mode 100644 index 453159a..0000000 --- a/requests-mock-1.10.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:59c9c32419a9fb1ae83ec242d98e889c45bd7d7a65d48375cc243ec08441658b -size 72627 diff --git a/requests-mock-1.11.0.tar.gz b/requests-mock-1.11.0.tar.gz new file mode 100644 index 0000000..7d2bfac --- /dev/null +++ b/requests-mock-1.11.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef10b572b489a5f28e09b708697208c4a3b2b89ef80a9f01584340ea357ec3c4 +size 74377 From e52ac64447990a6b273fb1c7ce33c5b1fe238e5c9496b1ad54648bd802106614 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 17 Jul 2023 21:10:18 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests-mock?expand=0&rev=56 --- python-requests-mock.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/python-requests-mock.spec b/python-requests-mock.spec index 3514394..ee2d8fb 100644 --- a/python-requests-mock.spec +++ b/python-requests-mock.spec @@ -40,6 +40,7 @@ BuildRequires: python3-dbm BuildRequires: fdupes Requires: python-requests >= 2.3 Requires: python-six +Requires: python-urllib3 < 2 BuildArch: noarch Requires: python-dbm %python_subpackages