hishel 1.1.0__tar.gz → 1.1.2__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.
Files changed (27) hide show
  1. hishel-1.1.2/CHANGELOG.md +195 -0
  2. {hishel-1.1.0 → hishel-1.1.2}/PKG-INFO +196 -116
  3. {hishel-1.1.0 → hishel-1.1.2}/hishel/_async_httpx.py +3 -0
  4. {hishel-1.1.0 → hishel-1.1.2}/hishel/_core/_spec.py +4 -3
  5. {hishel-1.1.0 → hishel-1.1.2}/hishel/_sync_httpx.py +3 -0
  6. {hishel-1.1.0 → hishel-1.1.2}/pyproject.toml +11 -11
  7. hishel-1.1.0/CHANGELOG.md +0 -115
  8. {hishel-1.1.0 → hishel-1.1.2}/.gitignore +0 -0
  9. {hishel-1.1.0 → hishel-1.1.2}/LICENSE +0 -0
  10. {hishel-1.1.0 → hishel-1.1.2}/README.md +0 -0
  11. {hishel-1.1.0 → hishel-1.1.2}/hishel/__init__.py +0 -0
  12. {hishel-1.1.0 → hishel-1.1.2}/hishel/_async_cache.py +0 -0
  13. {hishel-1.1.0 → hishel-1.1.2}/hishel/_core/_headers.py +0 -0
  14. {hishel-1.1.0 → hishel-1.1.2}/hishel/_core/_storages/_async_base.py +0 -0
  15. {hishel-1.1.0 → hishel-1.1.2}/hishel/_core/_storages/_async_sqlite.py +0 -0
  16. {hishel-1.1.0 → hishel-1.1.2}/hishel/_core/_storages/_packing.py +0 -0
  17. {hishel-1.1.0 → hishel-1.1.2}/hishel/_core/_storages/_sync_base.py +0 -0
  18. {hishel-1.1.0 → hishel-1.1.2}/hishel/_core/_storages/_sync_sqlite.py +0 -0
  19. {hishel-1.1.0 → hishel-1.1.2}/hishel/_core/models.py +0 -0
  20. {hishel-1.1.0 → hishel-1.1.2}/hishel/_policies.py +0 -0
  21. {hishel-1.1.0 → hishel-1.1.2}/hishel/_sync_cache.py +0 -0
  22. {hishel-1.1.0 → hishel-1.1.2}/hishel/_utils.py +0 -0
  23. {hishel-1.1.0 → hishel-1.1.2}/hishel/asgi.py +0 -0
  24. {hishel-1.1.0 → hishel-1.1.2}/hishel/fastapi.py +0 -0
  25. {hishel-1.1.0 → hishel-1.1.2}/hishel/httpx.py +0 -0
  26. {hishel-1.1.0 → hishel-1.1.2}/hishel/py.typed +0 -0
  27. {hishel-1.1.0 → hishel-1.1.2}/hishel/requests.py +0 -0
@@ -0,0 +1,195 @@
1
+ ## What's Changed in 1.1.2
2
+ * fix: respect shared option when excluding unstorable headers by @karpetrosyan
3
+ * fix: remove s-maxage consideration for private caches by @karpetrosyan
4
+ * fix: respect shared option when excluding unstorable headers by @jlopex in [#401](https://github.com/karpetrosyan/hishel/pull/401)
5
+ * fix: remove s-maxage consideration for private caches by @jlopex in [#400](https://github.com/karpetrosyan/hishel/pull/400)
6
+ * fix: ensure 304 responses don't leak by @karpetrosyan
7
+
8
+ ## New Contributors
9
+ * @jlopex made their first contribution in [#401](https://github.com/karpetrosyan/hishel/pull/401)
10
+
11
+ **Full Changelog**: https://github.com/karpetrosyan/hishel/compare/1.1.1...1.1.2
12
+
13
+ ## What's Changed in 1.1.1
14
+ * Revert "Revert "chore(deps): bump actions/upload-artifact from 4 to 5 "" by @karpetrosyan
15
+ * Revert "chore(deps): bump actions/download-artifact from 4 to 6 " by @karpetrosyan
16
+ * Revert "chore(deps): bump actions/upload-artifact from 4 to 5 " by @karpetrosyan
17
+ * update uv.lock by @karpetrosyan
18
+ * Version 1.1.1 by @karpetrosyan
19
+
20
+ **Full Changelog**: https://github.com/karpetrosyan/hishel/compare/1.1.0...1.1.1
21
+
22
+ ## What's Changed in 1.1.0
23
+ * Version 1.1.0 by @karpetrosyan
24
+ * fix: pass any response with non-expected status code on revalidation to client by @karpetrosyan
25
+ * fix: pass any response with non-expected status code on revalidation to client by @karpetrosyan
26
+ * feat: allow setting storage base with via `database_path` for sqlite storage by @karpetrosyan
27
+ * fix in memory example by @karpetrosyan
28
+ * chore: add in memory example by @karpetrosyan
29
+
30
+ **Full Changelog**: https://github.com/karpetrosyan/hishel/compare/1.0.0...1.1.0
31
+
32
+ ## What's Changed in 1.0.0
33
+ * Version 1.0.0 by @karpetrosyan
34
+ * chore(docs): add examples, improve docs by @karpetrosyan
35
+
36
+ **Full Changelog**: https://github.com/karpetrosyan/hishel/compare/1.0.0b1...1.0.0
37
+
38
+ ## What's Changed in 1.0.0b1
39
+ * Version 1.0.0b1 by @karpetrosyan
40
+ * improve docs by @karpetrosyan
41
+ * fix: filter out `Transfer-Encoding` header for asgi responses by @karpetrosyan
42
+ * fix body sensitive docs by @karpetrosyan
43
+ * refactor: add policies by @karpetrosyan
44
+ * chore(docs): add graphql docs by @karpetrosyan
45
+ * feat: add global `use_body_key` setting by @karpetrosyan
46
+ * chore(docs): improve sans-io diagram colors by @karpetrosyan
47
+ * fix: body-sensitive responses caching by @karpetrosyan
48
+ * mention body sensitive content caching by @karpetrosyan
49
+ * clean up roadmap by @karpetrosyan
50
+
51
+ **Full Changelog**: https://github.com/karpetrosyan/hishel/compare/1.0.0.dev3...1.0.0b1
52
+
53
+ ## What's Changed in 1.0.0.dev3
54
+ * Version 1.0.0.dev3 by @karpetrosyan
55
+ * fix ci by @karpetrosyan
56
+ * fix: add date header for proper age calculation by @karpetrosyan
57
+ * rename some methods by @karpetrosyan
58
+ * refactor: automatically generate httpx sync integration from async by @karpetrosyan
59
+ * change pairs to entries in some places by @karpetrosyan
60
+ * fix lint format by @karpetrosyan
61
+ * refactor: replace pairs with entries, simplify storage API by @karpetrosyan
62
+ * better docs by @karpetrosyan
63
+ * better custom integrations docs by @karpetrosyan
64
+ * more private by @karpetrosyan
65
+ * fix lint, make things private by @karpetrosyan
66
+ * dont fail if unasync rule was not used by @karpetrosyan
67
+ * chore: more robust compressed response caching by @karpetrosyan
68
+ * chore(docs): add custom integrations docs by @karpetrosyan
69
+ * feat: add logging for asgi by @karpetrosyan
70
+ * fix: handle httpx iterable usage instead of iterator correctly by @karpetrosyan
71
+ * feat: add blacksheep integration examples by @karpetrosyan
72
+ * Change note syntax for ASGI middleware by @karpetrosyan
73
+ * fix lint by @karpetrosyan
74
+ * feat: add integrations with fastapi and asgi by @karpetrosyan
75
+ * fix readme by @karpetrosyan
76
+ * add icon for introduction page by @karpetrosyan
77
+ * fix test by @karpetrosyan
78
+ * properly close resource by @karpetrosyan
79
+ * fix: fix compressed data caching for requests by @karpetrosyan
80
+ * fix: raise on consumed httpx streams, which we can't store as is (it's already decoded) by @karpetrosyan
81
+ * chore(docs): simplify metadata docs by @karpetrosyan
82
+ * fix: add missing permissions into `publish.yml` by @karpetrosyan
83
+
84
+ **Full Changelog**: https://github.com/karpetrosyan/hishel/compare/1.0.0.dev2...1.0.0.dev3
85
+
86
+ ## What's Changed in 1.0.0.dev2
87
+ * Version 1.0.0.dev2 by @karpetrosyan
88
+ * unasync by @karpetrosyan
89
+ * chore: fix time travel date, explicitly specify the timezone by @karpetrosyan
90
+ * fix: don't raise an error on 3xx during revalidation by @karpetrosyan
91
+ * chore: add import without extras check in ci by @karpetrosyan
92
+ * chore(internal): remove redundant utils and tests by @karpetrosyan
93
+ * feat: add hishel_created_at response metadata by @karpetrosyan
94
+ * fix: fix check for storing auth requests by @karpetrosyan
95
+ * better git-cliff by @karpetrosyan
96
+
97
+ **Full Changelog**: https://github.com/karpetrosyan/hishel/compare/1.0.0.dev1...1.0.0.dev2
98
+
99
+ ## What's Changed in 1.0.0.dev1
100
+ * Version 1.0.0.dev1 by @karpetrosyan
101
+ * fix changelog + uv lock by @karpetrosyan
102
+ * fix linting by @karpetrosyan
103
+ * chore(internal): remove some redundant utils methods by @karpetrosyan
104
+ * fix mike deploy by @karpetrosyan
105
+
106
+ **Full Changelog**: https://github.com/karpetrosyan/hishel/compare/1.0.0.dev0...1.0.0.dev1
107
+
108
+ ## What's Changed in 1.0.0.dev0
109
+ * fix publish.yml by @karpetrosyan
110
+ * fix format by @karpetrosyan
111
+ * prepare 1.0.0.dev0 release by @karpetrosyan
112
+ * improve `CacheOptions` docs by @karpetrosyan
113
+ * don't make release version latest by default by @karpetrosyan
114
+ * fix changelog by @karpetrosyan
115
+ * fix action permissions by @karpetrosyan
116
+ * improve docs introduction by @karpetrosyan
117
+ * better docs publishing, better project description by @karpetrosyan
118
+ * fix docs publishing by @karpetrosyan
119
+ * fix docs deploying by @karpetrosyan
120
+ * chore(docs): improve docs versioning, deploy dev doc on ci by @karpetrosyan
121
+ * fix unasync by @karpetrosyan
122
+ * fix unasync by @karpetrosyan
123
+ * fix unasync by @karpetrosyan
124
+ * Version 1.0.0.dev0 by @karpetrosyan
125
+ * chore(docs): use mike powered versioning by @karpetrosyan
126
+ * fix changelog by @karpetrosyan
127
+
128
+ **Full Changelog**: https://github.com/karpetrosyan/hishel/compare/0.1.5...1.0.0.dev0
129
+
130
+ ## What's Changed in 0.1.5
131
+ * Version 0.1.5 by @karpetrosyan in [#385](https://github.com/karpetrosyan/hishel/pull/385)
132
+ * feat(perf): increase requests buffer size to 128KB, disable charset detection by @karpetrosyan
133
+ * feat: add close method to storages API by @karpetrosyan in [#384](https://github.com/karpetrosyan/hishel/pull/384)
134
+ * fix headers by @karpetrosyan
135
+ * fix lint by @karpetrosyan
136
+ * ruff format by @karpetrosyan
137
+ * feat: better cache-control parsing by @karpetrosyan
138
+ * feat(perf): set chunk size to 128KB for httpx to reduce SQLite read/writes by @karpetrosyan
139
+ * fix(docs): fix some line breaks by @karpetrosyan
140
+ * chore: remove some redundant files from repo by @karpetrosyan
141
+
142
+ **Full Changelog**: https://github.com/karpetrosyan/hishel/compare/0.1.4...0.1.5
143
+
144
+ ## What's Changed in 0.1.4
145
+ * Version 0.1.4 by @karpetrosyan in [#381](https://github.com/karpetrosyan/hishel/pull/381)
146
+ * fix lint by @karpetrosyan
147
+ * more docs! by @karpetrosyan
148
+ * ensure connection is not stored by @karpetrosyan
149
+ * fix annotations by @karpetrosyan
150
+ * fix typing by @karpetrosyan
151
+ * format by @karpetrosyan
152
+ * more docs! more tests! by @karpetrosyan
153
+ * lot of fixes by @karpetrosyan
154
+ * remove redundant files by @karpetrosyan
155
+ * remove docs footer by @karpetrosyan
156
+ * fix: fix beta imports by @karpetrosyan
157
+ * uv lock by @karpetrosyan
158
+ * fix: create an sqlite file in a cache folder by @karpetrosyan
159
+ * better unasync by @karpetrosyan
160
+ * feat: better async implemetation for sqlite storage by @karpetrosyan
161
+ * feat: get rid of some locks from sqlite storage by @karpetrosyan
162
+ * chore(tests): move some tests to beta by @karpetrosyan
163
+ * fix tests by @karpetrosyan
164
+ * fix tests by @karpetrosyan
165
+ * fix lint by @karpetrosyan
166
+ * chore(tests): add sqlite tests for new storage by @karpetrosyan
167
+ * feat: add sqlite storage for beta storages by @karpetrosyan
168
+ * Adding `.venv` to `.gitignore` by @jamesbraza in [#379](https://github.com/karpetrosyan/hishel/pull/379)
169
+ * Revert "add ethical ads" by @karpetrosyan
170
+ * add ethical ads by @karpetrosyan
171
+ * feat: allow already consumed streams with `CacheTransport` by @jamesbraza in [#377](https://github.com/karpetrosyan/hishel/pull/377)
172
+ * chore(ci): fix lint script by @GugNersesyan in [#375](https://github.com/karpetrosyan/hishel/pull/375)
173
+ * chore(internal): temporary remove python3.14 from CI by @karpetrosyan
174
+ * chore(internal): remove src folder by @karpetrosyan in [#373](https://github.com/karpetrosyan/hishel/pull/373)
175
+ * New storage API by @karpetrosyan in [#359](https://github.com/karpetrosyan/hishel/pull/359)
176
+ * chore: improve CI by @karpetrosyan in [#369](https://github.com/karpetrosyan/hishel/pull/369)
177
+ * feat: add support for a sans-IO API by @karpetrosyan in [#366](https://github.com/karpetrosyan/hishel/pull/366)
178
+ * Enhance documentation with donation link by @karpetrosyan in [#368](https://github.com/karpetrosyan/hishel/pull/368)
179
+ * Update README to include donation link by @karpetrosyan in [#367](https://github.com/karpetrosyan/hishel/pull/367)
180
+ * Added `Metadata` to public API by @jamesbraza in [#363](https://github.com/karpetrosyan/hishel/pull/363)
181
+ * Bump the python-packages group with 10 updates by @dependabot[bot] in [#354](https://github.com/karpetrosyan/hishel/pull/354)
182
+ * skip anysqlite, yaml and redis tests if optional deps are missing by @mmdbalkhi in [#348](https://github.com/karpetrosyan/hishel/pull/348)
183
+ * Don't bomb if directory creation races by @AstraLuma in [#353](https://github.com/karpetrosyan/hishel/pull/353)
184
+ * Cleanup module imports by @deathaxe in [#351](https://github.com/karpetrosyan/hishel/pull/351)
185
+
186
+ ## New Contributors
187
+ * @jamesbraza made their first contribution in [#379](https://github.com/karpetrosyan/hishel/pull/379)
188
+ * @GugNersesyan made their first contribution in [#375](https://github.com/karpetrosyan/hishel/pull/375)
189
+ * @mmdbalkhi made their first contribution in [#348](https://github.com/karpetrosyan/hishel/pull/348)
190
+ * @AstraLuma made their first contribution in [#353](https://github.com/karpetrosyan/hishel/pull/353)
191
+ * @deathaxe made their first contribution in [#351](https://github.com/karpetrosyan/hishel/pull/351)
192
+
193
+ **Full Changelog**: https://github.com/karpetrosyan/hishel/compare/0.1.3...0.1.4
194
+
195
+ <!-- generated by git-cliff -->
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hishel
3
- Version: 1.1.0
3
+ Version: 1.1.2
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,118 +406,198 @@ 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
- # Changelog
410
-
411
- All notable changes to this project will be documented in this file.
412
-
413
- ## 1.1.0 - 2025-10-31
414
- ### ⚙️ Miscellaneous Tasks
415
- - Add in memory example
416
-
417
- ### 🐛 Bug Fixes
418
- - Pass any response with non-expected status code on revalidation to client
419
-
420
- ### 🚀 Features
421
- - Allow setting storage base with via `database_path` for sqlite storage
422
-
423
- ## 1.0.0 - 2025-10-28
424
- ### ⚙️ Miscellaneous Tasks
425
- - Add examples, improve docs
426
-
427
- ## 1.0.0b1 - 2025-10-28
428
- ### ♻️ Refactoring
429
- - Add policies
430
-
431
- ### ⚙️ Miscellaneous Tasks
432
- - Improve sans-io diagram colors
433
- - Add graphql docs
434
-
435
- ### 🐛 Bug Fixes
436
- - Body-sensitive responses caching
437
- - Filter out `Transfer-Encoding` header for asgi responses
438
-
439
- ### 🚀 Features
440
- - Add global `use_body_key` setting
441
-
442
- ## 1.0.0.dev3 - 2025-10-26
443
- ### ♻️ Refactoring
444
- - Replace pairs with entries, simplify storage API
445
- - Automatically generate httpx sync integration from async
446
-
447
- ### ⚙️ Miscellaneous Tasks
448
- - Simplify metadata docs
449
- - Add custom integrations docs
450
- - More robust compressed response caching
451
-
452
- ### 🐛 Bug Fixes
453
- - Add missing permissions into `publish.yml`
454
- - Raise on consumed httpx streams, which we can't store as is (it's already decoded)
455
- - Fix compressed data caching for requests
456
- - Handle httpx iterable usage instead of iterator correctly
457
- - Add date header for proper age calculation
458
-
459
- ### 🚀 Features
460
- - Add integrations with fastapi and asgi
461
- - Add blacksheep integration examples
462
- - Add logging for asgi
463
-
464
- ## 1.0.0.dev2 - 2025-10-21
465
- ### ⚙️ Miscellaneous Tasks
466
- - Remove redundant utils and tests
467
- - Add import without extras check in ci
468
- - Fix time travel date, explicitly specify the timezone
469
-
470
- ### 🐛 Bug Fixes
471
- - Fix check for storing auth requests
472
- - Don't raise an error on 3xx during revalidation
473
-
474
- ### 🚀 Features
475
- - Add hishel_created_at response metadata
476
-
477
- ## 1.0.0.dev1 - 2025-10-21
478
- ### ⚙️ Miscellaneous Tasks
479
- - Remove some redundant utils methods
480
-
481
- ### 📦 Dependencies
482
- - Make httpx and async libs optional dependencies
483
- - Make `anysqlite` optional dependency
484
- - Install async extra with httpx
485
- - Improve git-cliff
486
-
487
- ## 1.0.0.dev0 - 2025-10-19
488
- ### ⚙️ Miscellaneous Tasks
489
- - Use mike powered versioning
490
- - Improve docs versioning, deploy dev doc on ci
491
-
492
- ## 0.1.5 - 2025-10-18
493
- ### ⚙️ Miscellaneous Tasks
494
- - Remove some redundant files from repo
495
-
496
- ### 🐛 Bug Fixes
497
- - Fix some line breaks
498
-
499
- ### 🚀 Features
500
- - Set chunk size to 128KB for httpx to reduce SQLite read/writes
501
- - Better cache-control parsing
502
- - Add close method to storages API (#384)
503
- - Increase requests buffer size to 128KB, disable charset detection
504
-
505
- ## 0.1.4 - 2025-10-14
506
- ### ⚙️ Miscellaneous Tasks
507
- - Improve CI (#369)
508
- - Remove src folder (#373)
509
- - Temporary remove python3.14 from CI
510
- - Add sqlite tests for new storage
511
- - Move some tests to beta
512
-
513
- ### 🐛 Bug Fixes
514
- - Create an sqlite file in a cache folder
515
- - Fix beta imports
516
-
517
- ### 🚀 Features
518
- - Add support for a sans-IO API (#366)
519
- - Allow already consumed streams with `CacheTransport` (#377)
520
- - Add sqlite storage for beta storages
521
- - Get rid of some locks from sqlite storage
522
- - Better async implemetation for sqlite storage
523
-
409
+ ## What's Changed in 1.1.2
410
+ * fix: respect shared option when excluding unstorable headers by @karpetrosyan
411
+ * fix: remove s-maxage consideration for private caches by @karpetrosyan
412
+ * fix: respect shared option when excluding unstorable headers by @jlopex in [#401](https://github.com/karpetrosyan/hishel/pull/401)
413
+ * fix: remove s-maxage consideration for private caches by @jlopex in [#400](https://github.com/karpetrosyan/hishel/pull/400)
414
+ * fix: ensure 304 responses don't leak by @karpetrosyan
415
+
416
+ ## New Contributors
417
+ * @jlopex made their first contribution in [#401](https://github.com/karpetrosyan/hishel/pull/401)
418
+
419
+ **Full Changelog**: https://github.com/karpetrosyan/hishel/compare/1.1.1...1.1.2
420
+
421
+ ## What's Changed in 1.1.1
422
+ * Revert "Revert "chore(deps): bump actions/upload-artifact from 4 to 5 "" by @karpetrosyan
423
+ * Revert "chore(deps): bump actions/download-artifact from 4 to 6 " by @karpetrosyan
424
+ * Revert "chore(deps): bump actions/upload-artifact from 4 to 5 " by @karpetrosyan
425
+ * update uv.lock by @karpetrosyan
426
+ * Version 1.1.1 by @karpetrosyan
427
+
428
+ **Full Changelog**: https://github.com/karpetrosyan/hishel/compare/1.1.0...1.1.1
429
+
430
+ ## What's Changed in 1.1.0
431
+ * Version 1.1.0 by @karpetrosyan
432
+ * fix: pass any response with non-expected status code on revalidation to client by @karpetrosyan
433
+ * fix: pass any response with non-expected status code on revalidation to client by @karpetrosyan
434
+ * feat: allow setting storage base with via `database_path` for sqlite storage by @karpetrosyan
435
+ * fix in memory example by @karpetrosyan
436
+ * chore: add in memory example by @karpetrosyan
437
+
438
+ **Full Changelog**: https://github.com/karpetrosyan/hishel/compare/1.0.0...1.1.0
439
+
440
+ ## What's Changed in 1.0.0
441
+ * Version 1.0.0 by @karpetrosyan
442
+ * chore(docs): add examples, improve docs by @karpetrosyan
443
+
444
+ **Full Changelog**: https://github.com/karpetrosyan/hishel/compare/1.0.0b1...1.0.0
445
+
446
+ ## What's Changed in 1.0.0b1
447
+ * Version 1.0.0b1 by @karpetrosyan
448
+ * improve docs by @karpetrosyan
449
+ * fix: filter out `Transfer-Encoding` header for asgi responses by @karpetrosyan
450
+ * fix body sensitive docs by @karpetrosyan
451
+ * refactor: add policies by @karpetrosyan
452
+ * chore(docs): add graphql docs by @karpetrosyan
453
+ * feat: add global `use_body_key` setting by @karpetrosyan
454
+ * chore(docs): improve sans-io diagram colors by @karpetrosyan
455
+ * fix: body-sensitive responses caching by @karpetrosyan
456
+ * mention body sensitive content caching by @karpetrosyan
457
+ * clean up roadmap by @karpetrosyan
458
+
459
+ **Full Changelog**: https://github.com/karpetrosyan/hishel/compare/1.0.0.dev3...1.0.0b1
460
+
461
+ ## What's Changed in 1.0.0.dev3
462
+ * Version 1.0.0.dev3 by @karpetrosyan
463
+ * fix ci by @karpetrosyan
464
+ * fix: add date header for proper age calculation by @karpetrosyan
465
+ * rename some methods by @karpetrosyan
466
+ * refactor: automatically generate httpx sync integration from async by @karpetrosyan
467
+ * change pairs to entries in some places by @karpetrosyan
468
+ * fix lint format by @karpetrosyan
469
+ * refactor: replace pairs with entries, simplify storage API by @karpetrosyan
470
+ * better docs by @karpetrosyan
471
+ * better custom integrations docs by @karpetrosyan
472
+ * more private by @karpetrosyan
473
+ * fix lint, make things private by @karpetrosyan
474
+ * dont fail if unasync rule was not used by @karpetrosyan
475
+ * chore: more robust compressed response caching by @karpetrosyan
476
+ * chore(docs): add custom integrations docs by @karpetrosyan
477
+ * feat: add logging for asgi by @karpetrosyan
478
+ * fix: handle httpx iterable usage instead of iterator correctly by @karpetrosyan
479
+ * feat: add blacksheep integration examples by @karpetrosyan
480
+ * Change note syntax for ASGI middleware by @karpetrosyan
481
+ * fix lint by @karpetrosyan
482
+ * feat: add integrations with fastapi and asgi by @karpetrosyan
483
+ * fix readme by @karpetrosyan
484
+ * add icon for introduction page by @karpetrosyan
485
+ * fix test by @karpetrosyan
486
+ * properly close resource by @karpetrosyan
487
+ * fix: fix compressed data caching for requests by @karpetrosyan
488
+ * fix: raise on consumed httpx streams, which we can't store as is (it's already decoded) by @karpetrosyan
489
+ * chore(docs): simplify metadata docs by @karpetrosyan
490
+ * fix: add missing permissions into `publish.yml` by @karpetrosyan
491
+
492
+ **Full Changelog**: https://github.com/karpetrosyan/hishel/compare/1.0.0.dev2...1.0.0.dev3
493
+
494
+ ## What's Changed in 1.0.0.dev2
495
+ * Version 1.0.0.dev2 by @karpetrosyan
496
+ * unasync by @karpetrosyan
497
+ * chore: fix time travel date, explicitly specify the timezone by @karpetrosyan
498
+ * fix: don't raise an error on 3xx during revalidation by @karpetrosyan
499
+ * chore: add import without extras check in ci by @karpetrosyan
500
+ * chore(internal): remove redundant utils and tests by @karpetrosyan
501
+ * feat: add hishel_created_at response metadata by @karpetrosyan
502
+ * fix: fix check for storing auth requests by @karpetrosyan
503
+ * better git-cliff by @karpetrosyan
504
+
505
+ **Full Changelog**: https://github.com/karpetrosyan/hishel/compare/1.0.0.dev1...1.0.0.dev2
506
+
507
+ ## What's Changed in 1.0.0.dev1
508
+ * Version 1.0.0.dev1 by @karpetrosyan
509
+ * fix changelog + uv lock by @karpetrosyan
510
+ * fix linting by @karpetrosyan
511
+ * chore(internal): remove some redundant utils methods by @karpetrosyan
512
+ * fix mike deploy by @karpetrosyan
513
+
514
+ **Full Changelog**: https://github.com/karpetrosyan/hishel/compare/1.0.0.dev0...1.0.0.dev1
515
+
516
+ ## What's Changed in 1.0.0.dev0
517
+ * fix publish.yml by @karpetrosyan
518
+ * fix format by @karpetrosyan
519
+ * prepare 1.0.0.dev0 release by @karpetrosyan
520
+ * improve `CacheOptions` docs by @karpetrosyan
521
+ * don't make release version latest by default by @karpetrosyan
522
+ * fix changelog by @karpetrosyan
523
+ * fix action permissions by @karpetrosyan
524
+ * improve docs introduction by @karpetrosyan
525
+ * better docs publishing, better project description by @karpetrosyan
526
+ * fix docs publishing by @karpetrosyan
527
+ * fix docs deploying by @karpetrosyan
528
+ * chore(docs): improve docs versioning, deploy dev doc on ci by @karpetrosyan
529
+ * fix unasync by @karpetrosyan
530
+ * fix unasync by @karpetrosyan
531
+ * fix unasync by @karpetrosyan
532
+ * Version 1.0.0.dev0 by @karpetrosyan
533
+ * chore(docs): use mike powered versioning by @karpetrosyan
534
+ * fix changelog by @karpetrosyan
535
+
536
+ **Full Changelog**: https://github.com/karpetrosyan/hishel/compare/0.1.5...1.0.0.dev0
537
+
538
+ ## What's Changed in 0.1.5
539
+ * Version 0.1.5 by @karpetrosyan in [#385](https://github.com/karpetrosyan/hishel/pull/385)
540
+ * feat(perf): increase requests buffer size to 128KB, disable charset detection by @karpetrosyan
541
+ * feat: add close method to storages API by @karpetrosyan in [#384](https://github.com/karpetrosyan/hishel/pull/384)
542
+ * fix headers by @karpetrosyan
543
+ * fix lint by @karpetrosyan
544
+ * ruff format by @karpetrosyan
545
+ * feat: better cache-control parsing by @karpetrosyan
546
+ * feat(perf): set chunk size to 128KB for httpx to reduce SQLite read/writes by @karpetrosyan
547
+ * fix(docs): fix some line breaks by @karpetrosyan
548
+ * chore: remove some redundant files from repo by @karpetrosyan
549
+
550
+ **Full Changelog**: https://github.com/karpetrosyan/hishel/compare/0.1.4...0.1.5
551
+
552
+ ## What's Changed in 0.1.4
553
+ * Version 0.1.4 by @karpetrosyan in [#381](https://github.com/karpetrosyan/hishel/pull/381)
554
+ * fix lint by @karpetrosyan
555
+ * more docs! by @karpetrosyan
556
+ * ensure connection is not stored by @karpetrosyan
557
+ * fix annotations by @karpetrosyan
558
+ * fix typing by @karpetrosyan
559
+ * format by @karpetrosyan
560
+ * more docs! more tests! by @karpetrosyan
561
+ * lot of fixes by @karpetrosyan
562
+ * remove redundant files by @karpetrosyan
563
+ * remove docs footer by @karpetrosyan
564
+ * fix: fix beta imports by @karpetrosyan
565
+ * uv lock by @karpetrosyan
566
+ * fix: create an sqlite file in a cache folder by @karpetrosyan
567
+ * better unasync by @karpetrosyan
568
+ * feat: better async implemetation for sqlite storage by @karpetrosyan
569
+ * feat: get rid of some locks from sqlite storage by @karpetrosyan
570
+ * chore(tests): move some tests to beta by @karpetrosyan
571
+ * fix tests by @karpetrosyan
572
+ * fix tests by @karpetrosyan
573
+ * fix lint by @karpetrosyan
574
+ * chore(tests): add sqlite tests for new storage by @karpetrosyan
575
+ * feat: add sqlite storage for beta storages by @karpetrosyan
576
+ * Adding `.venv` to `.gitignore` by @jamesbraza in [#379](https://github.com/karpetrosyan/hishel/pull/379)
577
+ * Revert "add ethical ads" by @karpetrosyan
578
+ * add ethical ads by @karpetrosyan
579
+ * feat: allow already consumed streams with `CacheTransport` by @jamesbraza in [#377](https://github.com/karpetrosyan/hishel/pull/377)
580
+ * chore(ci): fix lint script by @GugNersesyan in [#375](https://github.com/karpetrosyan/hishel/pull/375)
581
+ * chore(internal): temporary remove python3.14 from CI by @karpetrosyan
582
+ * chore(internal): remove src folder by @karpetrosyan in [#373](https://github.com/karpetrosyan/hishel/pull/373)
583
+ * New storage API by @karpetrosyan in [#359](https://github.com/karpetrosyan/hishel/pull/359)
584
+ * chore: improve CI by @karpetrosyan in [#369](https://github.com/karpetrosyan/hishel/pull/369)
585
+ * feat: add support for a sans-IO API by @karpetrosyan in [#366](https://github.com/karpetrosyan/hishel/pull/366)
586
+ * Enhance documentation with donation link by @karpetrosyan in [#368](https://github.com/karpetrosyan/hishel/pull/368)
587
+ * Update README to include donation link by @karpetrosyan in [#367](https://github.com/karpetrosyan/hishel/pull/367)
588
+ * Added `Metadata` to public API by @jamesbraza in [#363](https://github.com/karpetrosyan/hishel/pull/363)
589
+ * Bump the python-packages group with 10 updates by @dependabot[bot] in [#354](https://github.com/karpetrosyan/hishel/pull/354)
590
+ * skip anysqlite, yaml and redis tests if optional deps are missing by @mmdbalkhi in [#348](https://github.com/karpetrosyan/hishel/pull/348)
591
+ * Don't bomb if directory creation races by @AstraLuma in [#353](https://github.com/karpetrosyan/hishel/pull/353)
592
+ * Cleanup module imports by @deathaxe in [#351](https://github.com/karpetrosyan/hishel/pull/351)
593
+
594
+ ## New Contributors
595
+ * @jamesbraza made their first contribution in [#379](https://github.com/karpetrosyan/hishel/pull/379)
596
+ * @GugNersesyan made their first contribution in [#375](https://github.com/karpetrosyan/hishel/pull/375)
597
+ * @mmdbalkhi made their first contribution in [#348](https://github.com/karpetrosyan/hishel/pull/348)
598
+ * @AstraLuma made their first contribution in [#353](https://github.com/karpetrosyan/hishel/pull/353)
599
+ * @deathaxe made their first contribution in [#351](https://github.com/karpetrosyan/hishel/pull/351)
600
+
601
+ **Full Changelog**: https://github.com/karpetrosyan/hishel/compare/0.1.3...0.1.4
602
+
603
+ <!-- generated by git-cliff -->
@@ -174,6 +174,9 @@ class AsyncCacheTransport(httpx.AsyncBaseTransport):
174
174
  async def request_sender(self, request: Request) -> Response:
175
175
  httpx_request = _internal_to_httpx(request)
176
176
  httpx_response = await self.next_transport.handle_async_request(httpx_request)
177
+ if httpx_response.status_code == 304:
178
+ # 304 should not have a body, but we read it to ensure we'll not let the stream unconsumed
179
+ await httpx_response.aread()
177
180
  return _httpx_to_internal(httpx_response)
178
181
 
179
182
 
@@ -996,6 +996,7 @@ def exclude_unstorable_headers(response: Response, is_cache_shared: bool) -> Res
996
996
  def refresh_response_headers(
997
997
  stored_response: Response,
998
998
  revalidation_response: Response,
999
+ is_cache_shared: bool,
999
1000
  ) -> Response:
1000
1001
  """
1001
1002
  Updates a stored response's headers with fresh metadata from a 304 response.
@@ -1108,7 +1109,7 @@ def refresh_response_headers(
1108
1109
  stored_response,
1109
1110
  headers=Headers(new_headers),
1110
1111
  ),
1111
- is_cache_shared=True, # Assume shared cache for maximum safety
1112
+ is_cache_shared,
1112
1113
  )
1113
1114
 
1114
1115
 
@@ -1337,7 +1338,7 @@ class IdleClient(State):
1337
1338
  "A cache MUST NOT generate a stale response unless it is disconnected or
1338
1339
  doing so is explicitly permitted by the client or origin server."
1339
1340
  """
1340
- freshness_lifetime = get_freshness_lifetime(pair.response, is_cache_shared=True)
1341
+ freshness_lifetime = get_freshness_lifetime(pair.response, self.options.shared)
1341
1342
  age = get_age(pair.response)
1342
1343
 
1343
1344
  # Check freshness: response_is_fresh = (freshness_lifetime > current_age)
@@ -2245,7 +2246,7 @@ class NeedRevalidation(State):
2245
2246
  updating_entries=[
2246
2247
  replace(
2247
2248
  pair,
2248
- response=refresh_response_headers(pair.response, revalidation_response),
2249
+ response=refresh_response_headers(pair.response, revalidation_response, self.options.shared),
2249
2250
  )
2250
2251
  for pair in identified_for_revalidation
2251
2252
  ],
@@ -174,6 +174,9 @@ class SyncCacheTransport(httpx.BaseTransport):
174
174
  def request_sender(self, request: Request) -> Response:
175
175
  httpx_request = _internal_to_httpx(request)
176
176
  httpx_response = self.next_transport.handle_request(httpx_request)
177
+ if httpx_response.status_code == 304:
178
+ # 304 should not have a body, but we read it to ensure we'll not let the stream unconsumed
179
+ httpx_response.read()
177
180
  return _httpx_to_internal(httpx_response)
178
181
 
179
182
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "hishel"
7
- version = "1.1.0"
7
+ version = "1.1.2"
8
8
  dynamic = ["readme"]
9
9
  description = " Elegant HTTP Caching for Python"
10
10
  license = "BSD-3-Clause"
@@ -118,27 +118,27 @@ combine-as-imports = true
118
118
 
119
119
  [dependency-groups]
120
120
  dev = [
121
- "anyio==4.9.0",
121
+ "anyio==4.11.0",
122
122
  "anysqlite>=0.0.5",
123
- "coverage==7.10.1",
123
+ "coverage==7.10.7",
124
124
  "fastapi[standard]>=0.119.1",
125
- "hatch==1.14.1",
125
+ "hatch==1.15.1",
126
126
  "inline-snapshot>=0.28.0",
127
127
  "mike>=2.1.3",
128
128
  "mkdocs==1.6.1",
129
129
  "mkdocs-git-committers-plugin>=0.2.3",
130
130
  "mkdocs-git-revision-date-localized-plugin>=1.4.7",
131
- "mkdocs-material==9.6.16",
132
- "mypy==1.17.1",
131
+ "mkdocs-material==9.6.22",
132
+ "mypy==1.18.2",
133
133
  "pyright>=1.1.404",
134
- "pytest==8.4.1",
134
+ "pytest==8.4.2",
135
135
  "pytest-cov>=6.2.1",
136
136
  "pytest-icdiff>=0.9",
137
- "ruff==0.12.7",
137
+ "ruff==0.14.3",
138
138
  "time-machine>=2.19.0",
139
- "trio==0.30.0",
140
- "types-boto3==1.40.0",
141
- "types-pyyaml==6.0.12.20250516",
139
+ "trio==0.31.0",
140
+ "types-boto3==1.40.64",
141
+ "types-pyyaml==6.0.12.20250915",
142
142
  "types-requests>=2.31.0.6",
143
143
  "zipp>=3.19.1",
144
144
  ]
hishel-1.1.0/CHANGELOG.md DELETED
@@ -1,115 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- ## 1.1.0 - 2025-10-31
6
- ### ⚙️ Miscellaneous Tasks
7
- - Add in memory example
8
-
9
- ### 🐛 Bug Fixes
10
- - Pass any response with non-expected status code on revalidation to client
11
-
12
- ### 🚀 Features
13
- - Allow setting storage base with via `database_path` for sqlite storage
14
-
15
- ## 1.0.0 - 2025-10-28
16
- ### ⚙️ Miscellaneous Tasks
17
- - Add examples, improve docs
18
-
19
- ## 1.0.0b1 - 2025-10-28
20
- ### ♻️ Refactoring
21
- - Add policies
22
-
23
- ### ⚙️ Miscellaneous Tasks
24
- - Improve sans-io diagram colors
25
- - Add graphql docs
26
-
27
- ### 🐛 Bug Fixes
28
- - Body-sensitive responses caching
29
- - Filter out `Transfer-Encoding` header for asgi responses
30
-
31
- ### 🚀 Features
32
- - Add global `use_body_key` setting
33
-
34
- ## 1.0.0.dev3 - 2025-10-26
35
- ### ♻️ Refactoring
36
- - Replace pairs with entries, simplify storage API
37
- - Automatically generate httpx sync integration from async
38
-
39
- ### ⚙️ Miscellaneous Tasks
40
- - Simplify metadata docs
41
- - Add custom integrations docs
42
- - More robust compressed response caching
43
-
44
- ### 🐛 Bug Fixes
45
- - Add missing permissions into `publish.yml`
46
- - Raise on consumed httpx streams, which we can't store as is (it's already decoded)
47
- - Fix compressed data caching for requests
48
- - Handle httpx iterable usage instead of iterator correctly
49
- - Add date header for proper age calculation
50
-
51
- ### 🚀 Features
52
- - Add integrations with fastapi and asgi
53
- - Add blacksheep integration examples
54
- - Add logging for asgi
55
-
56
- ## 1.0.0.dev2 - 2025-10-21
57
- ### ⚙️ Miscellaneous Tasks
58
- - Remove redundant utils and tests
59
- - Add import without extras check in ci
60
- - Fix time travel date, explicitly specify the timezone
61
-
62
- ### 🐛 Bug Fixes
63
- - Fix check for storing auth requests
64
- - Don't raise an error on 3xx during revalidation
65
-
66
- ### 🚀 Features
67
- - Add hishel_created_at response metadata
68
-
69
- ## 1.0.0.dev1 - 2025-10-21
70
- ### ⚙️ Miscellaneous Tasks
71
- - Remove some redundant utils methods
72
-
73
- ### 📦 Dependencies
74
- - Make httpx and async libs optional dependencies
75
- - Make `anysqlite` optional dependency
76
- - Install async extra with httpx
77
- - Improve git-cliff
78
-
79
- ## 1.0.0.dev0 - 2025-10-19
80
- ### ⚙️ Miscellaneous Tasks
81
- - Use mike powered versioning
82
- - Improve docs versioning, deploy dev doc on ci
83
-
84
- ## 0.1.5 - 2025-10-18
85
- ### ⚙️ Miscellaneous Tasks
86
- - Remove some redundant files from repo
87
-
88
- ### 🐛 Bug Fixes
89
- - Fix some line breaks
90
-
91
- ### 🚀 Features
92
- - Set chunk size to 128KB for httpx to reduce SQLite read/writes
93
- - Better cache-control parsing
94
- - Add close method to storages API (#384)
95
- - Increase requests buffer size to 128KB, disable charset detection
96
-
97
- ## 0.1.4 - 2025-10-14
98
- ### ⚙️ Miscellaneous Tasks
99
- - Improve CI (#369)
100
- - Remove src folder (#373)
101
- - Temporary remove python3.14 from CI
102
- - Add sqlite tests for new storage
103
- - Move some tests to beta
104
-
105
- ### 🐛 Bug Fixes
106
- - Create an sqlite file in a cache folder
107
- - Fix beta imports
108
-
109
- ### 🚀 Features
110
- - Add support for a sans-IO API (#366)
111
- - Allow already consumed streams with `CacheTransport` (#377)
112
- - Add sqlite storage for beta storages
113
- - Get rid of some locks from sqlite storage
114
- - Better async implemetation for sqlite storage
115
-
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