-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* migrate from setup.cfg to pyproject.toml; remove mock dependency * use asyncio.timeout instead of async_timeout package for python 3.11; fix aioredis tests * CI: add py3.12 * add py3.12 to project classifiers --------- Co-authored-by: Anton Ilyushenkov <[email protected]>
- Loading branch information
Showing
28 changed files
with
263 additions
and
238 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ jobs: | |
- '3.9' | ||
- '3.10' | ||
- '3.11' | ||
- '3.12' | ||
with_aioredis: | ||
- 'yes' | ||
- 'no' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,82 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
requires = ["setuptools>=61.0", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "aioredis-cluster" | ||
description = "Redis Cluster support extension for aioredis" | ||
authors = [ | ||
{name = "Anton Ilyushenkov", email = "[email protected]"}, | ||
] | ||
maintainers = [ | ||
{name = "Anton Ilyushenkov", email = "[email protected]"}, | ||
] | ||
classifiers = [ | ||
"License :: OSI Approved :: MIT License", | ||
"Development Status :: 5 - Production/Stable", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Operating System :: POSIX", | ||
"Environment :: Web Environment", | ||
"Intended Audience :: Developers", | ||
"Topic :: Software Development", | ||
"Topic :: Software Development :: Libraries", | ||
"Framework :: AsyncIO", | ||
] | ||
keywords = ["redis", "aioredis", "redis cluster", "asyncio"] | ||
requires-python = ">=3.8" | ||
dependencies = [ | ||
'async-timeout; python_version < "3.11"', | ||
"hiredis < 3.0.0; platform_python_implementation == 'CPython'" | ||
] | ||
dynamic = ["version", "readme"] | ||
|
||
[project.urls] | ||
Repository = "https://github.com/DriverX/aioredis-cluster" | ||
|
||
[project.optional-dependencies] | ||
devel = [ | ||
"flake8", | ||
"flake8-pyproject", | ||
"mypy", | ||
"isort", | ||
"black==23.7.0", | ||
"coverage", | ||
"cython", | ||
"pytest", | ||
"pytest-cov", | ||
"pytest-mock", | ||
"pytest-asyncio>=0.21, <1.0", | ||
"pytest-cov", | ||
"pytest-xdist", | ||
] | ||
aioredis = [ | ||
"aioredis >=1.1.0, <1.4.0; python_version < '3.10'", | ||
] | ||
|
||
[tool.setuptools] | ||
zip-safe = false | ||
include-package-data = true | ||
platforms = ["POSIX"] | ||
license-files = ["LICENSE"] | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "aioredis_cluster._version.__version__"} | ||
readme = {file = ["README.md", "CHANGES.md", "CONTRIBUTORS.md"], content-type = "text/markdown"} | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["src"] | ||
include = [ | ||
"aioredis_cluster", | ||
"aioredis_cluster.*", | ||
] | ||
|
||
[tool.isort] | ||
profile = "black" | ||
known_first_party = ["aioredis_cluster"] | ||
|
@@ -11,3 +86,24 @@ known_third_party = ["aioredis"] | |
line-length = 100 | ||
target-version = ["py38"] | ||
exclude = '.pyi$' | ||
|
||
[tool.pytest.ini_options] | ||
addopts = "--cov-report=term --cov-report=html -v" | ||
asyncio_mode = "auto" | ||
|
||
[tool.coverage.run] | ||
branch = true | ||
source = ["src"] | ||
|
||
[tool.flake8] | ||
max-line-length = 100 | ||
extend-ignore = ["W606", "E203", "E741"] | ||
|
||
[tool.mypy] | ||
ignore_missing_imports = true | ||
check_untyped_defs = true | ||
no_implicit_optional = false | ||
|
||
[[tool.mypy.overrides]] | ||
module = "aioredis_cluster._aioredis.*" | ||
ignore_errors = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import asyncio | ||
|
||
try: | ||
from async_timeout import timeout as _async_timeout | ||
except ImportError: | ||
_async_timeout = None # type: ignore | ||
|
||
|
||
__all__ = ("timeout",) | ||
|
||
|
||
if hasattr(asyncio, "timeout"): | ||
timeout = asyncio.timeout | ||
elif _async_timeout is not None: | ||
timeout = _async_timeout | ||
else: | ||
raise RuntimeError("async timeout compat version not found") |
Oops, something went wrong.