Skip to content

Commit 39086fd

Browse files
committed
Few minor fixes and readme updates
1 parent 5948dd9 commit 39086fd

File tree

4 files changed

+8
-17
lines changed

4 files changed

+8
-17
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ The main idea of this package: you don't need to touch any existing function cod
1212

1313
Library was tested in the following environments:
1414

15-
* Python 2.7, 3.5, 3.6
16-
* Django 1.8, 1.11, >=2.0.0
15+
* Python 3.7, 3.8, 3.9, 3.10
16+
* Django >=2.0.0
1717

1818
Feel free to try it in yours, but it's not guaranteed it will work. Submit an issue if you think it should.
1919

tests/benchmarks.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
from __future__ import unicode_literals, print_function
3-
42
import math
53
from contextlib import contextmanager
64
from timeit import default_timer
@@ -29,7 +27,7 @@
2927
'KEY_PREFIX': 'custom_prefix',
3028
},
3129
'memcached': {
32-
'BACKEND': "django.core.cache.backends.memcached.PyMemcacheCache",
30+
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
3331
'LOCATION': MEMCACHED_HOST,
3432
'KEY_PREFIX': 'memcached',
3533
},

tests/tests_basic.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ def is_pylibmc(self):
9696
@property
9797
def is_redis(self):
9898
try:
99-
# noinspection PyUnresolvedReferences
10099
from django_redis.client import DefaultClient
101100
except ImportError:
102101
return False
@@ -410,15 +409,6 @@ def _check_base(self, method, param_to_change=None):
410409
a, b, c = items[:3]
411410

412411
result = process_args(a, b, c)
413-
# argspec = getargspec(method.function)
414-
# start_arg_idx = 0
415-
# if len(argspec.args) == 4:
416-
# start_arg_idx = 1
417-
# params = {
418-
# argspec.args[start_arg_idx]: a,
419-
# argspec.args[start_arg_idx + 1]: b,
420-
# argspec.args[start_arg_idx + 2]: c,
421-
# }
422412
self.assertEqual(method(a, b, c), result)
423413
self.cache.assert_called_once_with(result)
424414
self.cache.reset_mock()
@@ -966,7 +956,7 @@ def get_cache_instance(self):
966956
@override_settings(
967957
CACHES={
968958
'default': {
969-
'BACKEND': "django.core.cache.backends.memcached.MemcachedCache",
959+
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
970960
'LOCATION': MEMCACHED_HOST,
971961
'KEY_PREFIX': 'memcached',
972962
}

tox.ini

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
[tox]
22
envlist =
33
{py37}-django20
4-
{py38,py39,py310}-django34
4+
{py38,py39,py310}-{django34}
5+
{py310}-{django4}
56
tox_pyenv_fallback=False
67

78
[pytest]
@@ -23,6 +24,8 @@ deps =
2324
django20: python-memcached
2425
django34: Django>=3
2526
django34: pymemcache
27+
django4: Django>=4
28+
django4: pymemcache
2629
pytest
2730
django-redis
2831
memory-profiler

0 commit comments

Comments
 (0)