diff --git a/CacheControl-0.12.11.tar.gz b/CacheControl-0.12.11.tar.gz deleted file mode 100644 index ee9439b..0000000 --- a/CacheControl-0.12.11.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:06f9ad43ed6bb9ed23883fda838bacada949a00dc557e7f41aecbd19787efdcf -size 41338 diff --git a/cachecontrol-0.13.1.tar.gz b/cachecontrol-0.13.1.tar.gz new file mode 100644 index 0000000..d746439 --- /dev/null +++ b/cachecontrol-0.13.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d385996b1874b7a12b34bf4735bd1df6cec3abed83252e0fc7095c9bfb5f7e0a +size 43688 diff --git a/python-CacheControl.changes b/python-CacheControl.changes index 6892deb..4943782 100644 --- a/python-CacheControl.changes +++ b/python-CacheControl.changes @@ -1,3 +1,28 @@ +------------------------------------------------------------------- +Mon Jun 19 12:38:35 UTC 2023 - Torsten Gruner + +- Update to v0.13.1 + * Support for old serialization formats has been removed. + * Move the serialization implementation into own method. + * Drop support for Python older than 3.7. +- version 0.13.0 + * YANKED + * The project has been moved to the PSF organization. + * Discard the strict attribute when serializing and deserializing responses. + * Fix the IncompleteRead error thrown by urllib3 2.0. + * Remove usage of utcnow in favor of timezone-aware datetimes. + * Remove the compat module. + * Use Python's unittest.mock library instead of mock. + * Add type annotations. + * Exclude the tests directory from the wheel. +- version 0.12.14 + * Revert the change "switch lockfile to filelock" to fix the compatibility issue. +- version 0.12.13 + * Discard the strict attribute when serializing and deserializing responses. + * Fix the IncompleteRead error thrown by urllib3 2.0. + * Exclude the tests directory from the wheel. +- Remove request-fix.patch + ------------------------------------------------------------------- Tue May 30 07:53:24 UTC 2023 - Daniel Garcia diff --git a/python-CacheControl.spec b/python-CacheControl.spec index 5df6265..de1d2ab 100644 --- a/python-CacheControl.spec +++ b/python-CacheControl.spec @@ -18,35 +18,34 @@ %{?sle15_python_module_pythons} Name: python-CacheControl -Version: 0.12.11 +Version: 0.13.1 Release: 0 Summary: Caching library for Python requests License: Apache-2.0 Group: Development/Languages/Python -URL: https://github.com/ionrock/cachecontrol -Source: https://github.com/ionrock/cachecontrol/archive/v%{version}.tar.gz#/CacheControl-%{version}.tar.gz -# PATCH-FIX-UPSTREAM requests-fix.patch -- gh#ionrock/cachecontrol#301, gh#ionrock/cachecontrol#304 -Patch0: requests-fix.patch +URL: https://github.com/psf/cachecontrol +Source: https://github.com/psf/cachecontrol/archive/v%{version}.tar.gz#/cachecontrol-%{version}.tar.gz +BuildRequires: %{python_module flit-core >= 3.2} BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-msgpack >= 0.5.2 -Requires: python-requests +Requires: python-requests >= 2.16.0 Provides: python-cachecontrol = %{version}-%{release} Requires(post): update-alternatives Requires(postun):update-alternatives -Recommends: python-lockfile >= 0.9 +Recommends: python-filelock >= 3.8.0 Suggests: python-redis >= 2.10.5 BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module CherryPy} -BuildRequires: %{python_module lockfile >= 0.9} +BuildRequires: %{python_module filelock >= 3.8.0} BuildRequires: %{python_module msgpack >= 0.5.2} BuildRequires: %{python_module pytest} BuildRequires: %{python_module redis >= 2.10.5} -BuildRequires: %{python_module requests} +BuildRequires: %{python_module requests >= 2.16.0} # /SECTION %python_subpackages @@ -56,7 +55,6 @@ requests session object. %prep %autosetup -p1 -n cachecontrol-%{version} -sed -i -e 's/^from mock/from unittest.mock/' -e 's/^import mock/from unittest import mock/' tests/*.py %build %pyproject_wheel @@ -85,6 +83,6 @@ sed -i -e 's/^from mock/from unittest.mock/' -e 's/^import mock/from unittest im %doc README.rst %python_alternative %{_bindir}/doesitcache %{python_sitelib}/cachecontrol -%{python_sitelib}/CacheControl-%{version}*-info +%{python_sitelib}/cachecontrol-%{version}*-info %changelog diff --git a/requests-fix.patch b/requests-fix.patch deleted file mode 100644 index 4318d8e..0000000 --- a/requests-fix.patch +++ /dev/null @@ -1,94 +0,0 @@ -Index: cachecontrol-0.12.12/.github/workflows/tests.yml -=================================================================== ---- cachecontrol-0.12.12.orig/.github/workflows/tests.yml -+++ cachecontrol-0.12.12/.github/workflows/tests.yml -@@ -14,9 +14,15 @@ jobs: - runs-on: "${{ matrix.os }}" - - strategy: -+ fail-fast: false - matrix: -- python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] -- os: ["macos-10.15", "windows-latest", "ubuntu-latest"] -+ python-version: ["3.7", "3.8", "3.9", "3.10"] -+ os: ["macos-latest", "windows-latest", "ubuntu-latest"] -+ include: -+ - python-version: "3.6" -+ os: "ubuntu-20.04" -+ - python-version: "3.6" -+ os: "windows-latest" - - steps: - - uses: "actions/checkout@v2" -Index: cachecontrol-0.12.12/cachecontrol/serialize.py -=================================================================== ---- cachecontrol-0.12.12.orig/cachecontrol/serialize.py -+++ cachecontrol-0.12.12/cachecontrol/serialize.py -@@ -51,7 +51,6 @@ class Serializer(object): - u"status": response.status, - u"version": response.version, - u"reason": text_type(response.reason), -- u"strict": response.strict, - u"decode_content": response.decode_content, - } - } -@@ -138,6 +137,9 @@ class Serializer(object): - # TypeError: 'str' does not support the buffer interface - body = io.BytesIO(body_raw.encode("utf8")) - -+ # Discard any `strict` parameter serialized by older version of cachecontrol. -+ cached["response"].pop("strict", None) -+ - return HTTPResponse(body=body, preload_content=False, **cached["response"]) - - def _loads_v0(self, request, data, body_file=None): -Index: cachecontrol-0.12.12/tests/test_etag.py -=================================================================== ---- cachecontrol-0.12.12.orig/tests/test_etag.py -+++ cachecontrol-0.12.12/tests/test_etag.py -@@ -1,6 +1,8 @@ - # SPDX-FileCopyrightText: 2015 Eric Larson - # - # SPDX-License-Identifier: Apache-2.0 -+from contextlib import ExitStack -+from contextlib import suppress - - import pytest - -@@ -134,11 +136,20 @@ class TestReleaseConnection(object): - - resp = Mock(status=304, headers={}) - -- # This is how the urllib3 response is created in -- # requests.adapters -- response_mod = "requests.adapters.HTTPResponse.from_httplib" -+ # These are various ways the the urllib3 response can created -+ # in requests.adapters. Which one is actually used depends -+ # on which version if `requests` is in use, as well as perhaps -+ # other parameters. -+ response_mods = [ -+ "requests.adapters.HTTPResponse.from_httplib", -+ "urllib3.HTTPConnectionPool.urlopen", -+ ] -+ -+ with ExitStack() as stack: -+ for mod in response_mods: -+ with suppress(ImportError, AttributeError): -+ stack.enter_context(patch(mod, Mock(return_value=resp))) - -- with patch(response_mod, Mock(return_value=resp)): - sess.get(etag_url) - assert resp.read.called - assert resp.release_conn.called -Index: cachecontrol-0.12.12/tests/test_vary.py -=================================================================== ---- cachecontrol-0.12.12.orig/tests/test_vary.py -+++ cachecontrol-0.12.12/tests/test_vary.py -@@ -33,7 +33,6 @@ class TestVary(object): - cached.status == resp.raw.status, - cached.version == resp.raw.version, - cached.reason == resp.raw.reason, -- cached.strict == resp.raw.strict, - cached.decode_content == resp.raw.decode_content, - ] -