hishel 1.1.4__tar.gz → 1.1.5__tar.gz
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-1.1.4 → hishel-1.1.5}/CHANGELOG.md +10 -0
- {hishel-1.1.4 → hishel-1.1.5}/PKG-INFO +11 -1
- {hishel-1.1.4 → hishel-1.1.5}/hishel/_core/_storages/_async_sqlite.py +13 -10
- {hishel-1.1.4 → hishel-1.1.5}/hishel/_core/_storages/_sync_sqlite.py +13 -10
- {hishel-1.1.4 → hishel-1.1.5}/pyproject.toml +1 -1
- {hishel-1.1.4 → hishel-1.1.5}/.gitignore +0 -0
- {hishel-1.1.4 → hishel-1.1.5}/LICENSE +0 -0
- {hishel-1.1.4 → hishel-1.1.5}/README.md +0 -0
- {hishel-1.1.4 → hishel-1.1.5}/hishel/__init__.py +0 -0
- {hishel-1.1.4 → hishel-1.1.5}/hishel/_async_cache.py +0 -0
- {hishel-1.1.4 → hishel-1.1.5}/hishel/_async_httpx.py +0 -0
- {hishel-1.1.4 → hishel-1.1.5}/hishel/_core/_headers.py +0 -0
- {hishel-1.1.4 → hishel-1.1.5}/hishel/_core/_spec.py +0 -0
- {hishel-1.1.4 → hishel-1.1.5}/hishel/_core/_storages/_async_base.py +0 -0
- {hishel-1.1.4 → hishel-1.1.5}/hishel/_core/_storages/_packing.py +0 -0
- {hishel-1.1.4 → hishel-1.1.5}/hishel/_core/_storages/_sync_base.py +0 -0
- {hishel-1.1.4 → hishel-1.1.5}/hishel/_core/models.py +0 -0
- {hishel-1.1.4 → hishel-1.1.5}/hishel/_policies.py +0 -0
- {hishel-1.1.4 → hishel-1.1.5}/hishel/_sync_cache.py +0 -0
- {hishel-1.1.4 → hishel-1.1.5}/hishel/_sync_httpx.py +0 -0
- {hishel-1.1.4 → hishel-1.1.5}/hishel/_utils.py +0 -0
- {hishel-1.1.4 → hishel-1.1.5}/hishel/asgi.py +0 -0
- {hishel-1.1.4 → hishel-1.1.5}/hishel/fastapi.py +0 -0
- {hishel-1.1.4 → hishel-1.1.5}/hishel/httpx.py +0 -0
- {hishel-1.1.4 → hishel-1.1.5}/hishel/py.typed +0 -0
- {hishel-1.1.4 → hishel-1.1.5}/hishel/requests.py +0 -0
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## What's Changed in 1.1.5
|
|
2
|
+
### 🐛 Bug Fixes
|
|
3
|
+
|
|
4
|
+
* filter out soft-deleted, expired and incomplete entries in `get_entries` by @karpetrosyan
|
|
5
|
+
|
|
6
|
+
### Contributors
|
|
7
|
+
* @karpetrosyan
|
|
8
|
+
|
|
9
|
+
**Full Changelog**: https://github.com/karpetrosyan/hishel/compare/1.1.4...1.1.5
|
|
10
|
+
|
|
1
11
|
## What's Changed in 1.1.4
|
|
2
12
|
### 🐛 Bug Fixes
|
|
3
13
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hishel
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.5
|
|
4
4
|
Summary: Elegant HTTP Caching for Python
|
|
5
5
|
Project-URL: Homepage, https://hishel.com
|
|
6
6
|
Project-URL: Source, https://github.com/karpetrosyan/hishel
|
|
@@ -406,6 +406,16 @@ Hishel is inspired by and builds upon the excellent work in the Python HTTP ecos
|
|
|
406
406
|
<strong>Made with ❤️ by <a href="https://github.com/karpetrosyan">Kar Petrosyan</a></strong>
|
|
407
407
|
</p>
|
|
408
408
|
|
|
409
|
+
## What's Changed in 1.1.5
|
|
410
|
+
### 🐛 Bug Fixes
|
|
411
|
+
|
|
412
|
+
* filter out soft-deleted, expired and incomplete entries in `get_entries` by @karpetrosyan
|
|
413
|
+
|
|
414
|
+
### Contributors
|
|
415
|
+
* @karpetrosyan
|
|
416
|
+
|
|
417
|
+
**Full Changelog**: https://github.com/karpetrosyan/hishel/compare/1.1.4...1.1.5
|
|
418
|
+
|
|
409
419
|
## What's Changed in 1.1.4
|
|
410
420
|
### 🐛 Bug Fixes
|
|
411
421
|
|
|
@@ -161,8 +161,19 @@ try:
|
|
|
161
161
|
for row in await cursor.fetchall():
|
|
162
162
|
pair_data = unpack(row[1], kind="pair")
|
|
163
163
|
|
|
164
|
+
if pair_data is None:
|
|
165
|
+
continue
|
|
166
|
+
|
|
164
167
|
# Skip entries without a response (incomplete)
|
|
165
|
-
if not
|
|
168
|
+
if not await self._is_stream_complete(pair_data.id, cursor=cursor):
|
|
169
|
+
continue
|
|
170
|
+
|
|
171
|
+
# Skip expired entries
|
|
172
|
+
if await self._is_pair_expired(pair_data, cursor=cursor):
|
|
173
|
+
continue
|
|
174
|
+
|
|
175
|
+
# Skip soft-deleted entries
|
|
176
|
+
if self.is_soft_deleted(pair_data):
|
|
166
177
|
continue
|
|
167
178
|
|
|
168
179
|
final_pairs.append(pair_data)
|
|
@@ -330,15 +341,7 @@ try:
|
|
|
330
341
|
|
|
331
342
|
async def _is_corrupted(self, pair: Entry, cursor: anysqlite.Cursor) -> bool:
|
|
332
343
|
# if entry was created more than 1 hour ago and still has no response (incomplete)
|
|
333
|
-
if pair.meta.created_at + 3600 < time.time() and pair.
|
|
334
|
-
return True
|
|
335
|
-
|
|
336
|
-
# Check if response stream is complete for Entry with response
|
|
337
|
-
if (
|
|
338
|
-
isinstance(pair, Entry)
|
|
339
|
-
and pair.response is not None
|
|
340
|
-
and not await self._is_stream_complete(pair.id, cursor)
|
|
341
|
-
):
|
|
344
|
+
if pair.meta.created_at + 3600 < time.time() and not self._is_stream_complete(pair.id, cursor):
|
|
342
345
|
return True
|
|
343
346
|
return False
|
|
344
347
|
|
|
@@ -161,8 +161,19 @@ try:
|
|
|
161
161
|
for row in cursor.fetchall():
|
|
162
162
|
pair_data = unpack(row[1], kind="pair")
|
|
163
163
|
|
|
164
|
+
if pair_data is None:
|
|
165
|
+
continue
|
|
166
|
+
|
|
164
167
|
# Skip entries without a response (incomplete)
|
|
165
|
-
if not
|
|
168
|
+
if not self._is_stream_complete(pair_data.id, cursor=cursor):
|
|
169
|
+
continue
|
|
170
|
+
|
|
171
|
+
# Skip expired entries
|
|
172
|
+
if self._is_pair_expired(pair_data, cursor=cursor):
|
|
173
|
+
continue
|
|
174
|
+
|
|
175
|
+
# Skip soft-deleted entries
|
|
176
|
+
if self.is_soft_deleted(pair_data):
|
|
166
177
|
continue
|
|
167
178
|
|
|
168
179
|
final_pairs.append(pair_data)
|
|
@@ -330,15 +341,7 @@ try:
|
|
|
330
341
|
|
|
331
342
|
def _is_corrupted(self, pair: Entry, cursor: sqlite3.Cursor) -> bool:
|
|
332
343
|
# if entry was created more than 1 hour ago and still has no response (incomplete)
|
|
333
|
-
if pair.meta.created_at + 3600 < time.time() and pair.
|
|
334
|
-
return True
|
|
335
|
-
|
|
336
|
-
# Check if response stream is complete for Entry with response
|
|
337
|
-
if (
|
|
338
|
-
isinstance(pair, Entry)
|
|
339
|
-
and pair.response is not None
|
|
340
|
-
and not self._is_stream_complete(pair.id, cursor)
|
|
341
|
-
):
|
|
344
|
+
if pair.meta.created_at + 3600 < time.time() and not self._is_stream_complete(pair.id, cursor):
|
|
342
345
|
return True
|
|
343
346
|
return False
|
|
344
347
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|