-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathpyproject.toml
More file actions
134 lines (117 loc) · 3.06 KB
/
Copy pathpyproject.toml
File metadata and controls
134 lines (117 loc) · 3.06 KB
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
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"
[project]
name = "sanic-redis"
dynamic = ["version"]
description = "Adds redis support to Sanic"
readme = "README.md"
requires-python = ">=3.10"
license = { text = "MIT" }
authors = [{ name = "octal", email = "octalgah@gmail.com" }]
keywords = ["sanic", "redis", "hiredis"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Internet :: WWW/HTTP :: Session",
]
dependencies = ["sanic>=25.3.0", "redis>=7.0.0,<9.0"]
[project.optional-dependencies]
hiredis = ["hiredis>=3.2.0,<4.0"]
test = [
"sanic-testing>=24.6.0",
"pytest>=7.0.0",
"coverage",
"pyright",
"pytest-asyncio",
"ruff",
"tox>=4",
]
[project.urls]
Homepage = "https://github.com/strahe/sanic-redis"
[tool.setuptools]
packages = ["sanic_redis"]
zip-safe = false
[tool.setuptools.package-data]
sanic_redis = ["py.typed"]
[tool.setuptools_scm]
version_file = "sanic_redis/_version.py"
[tool.setuptools.dynamic]
version = { attr = "sanic_redis._version.__version__" }
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
asyncio_mode = "auto"
markers = [
"asyncio: marks tests as async (deselect with '-m \"not asyncio\"')",
"compat: quick compatibility smoke tests for supported client dependencies",
"integration: tests that require a running Redis service",
]
addopts = "-v --tb=short"
filterwarnings = [
"ignore:websockets.legacy is deprecated:DeprecationWarning:websockets.*",
]
[tool.tox]
legacy_tox_ini = """
[tox]
env_list =
py{310,311,312,313,314}-deps-{min,latest}
py314-deps-{min,latest}-pure
[testenv]
package = wheel
extras =
test
!pure: hiredis
deps =
deps-min: sanic==25.3.0
deps-min: redis==7.0.0
deps-min-!pure: hiredis==3.2.0
deps-min: sanic-testing==24.6.0
pass_env =
REDIS_URL
TEST_REDIS_DB
commands =
pytest {posargs:tests/}
"""
[tool.pyright]
include = ["sanic_redis"]
pythonVersion = "3.10"
reportMissingTypeStubs = false
typeCheckingMode = "basic"
venv = ".venv"
venvPath = "."
[tool.coverage.run]
source = ["sanic_redis"]
[tool.coverage.report]
omit = ["sanic_redis/_version.py"]
show_missing = true
[tool.ruff]
target-version = "py310"
line-length = 88
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line too long, handled by ruff format
]
[tool.ruff.lint.isort]
known-first-party = ["sanic_redis"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"