-
Notifications
You must be signed in to change notification settings - Fork 26
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
The problem
Process will hang until instance of SQLiteBackend is closed. More specifically, the process will hang until the SQLiteBackend's responses: SQLitePickleCache and redirects: SQLiteCache instance variables are closed. Note, Ive not tested this on other backends.
Expected behavior
Process will exit without explicit close of SQLiteBackend.
Steps to reproduce the behavior
import asyncio
from aiohttp_client_cache import CachedSession, SQLiteBackend
async def hangs_forever():
cache = SQLiteBackend("test_cache")
async with CachedSession(cache=cache) as session:
await session.get("http://httpbin.org/delay/1")
# await cache.close()
if __name__ == "__main__":
asyncio.run(hangs_forever())Workarounds
The only workaround ive found thus far is to explicitly close the SQLiteBackend cache instance (e.g. await cache.close()).
Environment
- aiohttp-client-cache version: [e.g.
0.8.2] - Python version: [e.g.
3.9] - Platform: [e.g. macOS Ventura 13.4.1 arm64]
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working