Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-CacheControl for 
openSUSE:Factory checked in at 2024-02-04 19:09:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-CacheControl (Old)
 and      /work/SRC/openSUSE:Factory/.python-CacheControl.new.1815 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-CacheControl"

Sun Feb  4 19:09:09 2024 rev:15 rq:1143810 version:0.14.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-CacheControl/python-CacheControl.changes  
2024-01-03 12:30:56.960543118 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-CacheControl.new.1815/python-CacheControl.changes
        2024-02-04 19:11:26.557454063 +0100
@@ -1,0 +2,11 @@
+Sat Feb  3 13:34:32 UTC 2024 - Dirk Müller <dmuel...@suse.com>
+
+- update to 0.14.0:
+  * Explicitly allow pathlib.Path as a type for
+    FileCache.directory.
+  * Drop support for Python 3.7. Python 3.8 is now the minimum
+    version.
+  * Don't use the cache to return a full response if a request
+    has a Range header.
+
+-------------------------------------------------------------------

Old:
----
  cachecontrol-0.13.1.tar.gz

New:
----
  cachecontrol-0.14.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-CacheControl.spec ++++++
--- /var/tmp/diff_new_pack.Ws0udK/_old  2024-02-04 19:11:27.049471794 +0100
+++ /var/tmp/diff_new_pack.Ws0udK/_new  2024-02-04 19:11:27.049471794 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-CacheControl
 #
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-CacheControl
-Version:        0.13.1
+Version:        0.14.0
 Release:        0
 Summary:        Caching library for Python requests
 License:        Apache-2.0
@@ -35,7 +35,7 @@
 Requires:       python-requests >= 2.16.0
 Provides:       python-cachecontrol = %{version}-%{release}
 Requires(post): update-alternatives
-Requires(postun):update-alternatives
+Requires(postun): update-alternatives
 Recommends:     python-filelock >= 3.8.0
 BuildArch:      noarch
 # SECTION test requirements

++++++ cachecontrol-0.13.1.tar.gz -> cachecontrol-0.14.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cachecontrol-0.13.1/.bumpversion.cfg 
new/cachecontrol-0.14.0/.bumpversion.cfg
--- old/cachecontrol-0.13.1/.bumpversion.cfg    2023-06-08 07:26:31.000000000 
+0200
+++ new/cachecontrol-0.14.0/.bumpversion.cfg    1970-01-01 01:00:00.000000000 
+0100
@@ -1,5 +0,0 @@
-[bumpversion]
-current_version = 0.13.0
-files = cachecontrol/__init__.py docs/conf.py
-commit = True
-tag = True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cachecontrol-0.13.1/.github/workflows/release.yml 
new/cachecontrol-0.14.0/.github/workflows/release.yml
--- old/cachecontrol-0.13.1/.github/workflows/release.yml       2023-06-08 
07:26:31.000000000 +0200
+++ new/cachecontrol-0.14.0/.github/workflows/release.yml       2024-02-02 
03:50:04.000000000 +0100
@@ -19,11 +19,11 @@
       contents: write
 
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
 
     - uses: actions/setup-python@v4
       with:
-        python-version: ">= 3.6"
+        python-version: "3.x"
 
     - name: deps
       run: python -m pip install -U build
@@ -35,7 +35,7 @@
       uses: pypa/gh-action-pypi-publish@release/v1
 
     - name: sign
-      uses: sigstore/gh-action-sigstore-python@v1.2.3
+      uses: sigstore/gh-action-sigstore-python@v2.0.1
       with:
         inputs: ./dist/*.tar.gz ./dist/*.whl
         release-signing-artifacts: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cachecontrol-0.13.1/.github/workflows/tests.yml 
new/cachecontrol-0.14.0/.github/workflows/tests.yml
--- old/cachecontrol-0.13.1/.github/workflows/tests.yml 2023-06-08 
07:26:31.000000000 +0200
+++ new/cachecontrol-0.14.0/.github/workflows/tests.yml 2024-02-02 
03:50:04.000000000 +0100
@@ -16,14 +16,15 @@
     strategy:
       fail-fast: false
       matrix:
-        python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
+        python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
         os: ["macos-latest", "windows-latest", "ubuntu-latest"]
 
     steps:
-      - uses: "actions/checkout@v3"
+      - uses: "actions/checkout@v4"
       - uses: "actions/setup-python@v4"
         with:
           python-version: "${{ matrix.python-version }}"
+          allow-prereleases: true
       - name: "Install dependencies"
         run: |
           python -VV
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cachecontrol-0.13.1/Makefile 
new/cachecontrol-0.14.0/Makefile
--- old/cachecontrol-0.13.1/Makefile    2023-06-08 07:26:31.000000000 +0200
+++ new/cachecontrol-0.14.0/Makefile    2024-02-02 03:50:04.000000000 +0100
@@ -5,16 +5,12 @@
 VENV=.venv
 VENV_CMD=python3 -m venv
 ACTIVATE = $(VENV)/bin/activate
-CHEESE=https://pypi.python.org/pypi
-BUMPTYPE=patch
-BUMPPRE=0
 
-
-$(VENV)/bin/pip3:
+$(VENV)/bin/pip:
        $(VENV_CMD) $(VENV)
 
-bootstrap: $(VENV)/bin/pip3
-       $(VENV)/bin/pip3 install -e .[dev]
+bootstrap: $(VENV)/bin/pip
+       $(VENV)/bin/pip install -e .[dev]
 
 format:
        $(VENV)/bin/black .
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cachecontrol-0.13.1/README.rst 
new/cachecontrol-0.14.0/README.rst
--- old/cachecontrol-0.13.1/README.rst  2023-06-08 07:26:31.000000000 +0200
+++ new/cachecontrol-0.14.0/README.rst  2024-02-02 03:50:04.000000000 +0100
@@ -35,7 +35,7 @@
   sess = requests.session()
   cached_sess = CacheControl(sess)
 
-  response = cached_sess.get('http://google.com')
+  response = cached_sess.get('https://google.com')
 
 If the URL contains any caching based headers, it will cache the
 result in a simple dictionary.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cachecontrol-0.13.1/cachecontrol/__init__.py 
new/cachecontrol-0.14.0/cachecontrol/__init__.py
--- old/cachecontrol-0.13.1/cachecontrol/__init__.py    2023-06-08 
07:26:31.000000000 +0200
+++ new/cachecontrol-0.14.0/cachecontrol/__init__.py    2024-02-02 
03:50:04.000000000 +0100
@@ -8,7 +8,7 @@
 """
 __author__ = "Eric Larson"
 __email__ = "e...@ionrock.org"
-__version__ = "0.13.1"
+__version__ = "0.14.0"
 
 from cachecontrol.adapter import CacheControlAdapter
 from cachecontrol.controller import CacheController
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cachecontrol-0.13.1/cachecontrol/adapter.py 
new/cachecontrol-0.14.0/cachecontrol/adapter.py
--- old/cachecontrol-0.13.1/cachecontrol/adapter.py     2023-06-08 
07:26:31.000000000 +0200
+++ new/cachecontrol-0.14.0/cachecontrol/adapter.py     2024-02-02 
03:50:04.000000000 +0100
@@ -125,21 +125,21 @@
             else:
                 # Wrap the response file with a wrapper that will cache the
                 #   response when the stream has been consumed.
-                response._fp = CallbackFileWrapper(  # type: 
ignore[attr-defined]
-                    response._fp,  # type: ignore[attr-defined]
+                response._fp = CallbackFileWrapper(  # type: ignore[assignment]
+                    response._fp,  # type: ignore[arg-type]
                     functools.partial(
                         self.controller.cache_response, request, response
                     ),
                 )
                 if response.chunked:
-                    super_update_chunk_length = response._update_chunk_length  
# type: ignore[attr-defined]
+                    super_update_chunk_length = response._update_chunk_length
 
                     def _update_chunk_length(self: HTTPResponse) -> None:
                         super_update_chunk_length()
                         if self.chunk_left == 0:
-                            self._fp._close()  # type: ignore[attr-defined]
+                            self._fp._close()  # type: ignore[union-attr]
 
-                    response._update_chunk_length = types.MethodType(  # type: 
ignore[attr-defined]
+                    response._update_chunk_length = types.MethodType(  # type: 
ignore[method-assign]
                         _update_chunk_length, response
                     )
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cachecontrol-0.13.1/cachecontrol/caches/file_cache.py 
new/cachecontrol-0.14.0/cachecontrol/caches/file_cache.py
--- old/cachecontrol-0.13.1/cachecontrol/caches/file_cache.py   2023-06-08 
07:26:31.000000000 +0200
+++ new/cachecontrol-0.14.0/cachecontrol/caches/file_cache.py   2024-02-02 
03:50:04.000000000 +0100
@@ -6,7 +6,8 @@
 import hashlib
 import os
 from textwrap import dedent
-from typing import IO, TYPE_CHECKING
+from typing import IO, TYPE_CHECKING, Union
+from pathlib import Path
 
 from cachecontrol.cache import BaseCache, SeparateBodyBaseCache
 from cachecontrol.controller import CacheController
@@ -63,7 +64,7 @@
 
     def __init__(
         self,
-        directory: str,
+        directory: str | Path,
         forever: bool = False,
         filemode: int = 0o0600,
         dirmode: int = 0o0700,
@@ -79,7 +80,7 @@
                 """
             NOTE: In order to use the FileCache you must have
             filelock installed. You can install it via pip:
-              pip install filelock
+              pip install cachecontrol[filecache]
             """
             )
             raise ImportError(notice)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cachecontrol-0.13.1/cachecontrol/controller.py 
new/cachecontrol-0.14.0/cachecontrol/controller.py
--- old/cachecontrol-0.13.1/cachecontrol/controller.py  2023-06-08 
07:26:31.000000000 +0200
+++ new/cachecontrol-0.14.0/cachecontrol/controller.py  2024-02-02 
03:50:04.000000000 +0100
@@ -142,6 +142,11 @@
         """
         Load a cached response, or return None if it's not available.
         """
+        # We do not support caching of partial content: so if the request 
contains a
+        # Range header then we don't want to load anything from the cache.
+        if "Range" in request.headers:
+            return None
+
         cache_url = request.url
         assert cache_url is not None
         cache_data = self.cache.get(cache_url)
@@ -480,7 +485,7 @@
         cached_response.headers.update(
             {
                 k: v
-                for k, v in response.headers.items()  # type: 
ignore[no-untyped-call]
+                for k, v in response.headers.items()
                 if k.lower() not in excluded_headers
             }
         )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cachecontrol-0.13.1/cachecontrol/heuristics.py 
new/cachecontrol-0.14.0/cachecontrol/heuristics.py
--- old/cachecontrol-0.13.1/cachecontrol/heuristics.py  2023-06-08 
07:26:31.000000000 +0200
+++ new/cachecontrol-0.14.0/cachecontrol/heuristics.py  2024-02-02 
03:50:04.000000000 +0100
@@ -68,7 +68,7 @@
 
         if "expires" not in response.headers:
             date = parsedate(response.headers["date"])
-            expires = expire_after(timedelta(days=1), date=datetime(*date[:6], 
tzinfo=timezone.utc))  # type: ignore[misc]
+            expires = expire_after(timedelta(days=1), date=datetime(*date[:6], 
tzinfo=timezone.utc))  # type: ignore[index,misc]
             headers["expires"] = datetime_to_header(expires)
             headers["cache-control"] = "public"
         return headers
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cachecontrol-0.13.1/cachecontrol/serialize.py 
new/cachecontrol-0.14.0/cachecontrol/serialize.py
--- old/cachecontrol-0.13.1/cachecontrol/serialize.py   2023-06-08 
07:26:31.000000000 +0200
+++ new/cachecontrol-0.14.0/cachecontrol/serialize.py   2024-02-02 
03:50:04.000000000 +0100
@@ -32,13 +32,13 @@
             # also update the response with a new file handler to be
             # sure it acts as though it was never read.
             body = response.read(decode_content=False)
-            response._fp = io.BytesIO(body)  # type: ignore[attr-defined]
+            response._fp = io.BytesIO(body)  # type: ignore[assignment]
             response.length_remaining = len(body)
 
         data = {
             "response": {
                 "body": body,  # Empty bytestring if body is stored separately
-                "headers": {str(k): str(v) for k, v in 
response.headers.items()},  # type: ignore[no-untyped-call]
+                "headers": {str(k): str(v) for k, v in 
response.headers.items()},
                 "status": response.status,
                 "version": response.version,
                 "reason": str(response.reason),
@@ -72,31 +72,14 @@
         if not data:
             return None
 
-        # Determine what version of the serializer the data was serialized
-        # with
-        try:
-            ver, data = data.split(b",", 1)
-        except ValueError:
-            ver = b"cc=0"
-
-        # Make sure that our "ver" is actually a version and isn't a false
-        # positive from a , being in the data stream.
-        if ver[:3] != b"cc=":
-            data = ver + data
-            ver = b"cc=0"
-
-        # Get the version number out of the cc=N
-        verstr = ver.split(b"=", 1)[-1].decode("ascii")
-
-        # Dispatch to the actual load method for the given version
-        try:
-            return getattr(self, f"_loads_v{verstr}")(request, data, 
body_file)  # type: ignore[no-any-return]
-
-        except AttributeError:
-            # This is a version we don't have a loads function for, so we'll
-            # just treat it as a miss and return None
+        # Previous versions of this library supported other serialization
+        # formats, but these have all been removed.
+        if not data.startswith(f"cc={self.serde_version},".encode()):
             return None
 
+        data = data[5:]
+        return self._loads_v4(request, data, body_file)
+
     def prepare_response(
         self,
         request: PreparedRequest,
@@ -149,49 +132,6 @@
 
         return HTTPResponse(body=body, preload_content=False, 
**cached["response"])
 
-    def _loads_v0(
-        self,
-        request: PreparedRequest,
-        data: bytes,
-        body_file: IO[bytes] | None = None,
-    ) -> None:
-        # The original legacy cache data. This doesn't contain enough
-        # information to construct everything we need, so we'll treat this as
-        # a miss.
-        return None
-
-    def _loads_v1(
-        self,
-        request: PreparedRequest,
-        data: bytes,
-        body_file: IO[bytes] | None = None,
-    ) -> HTTPResponse | None:
-        # The "v1" pickled cache format. This is no longer supported
-        # for security reasons, so we treat it as a miss.
-        return None
-
-    def _loads_v2(
-        self,
-        request: PreparedRequest,
-        data: bytes,
-        body_file: IO[bytes] | None = None,
-    ) -> HTTPResponse | None:
-        # The "v2" compressed base64 cache format.
-        # This has been removed due to age and poor size/performance
-        # characteristics, so we treat it as a miss.
-        return None
-
-    def _loads_v3(
-        self,
-        request: PreparedRequest,
-        data: bytes,
-        body_file: IO[bytes] | None = None,
-    ) -> None:
-        # Due to Python 2 encoding issues, it's impossible to know for sure
-        # exactly how to load v3 entries, thus we'll treat these as a miss so
-        # that they get rewritten out as v4 entries.
-        return None
-
     def _loads_v4(
         self,
         request: PreparedRequest,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cachecontrol-0.13.1/docs/conf.py 
new/cachecontrol-0.14.0/docs/conf.py
--- old/cachecontrol-0.13.1/docs/conf.py        2023-06-08 07:26:31.000000000 
+0200
+++ new/cachecontrol-0.14.0/docs/conf.py        2024-02-02 03:50:04.000000000 
+0100
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
 # SPDX-FileCopyrightText: 2015 Eric Larson
 #
 # SPDX-License-Identifier: Apache-2.0
@@ -30,7 +28,12 @@
 
 # Add any Sphinx extension module names here, as strings. They can be 
extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ["sphinx.ext.autodoc", "sphinx.ext.todo", "sphinx.ext.viewcode"]
+extensions = [
+    "sphinx.ext.autodoc",
+    "sphinx.ext.todo",
+    "sphinx.ext.viewcode",
+    "sphinx_copybutton",
+]
 
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ["_templates"]
@@ -86,7 +89,7 @@
 # show_authors = False
 
 # The name of the Pygments (syntax highlighting) style to use.
-pygments_style = "sphinx"
+# pygments_style = "sphinx"
 
 # A list of ignored prefixes for module index sorting.
 # modindex_common_prefix = []
@@ -96,7 +99,7 @@
 
 # The theme to use for HTML and HTML Help pages.  See the documentation for
 # a list of builtin themes.
-html_theme = "default"
+html_theme = "furo"
 
 # Theme options are theme-specific and customize the look and feel of a theme
 # further.  For a list of options available for each theme, see the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cachecontrol-0.13.1/docs/index.rst 
new/cachecontrol-0.14.0/docs/index.rst
--- old/cachecontrol-0.13.1/docs/index.rst      2023-06-08 07:26:31.000000000 
+0200
+++ new/cachecontrol-0.14.0/docs/index.rst      2024-02-02 03:50:04.000000000 
+0100
@@ -73,13 +73,13 @@
 
 
 .. _httplib2: https://github.com/httplib2/httplib2
-.. _requests: http://docs.python-requests.org/
-.. _Editing the Web: http://www.w3.org/1999/04/Editing/
-.. _PyPI: https://pypi.python.org/pypi/CacheControl/
-.. _pip: http://www.pip-installer.org/
+.. _requests: https://requests.readthedocs.io/en/latest/
+.. _PyPI: https://pypi.org/project/CacheControl/
+.. _pip: https://pip.pypa.io/en/stable/
 
 
-Contents:
+Contents
+========
 
 .. toctree::
    :maxdepth: 2
@@ -89,8 +89,15 @@
    etags
    custom_heuristics
    tips
-   release_notes
 
+.. toctree::
+   :hidden:
+   :caption: Development
+   :maxdepth: 2
+
+   release_notes
+   GitHub <https://github.com/psf/cachecontrol>
+   PyPI <https://pypi.org/project/cachecontrol>
 
 
 Indices and tables
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cachecontrol-0.13.1/docs/release_notes.rst 
new/cachecontrol-0.14.0/docs/release_notes.rst
--- old/cachecontrol-0.13.1/docs/release_notes.rst      2023-06-08 
07:26:31.000000000 +0200
+++ new/cachecontrol-0.14.0/docs/release_notes.rst      2024-02-02 
03:50:04.000000000 +0100
@@ -7,6 +7,13 @@
  Release Notes
 ===============
 
+0.14.0
+======
+
+* Explicitly allow ``pathlib.Path`` as a type for ``FileCache.directory``.
+* Drop support for Python 3.7. Python 3.8 is now the minimum version.
+* Don't use the cache to return a full response if a request has a Range 
header.
+
 0.13.1
 ======
 
@@ -29,6 +36,18 @@
 * Add type annotations.
 * Exclude the ``tests`` directory from the wheel.
 
+0.12.14
+=======
+
+* Revert the change "switch lockfile to filelock" to fix the compatibility 
issue.
+
+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.
+
 0.12.11
 =======
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cachecontrol-0.13.1/docs/requirements.txt 
new/cachecontrol-0.14.0/docs/requirements.txt
--- old/cachecontrol-0.13.1/docs/requirements.txt       1970-01-01 
01:00:00.000000000 +0100
+++ new/cachecontrol-0.14.0/docs/requirements.txt       2024-02-02 
03:50:04.000000000 +0100
@@ -0,0 +1 @@
+.[dev]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cachecontrol-0.13.1/docs/storage.rst 
new/cachecontrol-0.14.0/docs/storage.rst
--- old/cachecontrol-0.13.1/docs/storage.rst    2023-06-08 07:26:31.000000000 
+0200
+++ new/cachecontrol-0.14.0/docs/storage.rst    2024-02-02 03:50:04.000000000 
+0100
@@ -77,10 +77,10 @@
 
   import requests
   from cachecontrol import CacheControl
-  from cachecontrol.caches SeparateBodyFileCache
+  from cachecontrol.caches import SeparateBodyFileCache
 
   sess = CacheControl(requests.Session(),
-                      cache=SeparatedBodyFileCache('.web_cache'))
+                      cache=SeparateBodyFileCache('.web_cache'))
 
 ``SeparateBodyFileCache`` supports the same options as ``FileCache``.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cachecontrol-0.13.1/examples/benchmark.py 
new/cachecontrol-0.14.0/examples/benchmark.py
--- old/cachecontrol-0.13.1/examples/benchmark.py       2023-06-08 
07:26:31.000000000 +0200
+++ new/cachecontrol-0.14.0/examples/benchmark.py       2024-02-02 
03:50:04.000000000 +0100
@@ -13,16 +13,16 @@
 
 HOST = "localhost"
 PORT = 8050
-URL = "http://{}:{}/".format(HOST, PORT)
+URL = f"http://{HOST}:{PORT}/";
 
 
-class Server(object):
-
+class Server:
     def __call__(self, env, sr):
         body = "Hello World!"
         status = "200 OK"
         headers = [
-            ("Cache-Control", "max-age=%i" % (60 * 10)), ("Content-Type", 
"text/plain")
+            ("Cache-Control", "max-age=%i" % (60 * 10)),
+            ("Content-Type", "text/plain"),
         ]
         sr(status, headers)
         return body
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cachecontrol-0.13.1/pyproject.toml 
new/cachecontrol-0.14.0/pyproject.toml
--- old/cachecontrol-0.13.1/pyproject.toml      2023-06-08 07:26:31.000000000 
+0200
+++ new/cachecontrol-0.14.0/pyproject.toml      2024-02-02 03:50:04.000000000 
+0100
@@ -24,16 +24,16 @@
     "Environment :: Web Environment",
     "License :: OSI Approved :: Apache Software License",
     "Operating System :: OS Independent",
-    "Programming Language :: Python :: 3.6",
     "Programming Language :: Python :: 3.7",
     "Programming Language :: Python :: 3.8",
     "Programming Language :: Python :: 3.9",
     "Programming Language :: Python :: 3.10",
     "Programming Language :: Python :: 3.11",
+    "Programming Language :: Python :: 3.12",
     "Topic :: Internet :: WWW/HTTP",
 ]
 keywords = ["requests", "http", "caching", "web"]
-dependencies = ["requests >= 2.16.0", "msgpack >= 0.5.2"]
+dependencies = ["requests >= 2.16.0", "msgpack >= 0.5.2, < 2.0.0"]
 requires-python = ">=3.7"
 
 [project.urls]
@@ -56,6 +56,8 @@
     "pytest",
     "cherrypy",
     "sphinx",
+    "furo",
+    "sphinx-copybutton",
     "black",
     "types-redis",
     "types-requests",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cachecontrol-0.13.1/tests/conftest.py 
new/cachecontrol-0.14.0/tests/conftest.py
--- old/cachecontrol-0.13.1/tests/conftest.py   2023-06-08 07:26:31.000000000 
+0200
+++ new/cachecontrol-0.14.0/tests/conftest.py   2024-02-02 03:50:04.000000000 
+0100
@@ -13,7 +13,6 @@
 
 
 class SimpleApp:
-
     def __init__(self):
         self.etag_count = 0
         self.update_etag_string()
@@ -109,7 +108,7 @@
         headers = [
             ("Content-Type", "text/plain"),
             ("Cache-Control", "max-age=5000"),
-            ("Content-Length", str(len(body)))
+            ("Content-Length", str(len(body))),
         ]
         start_response("200 OK", headers)
         return [body]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cachecontrol-0.13.1/tests/test_adapter.py 
new/cachecontrol-0.14.0/tests/test_adapter.py
--- old/cachecontrol-0.13.1/tests/test_adapter.py       2023-06-08 
07:26:31.000000000 +0200
+++ new/cachecontrol-0.14.0/tests/test_adapter.py       2024-02-02 
03:50:04.000000000 +0100
@@ -35,7 +35,6 @@
 
 
 class TestSessionActions:
-
     def test_get_caches(self, url, sess):
         r2 = sess.get(url)
         assert r2.from_cache is True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cachecontrol-0.13.1/tests/test_chunked_response.py 
new/cachecontrol-0.14.0/tests/test_chunked_response.py
--- old/cachecontrol-0.13.1/tests/test_chunked_response.py      2023-06-08 
07:26:31.000000000 +0200
+++ new/cachecontrol-0.14.0/tests/test_chunked_response.py      2024-02-02 
03:50:04.000000000 +0100
@@ -21,7 +21,6 @@
 
 
 class TestChunkedResponses:
-
     def test_cache_chunked_response(self, url, sess):
         """
         Verify that an otherwise cacheable response is cached when the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cachecontrol-0.13.1/tests/test_etag.py 
new/cachecontrol-0.14.0/tests/test_etag.py
--- old/cachecontrol-0.13.1/tests/test_etag.py  2023-06-08 07:26:31.000000000 
+0200
+++ new/cachecontrol-0.14.0/tests/test_etag.py  2024-02-02 03:50:04.000000000 
+0100
@@ -79,6 +79,31 @@
         # Make sure we updated our cache with the new etag'd response.
         assert self.cache.get(self.etag_url) == resp.raw
 
+    def test_etags_get_no_cache(self, sess, server):
+        """A 'Cache-Control: no-cache' header stops us from using the cache 
directly,
+        but not from using the 'If-None-Match' header on the request."""
+        # get our response
+        r = sess.get(self.etag_url)
+        assert "if-none-match" not in r.request.headers
+
+        r = sess.get(self.etag_url, headers={"Cache-Control": "no-cache"})
+        assert "if-none-match" in r.request.headers
+        assert r.status_code == 200
+
+        # This response does come from the cache, but only after the 304 
response from
+        # the server told us that was fine.
+        assert r.from_cache
+
+    def test_etags_get_with_range(self, sess, server):
+        """A 'Range' header stops us from using the cache altogether."""
+        # get our response
+        r = sess.get(self.etag_url)
+
+        r = sess.get(self.etag_url, headers={"Range": "0-10"})
+        assert "if-none-match" not in r.request.headers
+        assert r.status_code == 200
+        assert not r.from_cache
+
 
 class TestDisabledETags:
     """Test our use of ETags when the response is stale and the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cachecontrol-0.13.1/tests/test_max_age.py 
new/cachecontrol-0.14.0/tests/test_max_age.py
--- old/cachecontrol-0.13.1/tests/test_max_age.py       2023-06-08 
07:26:31.000000000 +0200
+++ new/cachecontrol-0.14.0/tests/test_max_age.py       2024-02-02 
03:50:04.000000000 +0100
@@ -11,7 +11,6 @@
 
 
 class TestMaxAge:
-
     @pytest.fixture()
     def sess(self, url):
         self.url = url
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cachecontrol-0.13.1/tests/test_regressions.py 
new/cachecontrol-0.14.0/tests/test_regressions.py
--- old/cachecontrol-0.13.1/tests/test_regressions.py   2023-06-08 
07:26:31.000000000 +0200
+++ new/cachecontrol-0.14.0/tests/test_regressions.py   2024-02-02 
03:50:04.000000000 +0100
@@ -2,7 +2,6 @@
 #
 # SPDX-License-Identifier: Apache-2.0
 
-import sys
 import pytest
 
 
@@ -13,10 +12,6 @@
 
 
 class Test39:
-
-    @pytest.mark.skipif(
-        sys.version.startswith("2"), reason="Only run this for python 3.x"
-    )
     def test_file_cache_recognizes_consumed_file_handle(self, url):
         s = CacheControl(Session(), FileCache("web_cache"))
         the_url = url + "cache_60"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cachecontrol-0.13.1/tests/test_storage_filecache.py 
new/cachecontrol-0.14.0/tests/test_storage_filecache.py
--- old/cachecontrol-0.13.1/tests/test_storage_filecache.py     2023-06-08 
07:26:31.000000000 +0200
+++ new/cachecontrol-0.14.0/tests/test_storage_filecache.py     2024-02-02 
03:50:04.000000000 +0100
@@ -25,7 +25,6 @@
 
 
 class FileCacheTestsMixin:
-
     FileCacheClass = None  # Either FileCache or SeparateBodyFileCache
 
     @pytest.fixture()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cachecontrol-0.13.1/tests/test_storage_redis.py 
new/cachecontrol-0.14.0/tests/test_storage_redis.py
--- old/cachecontrol-0.13.1/tests/test_storage_redis.py 2023-06-08 
07:26:31.000000000 +0200
+++ new/cachecontrol-0.14.0/tests/test_storage_redis.py 2024-02-02 
03:50:04.000000000 +0100
@@ -18,8 +18,7 @@
         assert self.conn.setex.called
 
     def test_set_expiration_datetime_aware(self):
-        self.cache.set("foo", "bar",
-                       expires=datetime(2014, 2, 2, tzinfo=timezone.utc))
+        self.cache.set("foo", "bar", expires=datetime(2014, 2, 2, 
tzinfo=timezone.utc))
         assert self.conn.setex.called
 
     def test_set_expiration_int(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cachecontrol-0.13.1/tests/utils.py 
new/cachecontrol-0.14.0/tests/utils.py
--- old/cachecontrol-0.13.1/tests/utils.py      2023-06-08 07:26:31.000000000 
+0200
+++ new/cachecontrol-0.14.0/tests/utils.py      2024-02-02 03:50:04.000000000 
+0100
@@ -8,7 +8,6 @@
 
 
 class NullSerializer(Serializer):
-
     def dumps(self, request, response, body=None):
         return response
 
@@ -20,6 +19,7 @@
 
 class DummyResponse:
     """Match a ``urllib3.response.HTTPResponse``."""
+
     version = "1.1"
     reason = b"Because"
     strict = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cachecontrol-0.13.1/tox.ini 
new/cachecontrol-0.14.0/tox.ini
--- old/cachecontrol-0.13.1/tox.ini     2023-06-08 07:26:31.000000000 +0200
+++ new/cachecontrol-0.14.0/tox.ini     2024-02-02 03:50:04.000000000 +0100
@@ -4,15 +4,16 @@
 
 [tox]
 isolated_build = True
-envlist = py{36,37,38,39,310,311}, mypy
+envlist = py{37,38,39,310,311,312}, mypy
 
 [gh-actions]
 python =
        3.7: py37
        3.8: py38
        3.9: py39
-       3.10: py310, mypy
+       3.10: py310
        3.11: py311
+       3.12: py312, mypy
 
 [testenv]
 deps = pytest

Reply via email to