tawilkinson / boardgamebot

A Discord.py bot that fetches board game data
7 stars 0 forks source link

Update requests_cache to 0.6.3 #76

Closed pyup-bot closed 3 years ago

pyup-bot commented 3 years ago

This PR updates requests_cache from 0.5.2 to 0.6.3.

Changelog ### 0.6.3 ``` * Fix false positive warning with `include_get_headers` * Fix handling of `decode_content` parameter for `CachedResponse.raw.read()` * Replace deprecated pymongo `Collection.count()` with `estimated_document_count()` ``` ### 0.6.2 ``` * Explicitly include docs, tests, and examples in sdist ``` ### 0.6.1 ``` * Handle errors due to invalid responses in `BaseCache.urls` * Add recently renamed `BaseCache.remove_old_entries()` back, as an alias with a DeprecationWarning * Make parent dirs for new SQLite databases * Add `aws_access_key_id` and `aws_secret_access_key` kwargs to `DynamoDbDict` * Update `GridFSPickleDict.__delitem__` to raise a KeyError for missing items * Demote most `logging.info` statements to debug level * Exclude test directory from `find_packages()` * Make integration tests easier to run and/or fail more quickly in environments where Docker isn't available ``` ### 0.6.0 ``` [See all included issues and PRs](https://github.com/reclosedev/requests-cache/milestone/1?closed=1) Thanks to [Code Shelter](https://www.codeshelter.co) and [contributors](https://requests-cache.readthedocs.io/en/latest/contributors.html) for making this release possible! Serialization **Note:** Due to the following changes, responses cached with previous versions of requests-cache will be invalid. These **old responses will be treated as expired**, and will be refreshed the next time they are requested. They can also be manually converted or removed, if needed (see notes below). * Add [example script](https://github.com/reclosedev/requests-cache/blob/master/examples/convert_cache.py) to convert an existing cache from previous serialization format to new one * When running `remove_expired_responses()`, also remove responses that are invalid due to updated serialization format * Add `CachedResponse` class to wrap cached `requests.Response` objects, which makes additional cache information available to client code * Add `CachedHTTPResponse` class to wrap `urllib3.response.HTTPResponse` objects, available via `CachedResponse.raw` * Re-construct the raw response on demand to avoid storing extra data in the cache * Improve emulation of raw request behavior used for iteration, streaming requests, etc. * Add `BaseCache.urls` property to get all URLs persisted in the cache * Add optional support for `itsdangerous` for more secure serialization Cache Expiration * Cached responses are now stored with an absolute expiration time, so `CachedSession.expire_after` no longer applies retroactively. To revalidate previously cached items with a new expiration time, see below: * Add support for overriding original expiration (i.e., revalidating) in `CachedSession.remove_expired_responses()` * Add support for setting expiration for individual requests * Add support for setting expiration based on URL glob patterns * Add support for setting expiration as a `datetime` * Add support for explicitly disabling expiration with `-1` (Since `None` may be ambiguous in some cases) Backends * SQLite: Allow passing user paths (`~/path-to-cache`) to database file with `db_path` param * SQLite: Add `timeout` parameter * Make default table names consistent across backends (`'http_cache'`) Bugfixes * Fix caching requests with data specified in `json` parameter * Fix caching requests with `verify` parameter * Fix duplicate cached responses due to some unhandled variations in URL format * To support this, the `url-normalize` library has been added to dependencies * Fix usage of backend-specific params when used in place of `cache_name` * Fix potential TypeError with `DbPickleDict` initialization * Fix usage of `CachedSession.cache_disabled` if used within another contextmanager * Fix non-thread-safe iteration in `BaseCache` * Fix `get_cache()`, `clear()`, and `remove_expired_responses()` so they will do nothing if requests-cache is not installed * Update usage of deprecated MongoClient `save()` method * Replace some old bugs with new and different bugs, just to keep life interesting General * Drop support for python <= 3.5 * Add `CacheMixin` class to make the features of `CachedSession` usable as a mixin class, for [compatibility with other requests-based libraries](https://requests-cache.readthedocs.io/en/latest/advanced_usage.html#library-compatibility). * Add `HEAD` to default `allowable_methods` Docs & Tests * Add type annotations to main functions/methods in public API, and include in documentation on [readthedocs](https://requests-cache.readthedocs.io/en/latest/) * Add [Contributing Guide](https://requests-cache.readthedocs.io/en/latest/contributing.html), [Security](https://requests-cache.readthedocs.io/en/latest/security.html) info, and more examples & detailed usage info in [User Guide](https://requests-cache.readthedocs.io/en/latest/user_guide.html) and [Advanced Usage](https://requests-cache.readthedocs.io/en/latest/advanced_usage.html) sections. * Increase test coverage and rewrite most tests using pytest * Add containerized backends for both local and CI integration testing ----- ```
Links - PyPI: https://pypi.org/project/requests-cache - Changelog: https://pyup.io/changelogs/requests-cache/ - Repo: https://github.com/reclosedev/requests-cache