Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency requests_cache to v0.9.8 #163

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jul 7, 2021

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
requests_cache (changelog) ==0.6.4 -> ==0.9.8 age adoption passing confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

requests-cache/requests-cache (requests_cache)

v0.9.8

Compare Source

  • Fix DeprecationWarning raised by BaseCache.urls
  • Reword ambiguous log message for BaseCache.delete

Backport fixes from 1.0:

  • For custom serializers, handle using a cattrs converter that doesn't support omit_if_default
  • Raise an error for invalid expiration string values (except for headers containing httpdates)

v0.9.7

Compare Source

Backport compatibility fixes from 1.0:

  • PyInstaller: Fix potential AttributeError due to undetected imports when requests-cache is bundled in a PyInstaller package
  • requests-oauthlib: Add support for header values as bytes for compatibility with OAuth1 features
  • cattrs: Add compatibility with cattrs 22.2
  • python: Add tests to ensure compatibility with python 3.11
  • Fix AttributeError when attempting to unpickle a CachedSession object, and instead disable pickling by raising a NotImplementedError

Add the following for forwards-compatibility with 1.0:

  • DeprecationWarnings to give an earlier notice for methods deprecated (not removed) in 1.0
  • requests_cache.policy subpackage (will replace requests_cache.cache_control module)
  • BaseCache.contains()
  • BaseCache.delete()
  • BaseCache.filter()
  • CachedSession.settings

v0.9.6

Compare Source

Backport fixes from 1.0:

  • Remove potentially problematic row count from BaseCache.__str__()
  • Remove upper version constraints for all non-dev dependencies
  • Make dependency specification consistent between PyPI and Conda-Forge packages

v0.9.5

Compare Source

Backport fixes from 1.0:

  • Fix usage of memory backend with install_cache()
  • Add CachedRequest.path_url property
  • Add compatibility with cattrs 22.1

v0.9.4

Compare Source

Backport fixes from 1.0:

  • Fix forwarding connection parameters passed to RedisCache for redis-py 4.2 and python <=3.8
  • Fix forwarding connection parameters passed to MongoCache for pymongo 4.1 and python <=3.8

v0.9.3

Compare Source

  • Fix handling BSON serializer differences between pymongo's bson and standalone bson codec.
  • Handle CorruptGridFile error in GridFS backend
  • Fix cache path expansion for user directories (~/...) for SQLite and filesystem backends
  • Fix request normalization for request body with a list as a JSON root
  • Skip normalizing a JSON request body if it's excessively large (>10MB) due to performance impact
  • Fix some thread safety issues:
    • Fix race condition in SQLite backend with dropping and recreating tables in multiple threads
    • Fix race condition in filesystem backend when one thread deletes a file after it's opened but
      before it is read by a different thread
    • Fix multiple race conditions in GridFS backend

v0.9.2

Compare Source

  • Fix serialization in filesystem backend with binary content that is also valid UTF-8
  • Fix some regression bugs introduced in 0.9.0:
    • Add support for params as a positional argument to CachedSession.request()
    • Add support for disabling expiration for a single request with CachedSession.request(..., expire_after=-1)

v0.9.1

Compare Source

  • Add support for python 3.10.2 and 3.9.10 (regarding resolving ForwardRef types during deserialization)
  • Add support for key-only request parameters (regarding hashing request data for cache key creation)
  • Reduce verbosity of log messages when encountering an invalid JSON request body

v0.9.0

Compare Source

See all issues and PRs for 0.9

🕗 Expiration & headers:

  • Use Cache-Control request headers by default
  • Add support for Cache-Control: immutable
  • Add support for immediate expiration + revalidation with Cache-Control: max-age=0 and Expires: 0
  • Reset expiration for cached response when a 304 Not Modified response is received
  • Support expire_after param for CachedSession.send()

💾 Backends:

  • Filesystem:
    • Add better error message if parent path exists but isn't a directory
  • Redis:
    • Add optional integration with Redis TTL to improve performance for removing expired responses
    • This is enabled by default, but may be disabled
  • SQLite:
    • Add better error message if parent path exists but isn't a directory

🚀 Performance:

  • Fix duplicate read operation for checking whether to read from redirects cache
  • Skip unnecessary contains check if a key is in the main responses cache
  • Make per-request expiration thread-safe for both CachedSession.request() and CachedSession.send()
  • Some micro-optimizations for request matching

🪲 Bugfixes:

  • Fix regression bug causing headers used for cache key to not guarantee sort order
  • Handle some additional corner cases when normalizing request data
  • Add support for BaseCache keyword arguments passed along with a backend instance
  • Fix issue with cache headers not being used correctly if cache_control=True is used with an expire_after value
  • Fix license metadata as shown on PyPI
  • Fix CachedResponse serialization behavior when using stdlib pickle in a custom serializer
0.8.1 (2021-09-15)
  • Redact ignored_parameters from CachedResponse.url (if used for credentials or other sensitive info)
  • Fix an incorrect debug log message about skipping cache write
  • Add some additional aliases for DbDict, etc. so fully qualified imports don't break

v0.8.1

Compare Source

  • Redact ignored_parameters from CachedResponse.url (if used for credentials or other sensitive info)
  • Fix an incorrect debug log message about skipping cache write
  • Add some additional aliases for DbDict, etc. so fully qualified imports don't break

v0.8.0

Compare Source

See all issues and PRs for 0.8

🕗 Expiration & headers:

  • Add support for conditional requests and cache validation using:
    • ETag + If-None-Match headers
    • Last-Modified + If-Modified-Since headers
    • 304 Not Modified responses
  • If a cached response is expired but contains a validator, a conditional request will by sent, and a new response will be cached and returned only if the remote content has not changed

💾 Backends:

  • Filesystem:
    • Add FileCache.cache_dir wrapper property
    • Add FileCache.paths() method
    • Add use_cache_dir option to use platform-specific user cache directory
    • Return pathlib.Path objects for all file paths
    • Use shorter hashes for file names
  • SQLite:
    • Add SQLiteCache.db_path wrapper property
    • Add use_memory option and support for in-memory databases
    • Add use_cache_dir option to use platform-specific user cache directory
    • Return pathlib.Path objects for all file paths

🚀 Performance:

  • Use cattrs by default for optimized serialization
  • Slightly reduce size of serialized responses

↔️ Request matching:

  • Allow create_key() to optionally accept parameters for requests.Request instead of a request object
  • Allow match_headers to optionally accept a list of specific headers to match
  • Add support for custom cache key callbacks with key_fn parameter
  • By default use blake2 instead of sha256 for generating cache keys

ℹ️ Cache convenience methods:

  • Add BaseCache.update() method as a shortcut for exporting to a different cache instance
  • Allow BaseCache.has_url() and delete_url() to optionally take parameters for requests.Request instead of just a URL

📦 Dependencies:

  • Add appdirs as a dependency for easier cross-platform usage of user cache directories
  • Update cattrs from optional to required dependency
  • Update itsdangerous from required to optional (but recommended) dependency
  • Require requests 2.22+ and urllib3 1.25.5+

⚠️ Backwards-compatible API changes:

The following changes are meant to make certain behaviors more obvious for new users, without breaking existing usage:

  • For consistency with Cache-Control: stale-if-error, rename old_data_on_error to stale_if_error
    • Going forward, any new options based on a standard HTTP caching feature will be named after that feature
  • For clarity about matching behavior, rename include_get_headers to match_headers
    • References in the docs to cache keys and related behavior are now described as 'request matching'
  • For consistency with other backends, rename SQLite backend classes: backends.sqlite.Db* -> SQLiteCache, SQLiteDict, SQLitePickleDict
  • Add aliases for all previous parameter/class names for backwards-compatibility

⚠️ Deprecations & removals:

  • Drop support for python 3.6
  • Remove deprecated core module
  • Remove deprecated BaseCache.remove_old_entries() method

0.7.5 (2021-09-15)
  • Fix incorrect location of redirects.sqlite when using filesystem backend
  • Fix issue in which redirects.sqlite would get included in response paths with filesystem backend
  • Add aliases for forwards-compatibility with 0.8+
  • Backport fixes from 0.8.1
0.7.4 (2021-08-16)
  • Fix an issue with httpdate strings from Expires headers not getting converted to UTC
  • Fix a packaging issue with extra files added to top-level wheel directory
  • Fix some issues with parallelizing tests using pytest-xdist
0.7.3 (2021-08-10)
  • SQLite backend:
    • Update DbCache.clear() to succeed even if the database is corrupted
    • Update DbDict.bulk_delete() to split the operation into multiple statements to support deleting more items than SQLite's variable limit (999)
  • Filesystem backend:
    • When using JSON serializer, pretty-print JSON by default
    • Add an appropriate file extension to cache files (.json, .yaml, .pkl, etc.) by default; can be overridden or disabled with the extension parameter.
  • Add a BaseCache.delete_urls() method to bulk delete multiple responses from the cache based on
    request URL
0.7.2 (2021-07-21)
  • Add support for Response.next (to get the next request in a redirect chain) when 302 responses are cached directly
  • Add a CachedResponse.cache_key attribute
  • Make CachedResponse a non-slotted class to allow client code to set arbitrary attributes on it
0.7.1 (2021-07-09)
  • Fix a bug in which Cache-Control headers would be used unexpectedly

v0.7.5

Compare Source

  • Fix incorrect location of redirects.sqlite when using filesystem backend
  • Fix issue in which redirects.sqlite would get included in response paths with filesystem backend
  • Add aliases for forwards-compatibility with 0.8+
  • Backport fixes from 0.8.1

v0.7.4

Compare Source

  • Fix an issue with httpdate strings from Expires headers not getting converted to UTC
  • Fix a packaging issue with extra files added to top-level wheel directory
  • Fix some issues with parallelizing tests using pytest-xdist

v0.7.3

Compare Source

  • SQLite backend:
    • Update DbCache.clear() to succeed even if the database is corrupted
    • Update DbDict.bulk_delete() to split the operation into multiple statements to support deleting more items than SQLite's variable limit (999)
  • Filesystem backend:
    • When using JSON serializer, pretty-print JSON by default
    • Add an appropriate file extension to cache files (.json, .yaml, .pkl, etc.) by default; can be overridden or disabled with the extension parameter.
  • Add a BaseCache.delete_urls() method to bulk delete multiple responses from the cache based on
    request URL

v0.7.2

Compare Source

  • Add support for Response.next (to get the next request in a redirect chain) when 302 responses are cached directly
  • Add a CachedResponse.cache_key attribute
  • Make CachedResponse a non-slotted class to allow client code to set arbitrary attributes on it

v0.7.1

Compare Source

  • Fix a bug in which Cache-Control headers would be used unexpectedly

v0.7.0

Compare Source

See all issues and PRs for 0.7

🕗 Expiration & headers:

  • Add optional support for the following request headers:
    • Cache-Control: max-age
    • Cache-Control: no-cache
    • Cache-Control: no-store
  • Add optional support for the following response headers:
    • Cache-Control: max-age
    • Cache-Control: no-store
    • Expires
  • Add cache_control option to CachedSession to enable setting expiration with cache headers
  • Add support for HTTP timestamps (RFC 5322) in expire_after parameters
  • Add support for bypassing the cache if expire_after=0
  • Add support for making a cache allowlist using URL patterns

💾 Backends:

  • Add a filesystem backend that stores responses as local files
  • DynamoDB:
    • Fix DynamoDbDict.__iter__ to return keys instead of values
    • Accept connection arguments for boto3.resource
  • MongoDB:
    • Remove usage of deprecated pymongo Collection.find_and_modify()
    • Accept connection arguments for pymongo.MongoClient
  • Redis:
    • Accept connection arguments for redis.Redis
  • SQLite:
    • Use persistent thread-local connections, and improve performance for bulk operations
    • Add use_temp option to store files in a temp directory
    • Accept connection arguments for sqlite3.connect

💾 Serialization:

  • Add data models for all serialized objects
  • Add a JSON serializer
  • Add a YAML serializer
  • Add a BSON serializer
  • Add optional support for cattrs
  • Add optional support for ultrajson

↔️ Request matching:

  • Add support for caching multipart form uploads
  • Update ignored_parameters to also exclude ignored request params, body params, or headers from cached response data (to avoid storing API keys or other credentials)
  • Update old_data_on_error option to also handle error response codes
  • Only log request exceptions if old_data_on_error is set

ℹ️ Convenience methods:

  • Add option to manually cache response objects with BaseCache.save_response()
  • Add BaseCache.keys() and values() methods
  • Add BaseCache.response_count() method to get an accurate count of responses (excluding invalid and expired)
  • Show summarized response details with str(CachedResponse)
  • Add more detailed repr methods for CachedSession, CachedResponse, and BaseCache
  • Update BaseCache.urls to only skip invalid responses, not delete them (for better performance)

📦 Dependencies:

  • Add minimum requests version of 2.17
  • Add attrs as a dependency for improved serialization models
  • Add cattrs as an optional dependency
  • Add some package extras to install optional dependencies (via pip install):
    • requests-cache[all] (to install everything)
    • requests-cache[bson]
    • requests-cache[json]
    • requests-cache[dynamodb]
    • requests-cache[mongodb]
    • requests-cache[redis]

📦 Compatibility and packaging:

  • requests-cache is now fully typed and PEP-561 compliant
  • Fix some compatibility issues with requests 2.17 and 2.18
  • Run pre-release tests for each supported version of requests
  • Packaging is now managed by Poetry
    • For users, installation still works the same.
    • For developers, see Contributing Guide for details

0.6.4 (2021-06-04)
  • Fix a bug in which filter_fn() would get called on response.request instead of response
0.6.3 (2021-04-21)
  • 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 (2021-04-14)
  • Explicitly include docs, tests, and examples in sdist
0.6.1 (2021-04-13)
  • 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

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot changed the title Update dependency requests_cache to v0.7.0 Update dependency requests_cache to v0.7.1 Jul 10, 2021
@renovate renovate bot force-pushed the renovate/requests_cache-0.x branch from 12dc975 to 20aeeb7 Compare July 10, 2021 01:35
@renovate renovate bot changed the title Update dependency requests_cache to v0.7.1 Update dependency requests_cache to v0.7.2 Jul 21, 2021
@renovate renovate bot force-pushed the renovate/requests_cache-0.x branch from 20aeeb7 to e440aa4 Compare July 21, 2021 14:38
@renovate renovate bot force-pushed the renovate/requests_cache-0.x branch from e440aa4 to 2d4a62a Compare October 18, 2021 21:13
@renovate renovate bot changed the title Update dependency requests_cache to v0.7.2 Update dependency requests_cache to v0.8.1 Oct 18, 2021
@renovate renovate bot force-pushed the renovate/requests_cache-0.x branch from 2d4a62a to ac9d5fb Compare March 7, 2022 09:26
@renovate renovate bot changed the title Update dependency requests_cache to v0.8.1 Update dependency requests_cache to v0.9.3 Mar 7, 2022
@renovate renovate bot force-pushed the renovate/requests_cache-0.x branch from ac9d5fb to 612e1ca Compare April 24, 2022 23:12
@renovate renovate bot changed the title Update dependency requests_cache to v0.9.3 Update dependency requests_cache to v0.9.4 Apr 24, 2022
@renovate renovate bot force-pushed the renovate/requests_cache-0.x branch from 612e1ca to ef0768e Compare September 25, 2022 20:11
@renovate renovate bot changed the title Update dependency requests_cache to v0.9.4 Update dependency requests_cache to v0.9.6 Sep 25, 2022
@renovate renovate bot force-pushed the renovate/requests_cache-0.x branch from ef0768e to f997d9b Compare November 20, 2022 15:42
@renovate renovate bot changed the title Update dependency requests_cache to v0.9.6 Update dependency requests_cache to v0.9.7 Nov 20, 2022
@renovate renovate bot force-pushed the renovate/requests_cache-0.x branch from f997d9b to 2908150 Compare March 18, 2023 12:08
@renovate renovate bot changed the title Update dependency requests_cache to v0.9.7 Update dependency requests_cache to v0.9.8 Mar 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants