summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Cook <jordan.cook@pioneer.com>2022-03-12 16:08:18 +0000
committerJordan Cook <jordan.cook@pioneer.com>2022-03-14 11:05:00 -0500
commit2869a6442b94fe8a6ffdf33abbf4cf010783f802 (patch)
tree0c7180490bbc981581d843390a61b76bb6d1c729
parent2ed99885616f4244a227a3c6567348a18bc3abfc (diff)
downloadrequests-cache-2869a6442b94fe8a6ffdf33abbf4cf010783f802.tar.gz
Swap out appdirs for platformdirs
* platformdirs is a more actively maintained fork of appdirs. * Also relax requirements a bit for attrs and urllib (minimum instead of caret constraint) Dependabot update: Bump responses from 0.16.0 to 0.19.0 Bumps [responses](https://github.com/getsentry/responses) from 0.16.0 to 0.19.0. - [Release notes](https://github.com/getsentry/responses/releases) - [Changelog](https://github.com/getsentry/responses/blob/master/CHANGES) - [Commits](https://github.com/getsentry/responses/compare/0.16.0...0.19.0) --- updated-dependencies: - dependency-name: responses dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
-rw-r--r--HISTORY.md3
-rw-r--r--docs/user_guide/files.md4
-rw-r--r--poetry.lock49
-rw-r--r--pyproject.toml8
-rw-r--r--requests_cache/backends/sqlite.py2
-rw-r--r--tests/integration/test_filesystem.py2
-rw-r--r--tests/integration/test_sqlite.py2
7 files changed, 30 insertions, 40 deletions
diff --git a/HISTORY.md b/HISTORY.md
index 8e5b086..2ac49e6 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -11,6 +11,9 @@
* Add `refresh` option to `CachedSession.request()` and `send()` to make (and cache) an new request regardless of existing cache contents
* Add `revalidate` option to `CachedSession.request()` and `send()` to send conditional request (if possible) before using a cached response
+**Dependencies:**
+* Replace `appdirs` with `platformdirs`
+
### 0.9.3 (2022-02-22)
* Fix handling BSON serializer differences between pymongo's `bson` and standalone `bson` codec.
* Handle `CorruptGridFile` error in GridFS backend
diff --git a/docs/user_guide/files.md b/docs/user_guide/files.md
index 36cb5fa..2f89fb8 100644
--- a/docs/user_guide/files.md
+++ b/docs/user_guide/files.md
@@ -89,5 +89,5 @@ If it's a relative path, it will be relative to the temp or cache directory, res
```
There are a number of other system default locations that might be appropriate for a cache file. See
-the [appdirs](https://github.com/ActiveState/appdirs) library for an easy cross-platform way to get
-the most commonly used ones.
+the [platformdirs](https://github.com/platformdirs/platformdirs) library for an easy cross-platform
+way to get the most commonly used ones.
diff --git a/poetry.lock b/poetry.lock
index e1bb567..8727afd 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -7,14 +7,6 @@ optional = true
python-versions = "*"
[[package]]
-name = "appdirs"
-version = "1.4.4"
-description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
-category = "main"
-optional = false
-python-versions = "*"
-
-[[package]]
name = "argcomplete"
version = "1.12.3"
description = "Bash tab completion for argparse"
@@ -78,14 +70,14 @@ lxml = ["lxml"]
[[package]]
name = "boto3"
-version = "1.21.16"
+version = "1.21.18"
description = "The AWS SDK for Python"
category = "main"
optional = true
python-versions = ">= 3.6"
[package.dependencies]
-botocore = ">=1.24.16,<1.25.0"
+botocore = ">=1.24.18,<1.25.0"
jmespath = ">=0.7.1,<1.0.0"
s3transfer = ">=0.5.0,<0.6.0"
@@ -94,7 +86,7 @@ crt = ["botocore[crt] (>=1.21.0,<2.0a0)"]
[[package]]
name = "botocore"
-version = "1.24.16"
+version = "1.24.18"
description = "Low-level, data-driven core of boto 3."
category = "main"
optional = true
@@ -301,7 +293,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
[[package]]
name = "importlib-metadata"
-version = "4.11.2"
+version = "4.11.3"
description = "Read metadata from Python packages"
category = "main"
optional = false
@@ -513,7 +505,7 @@ python-versions = ">=2.6"
name = "platformdirs"
version = "2.5.1"
description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
-category = "dev"
+category = "main"
optional = false
python-versions = ">=3.7"
@@ -788,19 +780,18 @@ test = ["fixtures", "mock", "purl", "pytest", "sphinx", "testrepository (>=0.0.1
[[package]]
name = "responses"
-version = "0.16.0"
+version = "0.19.0"
description = "A utility library for mocking out the `requests` Python library."
category = "dev"
optional = false
-python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
+python-versions = ">=3.7"
[package.dependencies]
-requests = ">=2.0"
-six = "*"
+requests = ">=2.0,<3.0"
urllib3 = ">=1.25.10"
[package.extras]
-tests = ["coverage (>=3.7.1,<6.0.0)", "pytest-cov", "pytest-localserver", "flake8", "types-mock", "types-requests", "types-six", "pytest (>=4.6,<5.0)", "pytest (>=4.6)", "mypy"]
+tests = ["pytest (>=7.0.0)", "coverage (>=6.0.0)", "pytest-cov", "pytest-asyncio", "pytest-localserver", "flake8", "types-mock", "types-requests", "mypy"]
[[package]]
name = "rich"
@@ -1229,17 +1220,13 @@ yaml = ["pyyaml"]
[metadata]
lock-version = "1.1"
python-versions = "^3.7"
-content-hash = "f0f0e74f9002d6bc3a57486b511eb8663b186c941bc273a8bd3ffae088f46b02"
+content-hash = "5d65cf93f04dcf18d71ba3dc4e9886945e6dfd36016d1ab4915d8c24fdccd32d"
[metadata.files]
alabaster = [
{file = "alabaster-0.7.12-py2.py3-none-any.whl", hash = "sha256:446438bdcca0e05bd45ea2de1668c1d9b032e1a9154c2c259092d77031ddd359"},
{file = "alabaster-0.7.12.tar.gz", hash = "sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"},
]
-appdirs = [
- {file = "appdirs-1.4.4-py2.py3-none-any.whl", hash = "sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128"},
- {file = "appdirs-1.4.4.tar.gz", hash = "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41"},
-]
argcomplete = [
{file = "argcomplete-1.12.3-py2.py3-none-any.whl", hash = "sha256:291f0beca7fd49ce285d2f10e4c1c77e9460cf823eef2de54df0c0fec88b0d81"},
{file = "argcomplete-1.12.3.tar.gz", hash = "sha256:2c7dbffd8c045ea534921e63b0be6fe65e88599990d8dc408ac8c542b72a5445"},
@@ -1261,12 +1248,12 @@ beautifulsoup4 = [
{file = "beautifulsoup4-4.10.0.tar.gz", hash = "sha256:c23ad23c521d818955a4151a67d81580319d4bf548d3d49f4223ae041ff98891"},
]
boto3 = [
- {file = "boto3-1.21.16-py3-none-any.whl", hash = "sha256:15fa6d1acac422d2d34f7811e02acfc7ac222cea24db3f463d5c52f2f87baa52"},
- {file = "boto3-1.21.16.tar.gz", hash = "sha256:c974a7fa781c500b7067441f9883ed939cf8c80bcd74c88b11965b336cabb4b6"},
+ {file = "boto3-1.21.18-py3-none-any.whl", hash = "sha256:d857feb6af9932e1ee3a748060a2cd9fd6043dbbccf66976eda54586597efdc0"},
+ {file = "boto3-1.21.18.tar.gz", hash = "sha256:8d6f3c548f0ee03d742f404c96515e7579fc6968135aaa50dd855a046698ff79"},
]
botocore = [
- {file = "botocore-1.24.16-py3-none-any.whl", hash = "sha256:0a809efb821d81dc29f2e6c404ed123176b8d2eb43103758f31d89b291af2a8b"},
- {file = "botocore-1.24.16.tar.gz", hash = "sha256:dcff7f9b5fea98701d0b520eba99385c538825f10e6d1cab1e7da213293d141e"},
+ {file = "botocore-1.24.18-py3-none-any.whl", hash = "sha256:7ea8ef1ff7c4882ab59b337662f90ddf5ea860e95e7e209dca593a34ea585b1b"},
+ {file = "botocore-1.24.18.tar.gz", hash = "sha256:d2da7ccbc5ddd61fe3cd45fcbd3de380d9e3a15bfa8fbfd2d9259a93dcc60c56"},
]
bson = [
{file = "bson-0.5.10.tar.gz", hash = "sha256:d6511b2ab051139a9123c184de1a04227262173ad593429d21e443d6462d6590"},
@@ -1379,8 +1366,8 @@ imagesize = [
{file = "imagesize-1.3.0.tar.gz", hash = "sha256:cd1750d452385ca327479d45b64d9c7729ecf0b3969a58148298c77092261f9d"},
]
importlib-metadata = [
- {file = "importlib_metadata-4.11.2-py3-none-any.whl", hash = "sha256:d16e8c1deb60de41b8e8ed21c1a7b947b0bc62fab7e1d470bcdf331cea2e6735"},
- {file = "importlib_metadata-4.11.2.tar.gz", hash = "sha256:b36ffa925fe3139b2f6ff11d6925ffd4fa7bc47870165e3ac260ac7b4f91e6ac"},
+ {file = "importlib_metadata-4.11.3-py3-none-any.whl", hash = "sha256:1208431ca90a8cca1a6b8af391bb53c1a2db74e5d1cef6ddced95d4b2062edc6"},
+ {file = "importlib_metadata-4.11.3.tar.gz", hash = "sha256:ea4c597ebf37142f827b8f39299579e31685c31d3a438b59f469406afd0f2539"},
]
iniconfig = [
{file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"},
@@ -1700,8 +1687,8 @@ requests-mock = [
{file = "requests_mock-1.9.3-py2.py3-none-any.whl", hash = "sha256:0a2d38a117c08bb78939ec163522976ad59a6b7fdd82b709e23bb98004a44970"},
]
responses = [
- {file = "responses-0.16.0-py2.py3-none-any.whl", hash = "sha256:f358ef75e8bf431b0aa203cc62625c3a1c80a600dbe9de91b944bf4e9c600b92"},
- {file = "responses-0.16.0.tar.gz", hash = "sha256:a2e3aca2a8277e61257cd3b1c154b1dd0d782b1ae3d38b7fa37cbe3feb531791"},
+ {file = "responses-0.19.0-py3-none-any.whl", hash = "sha256:53354b5de163aa2074312c71d8ebccb8bd1ab336cff7053abb75e84dc5637abe"},
+ {file = "responses-0.19.0.tar.gz", hash = "sha256:3fc29c3117e14136b833a0a6d4e7f1217c6301bf08b6086db468e12f1e3290e2"},
]
rich = [
{file = "rich-12.0.0-py3-none-any.whl", hash = "sha256:fdcd2f8d416e152bcf35c659987038d1ae5a7bd336e821ca7551858a4c7e38a9"},
diff --git a/pyproject.toml b/pyproject.toml
index d5030b0..aab6f60 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -30,10 +30,10 @@ python = "^3.7"
# Required dependencies
requests = "^2.22" # Needs no introduction
-urllib3 = "^1.25.5" # Use a slightly newer version than required by requests (for bugfixes)
-appdirs = "^1.4.4" # For options that use platform-specific user cache dirs
-attrs = "^21.2" # For response data models
+urllib3 = ">=1.25.5" # Use a slightly newer version than required by requests (for bugfixes)
+attrs = ">=21.2" # For response data models
cattrs = "^1.8" # For response serialization
+platformdirs = "^2.5" # For options that use platform-specific user cache dirs
url-normalize = "^1.4" # For improved request matching
# Optional backend dependencies
@@ -92,7 +92,7 @@ pytest-cov = ">=3.0"
pytest-rerunfailures = "^10.1"
pytest-xdist = ">=2.2"
requests-mock = "^1.8"
-responses = "0.16.0"
+responses = "0.19.0"
timeout-decorator = "^0.5"
# Tools for linting, type checking, etc. are managed with pre-commit
diff --git a/requests_cache/backends/sqlite.py b/requests_cache/backends/sqlite.py
index d2217c9..77e2b46 100644
--- a/requests_cache/backends/sqlite.py
+++ b/requests_cache/backends/sqlite.py
@@ -75,7 +75,7 @@ from pathlib import Path
from tempfile import gettempdir
from typing import Collection, Iterable, Iterator, List, Tuple, Type, Union
-from appdirs import user_cache_dir
+from platformdirs import user_cache_dir
from .._utils import chunkify, get_valid_kwargs
from . import BaseCache, BaseStorage
diff --git a/tests/integration/test_filesystem.py b/tests/integration/test_filesystem.py
index b651186..1b81dff 100644
--- a/tests/integration/test_filesystem.py
+++ b/tests/integration/test_filesystem.py
@@ -2,7 +2,7 @@ from shutil import rmtree
from tempfile import gettempdir
import pytest
-from appdirs import user_cache_dir
+from platformdirs import user_cache_dir
from requests_cache.backends import FileCache, FileDict
from requests_cache.serializers import SERIALIZERS, SerializerPipeline
diff --git a/tests/integration/test_sqlite.py b/tests/integration/test_sqlite.py
index 1840a78..391d46b 100644
--- a/tests/integration/test_sqlite.py
+++ b/tests/integration/test_sqlite.py
@@ -5,7 +5,7 @@ from threading import Thread
from unittest.mock import patch
import pytest
-from appdirs import user_cache_dir
+from platformdirs import user_cache_dir
from requests_cache.backends.base import BaseCache
from requests_cache.backends.sqlite import MEMORY_URI, SQLiteCache, SQLiteDict, SQLitePickleDict