CacheControl 0.14.2__py3-none-any.whl → 0.14.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cachecontrol/__init__.py +5 -3
- cachecontrol/adapter.py +0 -1
- cachecontrol/controller.py +1 -1
- cachecontrol/filewrapper.py +3 -1
- {cachecontrol-0.14.2.dist-info → cachecontrol-0.14.4.dist-info}/METADATA +25 -26
- cachecontrol-0.14.4.dist-info/RECORD +18 -0
- {cachecontrol-0.14.2.dist-info → cachecontrol-0.14.4.dist-info}/WHEEL +2 -2
- cachecontrol-0.14.4.dist-info/entry_points.txt +3 -0
- cachecontrol-0.14.2.dist-info/RECORD +0 -18
- cachecontrol-0.14.2.dist-info/entry_points.txt +0 -3
- {cachecontrol-0.14.2.dist-info → cachecontrol-0.14.4.dist-info/licenses}/LICENSE.txt +0 -0
cachecontrol/__init__.py
CHANGED
|
@@ -7,14 +7,16 @@
|
|
|
7
7
|
Make it easy to import from cachecontrol without long namespaces.
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
__email__ = "eric@ionrock.org"
|
|
12
|
-
__version__ = "0.14.2"
|
|
10
|
+
import importlib.metadata
|
|
13
11
|
|
|
14
12
|
from cachecontrol.adapter import CacheControlAdapter
|
|
15
13
|
from cachecontrol.controller import CacheController
|
|
16
14
|
from cachecontrol.wrapper import CacheControl
|
|
17
15
|
|
|
16
|
+
__author__ = "Eric Larson"
|
|
17
|
+
__email__ = "eric@ionrock.org"
|
|
18
|
+
__version__ = importlib.metadata.version("cachecontrol")
|
|
19
|
+
|
|
18
20
|
__all__ = [
|
|
19
21
|
"__author__",
|
|
20
22
|
"__email__",
|
cachecontrol/adapter.py
CHANGED
cachecontrol/controller.py
CHANGED
|
@@ -490,7 +490,7 @@ class CacheController:
|
|
|
490
490
|
#
|
|
491
491
|
# The server isn't supposed to send headers that would make
|
|
492
492
|
# the cached body invalid. But... just in case, we'll be sure
|
|
493
|
-
# to strip out ones we know that might be
|
|
493
|
+
# to strip out ones we know that might be problematic due to
|
|
494
494
|
# typical assumptions.
|
|
495
495
|
excluded_headers = ["content-length"]
|
|
496
496
|
|
cachecontrol/filewrapper.py
CHANGED
|
@@ -8,6 +8,7 @@ from tempfile import NamedTemporaryFile
|
|
|
8
8
|
from typing import TYPE_CHECKING, Any, Callable
|
|
9
9
|
|
|
10
10
|
if TYPE_CHECKING:
|
|
11
|
+
from collections.abc import Buffer
|
|
11
12
|
from http.client import HTTPResponse
|
|
12
13
|
|
|
13
14
|
|
|
@@ -31,7 +32,7 @@ class CallbackFileWrapper:
|
|
|
31
32
|
"""
|
|
32
33
|
|
|
33
34
|
def __init__(
|
|
34
|
-
self, fp: HTTPResponse, callback: Callable[[
|
|
35
|
+
self, fp: HTTPResponse, callback: Callable[[Buffer], None] | None
|
|
35
36
|
) -> None:
|
|
36
37
|
self.__buf = NamedTemporaryFile("rb+", delete=True)
|
|
37
38
|
self.__fp = fp
|
|
@@ -68,6 +69,7 @@ class CallbackFileWrapper:
|
|
|
68
69
|
return False
|
|
69
70
|
|
|
70
71
|
def _close(self) -> None:
|
|
72
|
+
result: Buffer
|
|
71
73
|
if self.__callback:
|
|
72
74
|
if self.__buf.tell() == 0:
|
|
73
75
|
# Empty file:
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: CacheControl
|
|
3
|
-
Version: 0.14.
|
|
3
|
+
Version: 0.14.4
|
|
4
4
|
Summary: httplib2 caching for requests
|
|
5
5
|
Keywords: requests,http,caching,web
|
|
6
|
+
Author: Eric Larson, Frost Ming, William Woodruff
|
|
6
7
|
Author-email: Eric Larson <ericlarson@ionrock.com>, Frost Ming <me@frostming.com>, William Woodruff <william@yossarian.net>
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
License-Expression: Apache-2.0
|
|
9
|
+
License-File: LICENSE.txt
|
|
9
10
|
Classifier: Development Status :: 4 - Beta
|
|
10
11
|
Classifier: Environment :: Web Environment
|
|
11
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
15
13
|
Classifier: Programming Language :: Python :: 3.10
|
|
16
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
16
|
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
18
|
Classifier: Topic :: Internet :: WWW/HTTP
|
|
20
|
-
Requires-Dist: requests
|
|
21
|
-
Requires-Dist: msgpack
|
|
22
|
-
Requires-Dist:
|
|
23
|
-
Requires-Dist:
|
|
24
|
-
Requires-Dist:
|
|
25
|
-
Requires-Dist: codespell
|
|
26
|
-
Requires-Dist: furo ; extra ==
|
|
27
|
-
Requires-Dist: mypy ; extra ==
|
|
28
|
-
Requires-Dist: pytest ; extra ==
|
|
29
|
-
Requires-Dist: pytest-cov ; extra ==
|
|
30
|
-
Requires-Dist: ruff ; extra ==
|
|
31
|
-
Requires-Dist: sphinx ; extra ==
|
|
32
|
-
Requires-Dist: sphinx-copybutton ; extra ==
|
|
33
|
-
Requires-Dist:
|
|
34
|
-
Requires-Dist: types-
|
|
35
|
-
Requires-Dist:
|
|
36
|
-
Requires-Dist:
|
|
37
|
-
Requires-
|
|
19
|
+
Requires-Dist: requests>=2.16.0
|
|
20
|
+
Requires-Dist: msgpack>=0.5.2,<2.0.0
|
|
21
|
+
Requires-Dist: cachecontrol[filecache,redis] ; extra == 'dev'
|
|
22
|
+
Requires-Dist: cherrypy ; extra == 'dev'
|
|
23
|
+
Requires-Dist: cheroot>=11.1.2 ; extra == 'dev'
|
|
24
|
+
Requires-Dist: codespell ; extra == 'dev'
|
|
25
|
+
Requires-Dist: furo ; extra == 'dev'
|
|
26
|
+
Requires-Dist: mypy ; extra == 'dev'
|
|
27
|
+
Requires-Dist: pytest ; extra == 'dev'
|
|
28
|
+
Requires-Dist: pytest-cov ; extra == 'dev'
|
|
29
|
+
Requires-Dist: ruff ; extra == 'dev'
|
|
30
|
+
Requires-Dist: sphinx ; extra == 'dev'
|
|
31
|
+
Requires-Dist: sphinx-copybutton ; extra == 'dev'
|
|
32
|
+
Requires-Dist: types-redis ; extra == 'dev'
|
|
33
|
+
Requires-Dist: types-requests ; extra == 'dev'
|
|
34
|
+
Requires-Dist: filelock>=3.8.0 ; extra == 'filecache'
|
|
35
|
+
Requires-Dist: redis>=2.10.5 ; extra == 'redis'
|
|
36
|
+
Requires-Python: >=3.10
|
|
38
37
|
Project-URL: Homepage, https://pypi.org/project/CacheControl/
|
|
39
38
|
Project-URL: Issues, https://github.com/psf/cachecontrol/issues
|
|
40
39
|
Project-URL: Source, https://github.com/psf/cachecontrol
|
|
41
40
|
Provides-Extra: dev
|
|
42
41
|
Provides-Extra: filecache
|
|
43
42
|
Provides-Extra: redis
|
|
43
|
+
Description-Content-Type: text/x-rst
|
|
44
44
|
|
|
45
45
|
..
|
|
46
46
|
SPDX-FileCopyrightText: SPDX-FileCopyrightText: 2015 Eric Larson
|
|
@@ -89,4 +89,3 @@ For more info, check out the docs_
|
|
|
89
89
|
.. _docs: http://cachecontrol.readthedocs.org/en/latest/
|
|
90
90
|
.. _httplib2: https://github.com/httplib2/httplib2
|
|
91
91
|
.. _requests: http://docs.python-requests.org/
|
|
92
|
-
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
cachecontrol/__init__.py,sha256=aMPfN_9huuMwdL8qh269agzp2ugriVc2okgB4PGHcS0,702
|
|
2
|
+
cachecontrol/_cmd.py,sha256=4l2UbK9N85Vr_KTkF4LjvSlsr-TZnOXTfT2NODlIMtc,1672
|
|
3
|
+
cachecontrol/adapter.py,sha256=VBORpVV3mQCLgGa5Mk531KtjoaYTZs4HBd222GfdL4o,6478
|
|
4
|
+
cachecontrol/cache.py,sha256=OXwv7Fn2AwnKNiahJHnjtvaKLndvVLv_-zO-ltlV9qI,1953
|
|
5
|
+
cachecontrol/caches/__init__.py,sha256=3-BaJBXjdt-4iFbv-799XjzRBsd6zF9wOEqOdDuAAro,279
|
|
6
|
+
cachecontrol/caches/file_cache.py,sha256=0Df9CcKBaGjKF4dhkFGncLx-YHae0BOPd0jo67mG1rQ,4093
|
|
7
|
+
cachecontrol/caches/redis_cache.py,sha256=94Qw4INGwjHcCDwMnOe0gbbcP2fttrlui-e1-Yutclw,1374
|
|
8
|
+
cachecontrol/controller.py,sha256=qZF9BOy_aDElMAXPejH5ohixTgkxYkXWPoB0Ocer_Vk,19030
|
|
9
|
+
cachecontrol/filewrapper.py,sha256=DhxC_rSk-beKdbsYhfvBUDovQHX9r3gHH_jP9-q_mKk,4354
|
|
10
|
+
cachecontrol/heuristics.py,sha256=ccecGyeEycWDY_Kfnx41ebYl7eSdDCLM5X6Sx0f5fZE,4869
|
|
11
|
+
cachecontrol/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
|
+
cachecontrol/serialize.py,sha256=dP5k_UKYUAano6TKG9qlbKHbFMonz0AV_lYR3IFCGMg,5110
|
|
13
|
+
cachecontrol/wrapper.py,sha256=KyaQ4Bq1RqsX-zA4pXH62nmcU511ECIGn5gCvmNIj20,1328
|
|
14
|
+
cachecontrol-0.14.4.dist-info/licenses/LICENSE.txt,sha256=hu7uh74qQ_P_H1ZJb0UfaSQ5JvAl_tuwM2ZsMExMFhs,558
|
|
15
|
+
cachecontrol-0.14.4.dist-info/WHEEL,sha256=w4ZtLaDgMAZW2MMZZwtH8zENekoQYBCeullI-zsXJQk,78
|
|
16
|
+
cachecontrol-0.14.4.dist-info/entry_points.txt,sha256=HjCekaRCv8kfNqP5WehMR29IWxIA5VrhoOeKrCykCLc,56
|
|
17
|
+
cachecontrol-0.14.4.dist-info/METADATA,sha256=o7eXpgH_41Bc5LDGNTY8zyaplZ8kkOkC-EGktZlrXMQ,3074
|
|
18
|
+
cachecontrol-0.14.4.dist-info/RECORD,,
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
cachecontrol/__init__.py,sha256=GW28Jizgz3q_vQN7OpVRVYVDBy-t_nNKN7cJP0jPR2E,641
|
|
2
|
-
cachecontrol/_cmd.py,sha256=4l2UbK9N85Vr_KTkF4LjvSlsr-TZnOXTfT2NODlIMtc,1672
|
|
3
|
-
cachecontrol/adapter.py,sha256=6WA-glAfcEfzWiMbM5XZFVnCilEGOWFwIzYaMXCENx8,6491
|
|
4
|
-
cachecontrol/cache.py,sha256=OXwv7Fn2AwnKNiahJHnjtvaKLndvVLv_-zO-ltlV9qI,1953
|
|
5
|
-
cachecontrol/controller.py,sha256=sBPfFSG1GY1gQ_-pPIFLrnShodU0D2h7KmPZv_l9cn4,19029
|
|
6
|
-
cachecontrol/filewrapper.py,sha256=2ktXNPE0KqnyzF24aOsKCA58HQq1xeC6l2g6_zwjghc,4291
|
|
7
|
-
cachecontrol/heuristics.py,sha256=ccecGyeEycWDY_Kfnx41ebYl7eSdDCLM5X6Sx0f5fZE,4869
|
|
8
|
-
cachecontrol/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
cachecontrol/serialize.py,sha256=dP5k_UKYUAano6TKG9qlbKHbFMonz0AV_lYR3IFCGMg,5110
|
|
10
|
-
cachecontrol/wrapper.py,sha256=KyaQ4Bq1RqsX-zA4pXH62nmcU511ECIGn5gCvmNIj20,1328
|
|
11
|
-
cachecontrol/caches/__init__.py,sha256=3-BaJBXjdt-4iFbv-799XjzRBsd6zF9wOEqOdDuAAro,279
|
|
12
|
-
cachecontrol/caches/file_cache.py,sha256=0Df9CcKBaGjKF4dhkFGncLx-YHae0BOPd0jo67mG1rQ,4093
|
|
13
|
-
cachecontrol/caches/redis_cache.py,sha256=94Qw4INGwjHcCDwMnOe0gbbcP2fttrlui-e1-Yutclw,1374
|
|
14
|
-
cachecontrol-0.14.2.dist-info/entry_points.txt,sha256=1NtpBDZSbqMMbkIxhMBtvQoF7c5Mmfd7EE9hBPG_sLs,54
|
|
15
|
-
cachecontrol-0.14.2.dist-info/LICENSE.txt,sha256=hu7uh74qQ_P_H1ZJb0UfaSQ5JvAl_tuwM2ZsMExMFhs,558
|
|
16
|
-
cachecontrol-0.14.2.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
|
|
17
|
-
cachecontrol-0.14.2.dist-info/METADATA,sha256=dMsEu-cLt5UCDVb-HQEmJkmZ1srnjRNM3OIHptu5Yvg,3121
|
|
18
|
-
cachecontrol-0.14.2.dist-info/RECORD,,
|
|
File without changes
|