From ef32376a4b1001a316eb87ce9e708630ccd7bfd9 Mon Sep 17 00:00:00 2001 From: Jordan Cook Date: Tue, 13 Dec 2022 16:27:16 -0600 Subject: Update to flake8 v6 --- .pre-commit-config.yaml | 10 +++++----- HISTORY.md | 4 ++-- setup.cfg | 15 ++++++++++----- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 438183a..6eb48f0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v4.4.0 hooks: - id: check-toml - id: check-yaml @@ -9,20 +9,20 @@ repos: - id: mixed-line-ending - id: trailing-whitespace - repo: https://github.com/psf/black - rev: 22.6.0 + rev: 22.10.0 hooks: - id: black - repo: https://github.com/timothycrosley/isort rev: 5.10.1 hooks: - id: isort - - repo: https://gitlab.com/pycqa/flake8 - rev: 3.9.2 + - repo: https://github.com/pycqa/flake8 + rev: 6.0.0 hooks: - id: flake8 additional_dependencies: [flake8-comprehensions] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.971 + rev: v0.982 hooks: - id: mypy files: requests_cache diff --git a/HISTORY.md b/HISTORY.md index 040c0f1..7737f56 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -142,7 +142,7 @@ If you encounter a problem not listed here after updating to 1.0, please create * Internal utility module changes: * The `cache_control` module (added in `0.7`) has been split up into multiple modules in a new `policy` subpackage -## 0.9.7 (2022-10-26) +### 0.9.7 (2022-10-26) 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 @@ -158,7 +158,7 @@ Add the following for forwards-compatibility with 1.0: * `BaseCache.filter()` * `CachedSession.settings` -## 0.9.6 (2022-08-24) +### 0.9.6 (2022-08-24) Backport fixes from 1.0: * Remove potentially problematic row count from `BaseCache.__str__()` * Remove upper version constraints for all non-dev dependencies diff --git a/setup.cfg b/setup.cfg index 5a88bef..843f922 100644 --- a/setup.cfg +++ b/setup.cfg @@ -4,8 +4,13 @@ select = E,F,W,C4,C90 exclude = __pycache__,.tox,.venv,build,dist # Defer these rules to black: ignore = - E203 # whitespace before ':' - E225 # missing whitespace around operator - E501 # line too long - W503 # line break before binary operator - W504 # line break after binary operator + # whitespace before ':' + E203 + # missing whitespace around operator + E225 + # line too long + E501 + # line break before binary operator + W503 + # line break after binary operator + W504 -- cgit v1.2.1 From eec5160cb2714fb9a5982def531185033ed1fb64 Mon Sep 17 00:00:00 2001 From: Jordan Cook Date: Sun, 4 Dec 2022 11:40:47 -0600 Subject: Add a couple more project links on PyPI --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 51a78a7..e56557c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,10 @@ include = [ {format="sdist", path="tests"}, ] +[tool.poetry.urls] +"Changelog" = "https://requests-cache.readthedocs.io/en/stable/project_info/history.html" +"Issues" = "https://github.com/requests-cache/requests-cache/issues" + [tool.poetry.dependencies] python = "^3.7" # requests requires python >=3.7, <4.0 -- cgit v1.2.1 From a23bbd8a5da0e0f7ffd548e18d53000198836700 Mon Sep 17 00:00:00 2001 From: Jordan Cook Date: Sun, 4 Dec 2022 11:45:35 -0600 Subject: Minor edits for cache inspection page --- docs/user_guide/inspection.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/user_guide/inspection.md b/docs/user_guide/inspection.md index 9f9991e..339afba 100644 --- a/docs/user_guide/inspection.md +++ b/docs/user_guide/inspection.md @@ -94,8 +94,13 @@ You can use {py:meth}`.BaseCache.urls` to see all URLs currently in the cache: ['https://httpbin.org/get', 'https://httpbin.org/stream/100'] ``` +### Other response details If needed, you can access all responses via `CachedSession.cache.responses`, which is a dict-like -interface to the cache backend. For example, if you wanted to to see all URLs requested with a specific method: +interface to the cache backend, where: +* Keys are cache keys (a hash of matched request information) +* Values are {py:class}`.CachedResponse` objects + +For example, if you wanted to see URLs only for `POST` requests: ```python >>> post_urls = [ ... response.url for response in session.cache.responses.values() -- cgit v1.2.1