Skip to content

Commit

Permalink
Few minor fixes and readme updates
Browse files Browse the repository at this point in the history
  • Loading branch information
o-churkin committed Oct 13, 2022
1 parent 5948dd9 commit 39086fd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 17 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ The main idea of this package: you don't need to touch any existing function cod

Library was tested in the following environments:

* Python 2.7, 3.5, 3.6
* Django 1.8, 1.11, >=2.0.0
* Python 3.7, 3.8, 3.9, 3.10
* Django >=2.0.0

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

Expand Down
4 changes: 1 addition & 3 deletions tests/benchmarks.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function

import math
from contextlib import contextmanager
from timeit import default_timer
Expand Down Expand Up @@ -29,7 +27,7 @@
'KEY_PREFIX': 'custom_prefix',
},
'memcached': {
'BACKEND': "django.core.cache.backends.memcached.PyMemcacheCache",
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'LOCATION': MEMCACHED_HOST,
'KEY_PREFIX': 'memcached',
},
Expand Down
12 changes: 1 addition & 11 deletions tests/tests_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ def is_pylibmc(self):
@property
def is_redis(self):
try:
# noinspection PyUnresolvedReferences
from django_redis.client import DefaultClient
except ImportError:
return False
Expand Down Expand Up @@ -410,15 +409,6 @@ def _check_base(self, method, param_to_change=None):
a, b, c = items[:3]

result = process_args(a, b, c)
# argspec = getargspec(method.function)
# start_arg_idx = 0
# if len(argspec.args) == 4:
# start_arg_idx = 1
# params = {
# argspec.args[start_arg_idx]: a,
# argspec.args[start_arg_idx + 1]: b,
# argspec.args[start_arg_idx + 2]: c,
# }
self.assertEqual(method(a, b, c), result)
self.cache.assert_called_once_with(result)
self.cache.reset_mock()
Expand Down Expand Up @@ -966,7 +956,7 @@ def get_cache_instance(self):
@override_settings(
CACHES={
'default': {
'BACKEND': "django.core.cache.backends.memcached.MemcachedCache",
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': MEMCACHED_HOST,
'KEY_PREFIX': 'memcached',
}
Expand Down
5 changes: 4 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[tox]
envlist =
{py37}-django20
{py38,py39,py310}-django34
{py38,py39,py310}-{django34}
{py310}-{django4}
tox_pyenv_fallback=False

[pytest]
Expand All @@ -23,6 +24,8 @@ deps =
django20: python-memcached
django34: Django>=3
django34: pymemcache
django4: Django>=4
django4: pymemcache
pytest
django-redis
memory-profiler
Expand Down

0 comments on commit 39086fd

Please sign in to comment.