summaryrefslogtreecommitdiff
path: root/docs/conf.py
diff options
context:
space:
mode:
authorSebastian Höffner <info@sebastian-hoeffner.de>2021-03-06 01:29:06 +0100
committerGitHub <noreply@github.com>2021-03-05 18:29:06 -0600
commit7632de7c457bebf26b7503c8f7be3693b179b077 (patch)
tree1a07a5e00131f17b76162b770146dfa140e7e367 /docs/conf.py
parentf538a49d89c441528973a8aa70b1e6ed3ae10c33 (diff)
downloadrequests-cache-7632de7c457bebf26b7503c8f7be3693b179b077.tar.gz
Add individual expire_after per request. (#177)
* Add individual expire_after per request. This commit adds a new feature to allow individual expire_after times per request. It involves using a custom CachedSession, PerRequestCachedSession, to be used as the session_factory. * Replace deprecated asserts in unit tests Additionally, some sockets are closed even on test failures. This removes some visual clutter when going through the results. * Update docs and README for per-request caching * Remove per_request and integrate behavior into CachedSession * Make test_return_old_data_on_error more reliable This is achieved by using a fixed date and mocking the backend calls to datetime as well. * Adjust per_request cache to new behavior Also adds HTTPBIN_URL environment variable as in test_cache * Add tests for the function determining the expiration datetime * Adjust backend to store expiration dates This also involves slightly different semantics for deletion, but the behavior stays the same. * Minor: black and isort * Update docs for request Add explanation for expire_after special cases, i.e. 'default' and 'cached' and how precedences are handled * Replace assert statements with methods * Remove invalid snippet from README * Remove invalid sentence from docs. * Make expires_before timezone-aware once And combine the checks for expiration * Simplify complexity by removing 'cached' keyword for expire_after
Diffstat (limited to 'docs/conf.py')
-rw-r--r--docs/conf.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 14fea4f..d152386 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -32,6 +32,7 @@ extensions = [
# Enable automatic links to other projects' Sphinx docs
intersphinx_mapping = {
+ 'python': ('https://docs.python.org/3', None),
'requests': ('https://requests.readthedocs.io/en/master/', None),
}