Skip to content

freezebase 0.4.0

Choose a tag to compare

@lqgentner lqgentner released this 17 Aug 12:30
· 33 commits to main since this release

Added

  • HTTPDownloader.close() and context-manager support, which close the
    downloader's session and release its pooled connections. Creating one
    downloader per download previously held a connection open until the garbage
    collector ran, which made downstream test suites fail unpredictably. The
    session is also closed on garbage collection as a fallback.

Changed

  • Breaking: HTTPDownloader no longer forwards arbitrary keyword arguments
    to requests. method and timeout are now named parameters and are spelled
    exactly as before, so calls that only used those keep working; method is
    restricted to "GET" and "POST". Any other requests keyword, such as
    params or headers, now raises TypeError instead of reaching the request.
    To configure the transport, for example a connection pool size, mount an
    adapter on HTTPDownloader.session.