hishel 0.0.31__py3-none-any.whl → 0.0.32__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.
- hishel/__init__.py +1 -1
- hishel/_controller.py +4 -2
- {hishel-0.0.31.dist-info → hishel-0.0.32.dist-info}/METADATA +5 -1
- {hishel-0.0.31.dist-info → hishel-0.0.32.dist-info}/RECORD +6 -6
- {hishel-0.0.31.dist-info → hishel-0.0.32.dist-info}/WHEEL +0 -0
- {hishel-0.0.31.dist-info → hishel-0.0.32.dist-info}/licenses/LICENSE +0 -0
hishel/__init__.py
CHANGED
hishel/_controller.py
CHANGED
|
@@ -79,8 +79,10 @@ def get_heuristic_freshness(response: Response, clock: "BaseClock") -> int:
|
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
def get_age(response: Response, clock: "BaseClock") -> int:
|
|
82
|
-
if not header_presents(response.headers, b"date"):
|
|
83
|
-
|
|
82
|
+
if not header_presents(response.headers, b"date"):
|
|
83
|
+
# If the response does not have a date header, then it is impossible to calculate the age.
|
|
84
|
+
# Instead of raising an exception, we return infinity to be sure that the response is not considered fresh.
|
|
85
|
+
return float("inf") # type: ignore
|
|
84
86
|
|
|
85
87
|
date = parse_date(extract_header_values_decoded(response.headers, b"date")[0])
|
|
86
88
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: hishel
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.32
|
|
4
4
|
Summary: Persistent cache implementation for httpx and httpcore
|
|
5
5
|
Project-URL: Homepage, https://hishel.com
|
|
6
6
|
Project-URL: Source, https://github.com/karpetrosyan/hishel
|
|
@@ -175,6 +175,10 @@ Help us grow and continue developing good software for you ❤️
|
|
|
175
175
|
|
|
176
176
|
# Changelog
|
|
177
177
|
|
|
178
|
+
## 0.0.32 (27th Sep, 2024)
|
|
179
|
+
|
|
180
|
+
- Don't raise an exception if the `Date` header is not present. (#273)
|
|
181
|
+
|
|
178
182
|
## 0.0.31 (22nd Sep, 2024)
|
|
179
183
|
|
|
180
184
|
- Ignore file not found error when cleaning up a file storage. (#264)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
hishel/__init__.py,sha256=
|
|
2
|
-
hishel/_controller.py,sha256=
|
|
1
|
+
hishel/__init__.py,sha256=H002jQK0-tviX35x2lvz1TftDXsTEb4zDBh4h9PHABY,369
|
|
2
|
+
hishel/_controller.py,sha256=se09qx7f_xR3T-oQvvmICrv3oIgQcYMiCXyRh2OADOM,16038
|
|
3
3
|
hishel/_exceptions.py,sha256=qbg55RNlzwhv5JreWY9Zog_zmmiKdn5degtqJKijuRs,198
|
|
4
4
|
hishel/_files.py,sha256=7J5uX7Nnzd7QQWfYuDGh8v6XGLG3eUDBjoJZ4aTaY1c,2228
|
|
5
5
|
hishel/_headers.py,sha256=TWuHi7sRoeS2xxdNGujKmqWtgncUqfhNGCgHKYpRU-I,7329
|
|
@@ -21,7 +21,7 @@ hishel/_sync/_mock.py,sha256=im88tZr-XhP9BpzvIt3uOjndAlNcJvFP7Puv3H-6lKU,1430
|
|
|
21
21
|
hishel/_sync/_pool.py,sha256=VcAknzyAL2i4-zcyE2fOTmTjfBZ2wkBVNYTvSw0OjVQ,7940
|
|
22
22
|
hishel/_sync/_storages.py,sha256=RYzYXqnv0o2JO3RoEmlEUp0yOg_ungXfz4dLN7UTpIQ,27909
|
|
23
23
|
hishel/_sync/_transports.py,sha256=G3_8SdPwlnrHZRvE1gqFLE4oZadVqNgg5mvxghDMih0,10838
|
|
24
|
-
hishel-0.0.
|
|
25
|
-
hishel-0.0.
|
|
26
|
-
hishel-0.0.
|
|
27
|
-
hishel-0.0.
|
|
24
|
+
hishel-0.0.32.dist-info/METADATA,sha256=7YzjYw0A7BojC44b7J7IKqxd_1_-crwZJiKsNwViil0,11578
|
|
25
|
+
hishel-0.0.32.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
26
|
+
hishel-0.0.32.dist-info/licenses/LICENSE,sha256=1qQj7pE0V2O9OIedvyOgLGLvZLaPd3nFEup3IBEOZjQ,1493
|
|
27
|
+
hishel-0.0.32.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|