forked from jazzband/django-redis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.cfg
175 lines (157 loc) · 4.64 KB
/
setup.cfg
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
[metadata]
name = django-redis
version = attr: django_redis.__version__
url = https://github.com/jazzband/django-redis
author = Andrei Antoukh
author_email = [email protected]
description = Full featured redis cache backend for Django.
long_description = file: README.rst
long_description_content_type = text/x-rst
license = BSD-3-Clause
classifiers =
Development Status :: 5 - Production/Stable
Environment :: Web Environment
Framework :: Django
Framework :: Django :: 4.2
Framework :: Django :: 5.0
Intended Audience :: Developers
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Topic :: Software Development :: Libraries
Topic :: Utilities
[options]
python_requires = >=3.8
packages =
django_redis
django_redis.client
django_redis.serializers
django_redis.compressors
install_requires =
Django>=4.2
redis>=4.0.2
[options.extras_require]
hiredis = redis[hiredis]>=4.0.2
[coverage:run]
omit =
tests/*,
[coverage:report]
precision = 1
skip_covered = true
[tox:tox]
minversion = 3.15.0
envlist =
black
ruff
mypy
# tests against released versions
py{38,39,310,311}-dj{42,50}-redislatest
# tests against unreleased versions
py311-dj50-redismaster
py311-djmain-redis{latest,master}
[gh-actions]
python =
3.8: py38, black, ruff, mypy
3.9: py39
3.10: py310
3.11: py311
[gh-actions:env]
DJANGO =
4.2: dj42
5.0: dj50
main: djmain
REDIS =
latest: redislatest
master: redismaster
[testenv]
passenv = CI, GITHUB*
commands =
{envpython} -m pytest --cov-report= --ds=settings.sqlite {posargs}
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_herd {posargs}
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_json {posargs}
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_lz4 {posargs}
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_msgpack {posargs}
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_sentinel {posargs}
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_sentinel_opts {posargs}
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_sharding {posargs}
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_usock {posargs}
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_zlib {posargs}
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_zstd {posargs}
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_gzip {posargs}
{envpython} -m coverage report
{envpython} -m coverage xml
deps =
dj42: Django>=4.2,<5.0
dj50: Django>=5.0,<5.1
djmain: https://github.com/django/django/archive/main.tar.gz
msgpack>=0.6.0
pytest
pytest-cov
pytest-django
pytest-pythonpath
pytest-mock
redismaster: https://github.com/redis/redis-py/archive/master.tar.gz
lz4>=0.15
pyzstd>=0.15
[testenv:{black,ruff,mypy}]
basepython = python3
envdir={toxworkdir}/lint
commands =
black: black --target-version py36 {posargs:--check --diff} setup.py django_redis/ tests/
ruff: ruff {posargs:check --show-fixes} django_redis/ tests/
mypy: mypy {posargs:--cobertura-xml-report .} django_redis tests
deps =
black
django-stubs
ruff
lxml
mypy
# typing dependencies
pytest
pytest-django
pytest-mock
types-redis
skip_install = true
[tool:pytest]
DJANGO_SETTINGS_MODULE = settings.sqlite
addopts =
--doctest-modules
--cov=django_redis
--cov-config=setup.cfg
--no-cov-on-fail
filterwarnings =
error::DeprecationWarning
error::FutureWarning
error::PendingDeprecationWarning
ignore:.*distutils package is deprecated.*:DeprecationWarning
pythonpath = tests
testpaths = tests
xfail_strict = true
[mypy]
plugins =
mypy_django_plugin.main
pretty = true
show_error_codes = true
show_error_context = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_unreachable = true
[mypy.plugins.django-stubs]
# all test settings look similar enough for mypy
django_settings_module = tests.settings.sqlite
ignore_missing_settings = true
# third party mypy config
[mypy-lz4.frame]
ignore_missing_imports = true
[mypy-pyzstd]
ignore_missing_imports = true
[mypy-msgpack]
ignore_missing_imports = true
[mypy-redis.sentinel]
ignore_missing_imports = true