Repository navigation
Releases: tklecka/pygeosphere-warnings
Release list
v0.1.2
v0.1.1
Fixed
aiohttp responses are now released on every error path.
_request handed back a bare ClientResponse, so an early raise — the 404 in get_warnings_for_coords, the status check in _parse_json — left the response unreleased. aiohttp only returns a connection to the pool by itself once the payload reaches EOF, so an error raised while the body is still in flight held the connector slot for as long as the caller kept the exception, whose traceback pins the response. A Home Assistant coordinator storing last_exception does exactly that, and enough failing entries could exhaust a shared session's connection pool.
_request is now an async context manager that wraps the response in async with, releasing it on every exit path including caller exceptions. Transport error handling stays outside the yield, so caller exceptions are not relabelled as GeoSphereConnectionError.
No API changes. _request is private; get_last_modified, get_warnings_for_coords and get_thunderstorms keep their signatures and exception behaviour.
Full changelog: v0.1.0...v0.1.1
v0.1.0
Full Changelog: https://github.com/tklecka/pygeosphere-warnings/commits/v0.1.0