1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204
|
[tool.poetry]
name = "requests-cache"
version = "1.2.1"
description = "A persistent cache for python requests"
authors = ["Roman Haritonov", "Jordan Cook"]
license = "BSD-2-Clause"
readme = "README.md"
documentation = "https://requests-cache.readthedocs.io"
homepage = "https://github.com/requests-cache/requests-cache"
repository = "https://github.com/requests-cache/requests-cache"
keywords = [
"requests",
"python-requests",
"cache",
"http",
"http-client",
"web",
"webscraping",
"performance",
"sqlite",
"redis",
"mongodb",
"gridfs",
"dynamodb",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
include = [
{format="sdist", path="*.md"},
{format="sdist", path="*.yml"},
{format="sdist", path="docs"},
{format="sdist", path="examples"},
{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.8"
# Required dependencies
requests = ">=2.22" # Needs no introduction
urllib3 = ">=1.25.5" # Use a slightly newer version than required by requests (for bugfixes)
attrs = ">=21.2" # For response data models
cattrs = ">=22.2" # For response serialization
platformdirs = ">=2.5" # For features that use platform-specific system directories
url-normalize = ">=1.4" # For more accurate request matching
# Optional backend dependencies
boto3 = {optional=true, version=">=1.15"}
botocore = {optional=true, version=">=1.18"}
pymongo = {optional=true, version=">=3"}
redis = {optional=true, version=">=3"}
# Optional serialization dependencies
bson = {optional=true, version=">=0.5"}
itsdangerous = {optional=true, version=">=2.0"}
pyyaml = {optional=true, version=">=6.0.1"}
ujson = {optional=true, version=">=5.4"}
# Dependencies for building documentation;
# defined here because readthedocs doesn't (yet?) support poetry.dev-dependencies
furo = {optional=true, version="^2023.3"}
linkify-it-py = {optional=true, version="^2.0"}
myst-parser = {optional=true, version="^1.0"}
sphinx = {optional=true, version="^5.0.2"}
sphinx-autodoc-typehints = {optional=true, version=">=1.19"}
sphinx-automodapi = {optional=true, version=">=0.14"}
sphinx-copybutton = {optional=true, version=">=0.5"}
sphinx-design = {optional=true, version=">=0.2"}
sphinx-notfound-page = {optional=true, version=">=0.8"}
sphinxcontrib-apidoc = {optional=true, version=">=0.3"}
sphinxext-opengraph = {optional=true, version=">=0.9"}
[tool.poetry.extras]
# Package extras for optional backend dependencies
dynamodb = ["boto3", "botocore"]
mongodb = ["pymongo"]
redis = ["redis"]
# Package extras for optional seriazliation dependencies
bson = ["bson"] # BSON comes with pymongo, but can also be used as a standalone codec
json = ["ujson"] # Will optionally be used by JSON serializer for improved performance
security = ["itsdangerous"]
yaml = ["pyyaml"]
# All optional packages combined, for demo/evaluation purposes
all = [
"boto3",
"botocore",
"itsdangerous",
"pymongo",
"pyyaml",
"redis",
"ujson",
]
# Documentation
docs = [
"matplotlib",
"furo",
"linkify-it-py",
"myst-parser",
"sphinx",
"sphinx-autodoc-typehints",
"sphinx-automodapi",
"sphinx-copybutton",
"sphinx-design",
"sphinx-notfound-page",
"sphinxcontrib-apidoc",
"sphinxext-opengraph",
]
[tool.poetry.dev-dependencies]
# For unit + integration tests
coverage = "^7.1"
psutil = "^5.0"
pytest = "^8.0"
pytest-clarity = "^1.0.1"
pytest-cov = ">=3.0"
pytest-rerunfailures = ">=10.1"
pytest-xdist = ">=2.2"
requests-mock = "^1.12"
responses = ">=0.19"
tenacity = "^8.0"
timeout-decorator = "^0.5"
time-machine = {version = "^2.9", markers = "implementation_name != 'pypy'"}
# Tools for linting, type checking, etc. are managed with pre-commit
pre-commit = "^3.5"
# For convenience in local development
nox = "^2023.4"
# TODO: Remove the 'python' constraint once nox-poetry drops its own constraint
# https://github.com/cjolowicz/nox-poetry/pull/1213
nox-poetry = {version = "^1.0.0", python = "<4"}
rich = ">=10.0"
sphinx-autobuild = "^2021.3.14"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.coverage.html]
directory = 'test-reports'
[tool.coverage.xml]
output = 'test-reports/coverage.xml'
[tool.coverage.run]
branch = true
source = ['requests_cache']
omit = [
'requests_cache/__init__.py',
'requests_cache/backends/__init__.py',
'requests_cache/models/__init__.py',
'requests_cache/serializers/__init__.py',
]
[tool.coverage.report]
exclude_lines = [
'pragma: no cover',
'if TYPE_CHECKING:',
'if logger.level',
'except ImportError:',
]
[tool.mypy]
python_version = 3.8
ignore_missing_imports = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_unreachable = true
show_error_codes = true
show_column_numbers = true
pretty = true
[tool.ruff]
fix = true
unsafe-fixes = true
line-length = 100
output-format = 'grouped'
target-version = 'py38'
exclude = ['examples/']
[tool.ruff.format]
quote-style = 'single'
[tool.ruff.lint]
select = ['B', 'C4', 'C90', 'E', 'F']
ignore = ['B023']
[tool.ruff.lint.isort]
known-first-party = ['tests']
# Wrap lines to 100 chars, but don't error on unwrappable lines until 120 chars
[tool.ruff.lint.pycodestyle]
max-line-length = 120
|