Skip to content

Commit

Permalink
Add python 3.12 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Dima Kryukov committed Jan 3, 2024
1 parent 5294557 commit 6decfc8
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
strategy:
max-parallel: 5
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ clean:

upload: clean
python setup.py sdist bdist_wheel
twine upload -u krukov dist/*
twine upload dist/*

LENGTH=120

Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12

[options]
python_requires = >=3.8
Expand Down
2 changes: 1 addition & 1 deletion tests/test_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async def test_memory_limit(cache: Cache, target):
await cache.set(key="key", value="v")
target.set.assert_not_called()

await cache.set(key="key", value="v" * 31)
await cache.set(key="key", value="v" * 35)
target.set.assert_not_called()

await cache.set(key="key", value="v" * 15)
Expand Down
46 changes: 23 additions & 23 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[tox]
envlist =
{py38,py39,py310,py311}
{py38,py39,py310,py311}-redis
{py38,py39,py310,py311}-redis4
{py38,py39,py310,py311}-diskcache
{py38,py39,py310,py311}-integration
{py38,py39,py310,py311,py312}
{py38,py39,py310,py311,py312}-redis
{py38,py39,py310,py311,py312}-redis4
{py38,py39,py310,py311,py312}-diskcache
{py38,py39,py310,py311,py312}-integration
coverage
skip_missing_interpreters = true

Expand All @@ -15,26 +15,26 @@ setenv =
PYTHONPATH = {toxinidir}/tests
COVERAGE_FILE = {toxworkdir}/.coverage.{envname}
MARKER = not redis and not integration and not diskcache
{py,py38,py39,py310,py311}-redis: MARKER = redis and not diskcache
{py,py38,py39,py310,py311}-redis4: MARKER = redis and not diskcache
{py,py38,py39,py310,py311}-diskcache: MARKER = diskcache and not redis
{py,py38,py39,py310,py311}-integration: MARKER = integration
{py,py38,py39,py310,py311,py312}-redis: MARKER = redis and not diskcache
{py,py38,py39,py310,py311,py312}-redis4: MARKER = redis and not diskcache
{py,py38,py39,py310,py311,py312}-diskcache: MARKER = diskcache and not redis
{py,py38,py39,py310,py311,py312}-integration: MARKER = integration
deps =
pytest
pytest-asyncio==0.21.1
pytest-cov
pytest-rerunfailures
hypothesis
{py,py38,py39,py310,py311}-redis4: redis==4.6.0
{py,py38,py39,py310,py311}-integration: aiohttp
{py,py38,py39,py310,py311}-integration: fastapi
{py,py38,py39,py310,py311}-integration: httpx
{py,py38,py39,py310,py311}-integration: SQLAlchemy
{py,py38,py39,py310,py311}-integration: prometheus-client
{py,py38,py39,py310,py311,py312}-redis4: redis==4.6.0
{py,py38,py39,py310,py311,py312}-integration: aiohttp
{py,py38,py39,py310,py311,py312}-integration: fastapi
{py,py38,py39,py310,py311,py312}-integration: httpx
{py,py38,py39,py310,py311,py312}-integration: SQLAlchemy
{py,py38,py39,py310,py311,py312}-integration: prometheus-client
extras =
{py,py38,py39,py310,py311}-redis: redis,speedup
{py,py38,py39,py310,py311}-diskcache: diskcache
{py,py37,py38,py39,py310,py311}-integration: redis,speedup,diskcache,dill
{py,py38,py39,py310,py311,py312}-redis: redis,speedup
{py,py38,py39,py310,py311,py312}-diskcache: diskcache
{py,py37,py38,py39,py310,py311,py312}-integration: redis,speedup,diskcache,dill
commands =
pytest --cov --cov-fail-under=0 --reruns 5 --reruns-delay 1 \
-m "{env:MARKER}" \
Expand All @@ -52,8 +52,8 @@ commands =
coverage report
coverage xml -o {toxworkdir}/coverage.xml
depends =
{py38,py39,py310,py311}
{py38,py39,py310,py311}-redis
{py38,py39,py310,py311}-redis4
{py38,py39,py310,py311}-diskcache
{py38,py39,py310,py311}-integration
{py38,py39,py310,py311,py312}
{py38,py39,py310,py311,py312}-redis
{py38,py39,py310,py311,py312}-redis4
{py38,py39,py310,py311,py312}-diskcache
{py38,py39,py310,py311,py312}-integration

0 comments on commit 6decfc8

Please sign in to comment.