Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- uses: supercharge/mongodb-github-action@1.12.1
with:
mongodb-version: '5.0'
- uses: supercharge/redis-github-action@1.8.1
- uses: supercharge/redis-github-action@v2
with:
redis-version: '6'
- uses: rrainn/dynamodb-action@v4.0.0
Expand Down
4 changes: 4 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# History

## 0.14.3 (2026-01-07)

- Fix compatibility with aiosqlite 0.22.1+

## 0.14.2 (2025-10-30)

- Fixed `include_headers` to apply to `CachedSession.headers`
Expand Down
10 changes: 6 additions & 4 deletions aiohttp_client_cache/backends/sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,15 @@ def __del__(self):
"""If the aiosqlite connection is still open when this object is deleted, force its thread
to close by stopping its internal queue. This is basically a last resort to avoid hanging
the application if this backend is used without the CachedSession contextmanager.

Note: Since this uses internal attributes, it has the potential to break in future versions
of aiosqlite.
"""
if self._connection is not None:
try:
self._connection._stop_running()
# aiosqlite >= 0.22.1
if hasattr(self._connection, 'stop'):
self._connection.stop()
# aiosqlite <= 0.22.0
else:
self._connection._stop_running()
except (AttributeError, TypeError):
logger.warning('Could not close SQLite connection thread', exc_info=True)
self._connection = None
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "aiohttp-client-cache"
version = "0.14.2"
version = "0.14.3"
description = "Persistent cache for aiohttp requests"
authors = [{name = "Jordan Cook"}, {name = "Alessio Locatelli"}]
license = {text = "MIT License"}
Expand Down
2 changes: 1 addition & 1 deletion test/integration/test_sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ async def test_failed_thread_close(self):
async with self.init_cache(self.storage_class) as cache:
async with cache.get_connection():
pass
with patch.object(aiosqlite.Connection, '_stop_running', side_effect=AttributeError):
with patch.object(aiosqlite.Connection, 'stop', side_effect=AttributeError):
del cache

# TODO: Tests for unimplemented features
Expand Down
Loading