Skip to content

Commit

Permalink
Fix CI (#437)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ch00k authored Sep 29, 2024
1 parent e967088 commit 219232f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion django_prometheus/cache/backends/redis.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from django import VERSION as DJANGO_VERSION
from django_redis import cache, exceptions

from django_prometheus.cache.metrics import (
django_cache_get_fail_total,
django_cache_get_total,
Expand Down Expand Up @@ -36,7 +37,6 @@ def get(self, key, default=None, version=None, client=None):
from django.core.cache.backends.redis import RedisCache as DjangoRedisCache

class NativeRedisCache(DjangoRedisCache):

def get(self, key, default=None, version=None):
django_cache_get_total.labels(backend="native_redis").inc()
try:
Expand Down
1 change: 0 additions & 1 deletion django_prometheus/tests/end2end/testapp/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import tempfile

from django import VERSION as DJANGO_VERSION

from testapp.helpers import get_middleware

# SECURITY WARNING: keep the secret key used in production secret!
Expand Down
2 changes: 1 addition & 1 deletion django_prometheus/tests/end2end/testapp/test_caches.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
from django.core.cache import caches
from django import VERSION as DJANGO_VERSION
from django.core.cache import caches
from redis import RedisError

from django_prometheus.testutils import assert_metric_equal, get_metric
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = [ "setuptools >= 67.7.2", "wheel >= 0.40.0"]
requires = ["setuptools >= 67.7.2, < 72.0.0", "wheel >= 0.40.0"]
build-backend = "setuptools.build_meta"

[tool.pytest.ini_options]
Expand All @@ -24,8 +24,8 @@ legacy_tox_ini = """
min_version = 4.4
envlist =
{py37,py38,py39,py310,py311}-django{320}-{end2end,unittests}
{py38,py39,py310,py311,312}-django{400,410,420}-{end2end,unittests}
{py310,py311,312}-django{500}-{end2end,unittests}
{py38,py39,py310,py311,py312}-django{400,410,420}-{end2end,unittests}
{py310,py311,py312}-django{500}-{end2end,unittests}
py39-lint
[gh-actions]
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ pytest-django
pylibmc
pymemcache
python-memcached
setuptools
setuptools<72.0.0
wheel

0 comments on commit 219232f

Please sign in to comment.