Skip to content

Commit 0e355e9

Browse files
authored
Merge pull request #40 from timgraham/django1.10
Confirm support for Django 1.10
2 parents 613b79e + 775de16 commit 0e355e9

File tree

7 files changed

+15
-26
lines changed

7 files changed

+15
-26
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ env:
1010
- TOXENV=py27-django19
1111
- TOXENV=py34-django19
1212
- TOXENV=py35-django19
13+
- TOXENV=py27-django110
14+
- TOXENV=py34-django110
15+
- TOXENV=py35-django110
1316
- TOXENV=py27-django-master
1417
- TOXENV=py35-django-master
1518

CHANGELOG.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Changelog
33

44
0.6.1 - 2015-12-28
55
------------------
6-
- Supports Django 1.7 through 1.9
6+
- Supports Django 1.7 through 1.10
77
- Supports Python 2.7, 3.4, and 3.5
88

99
0.6.0 - 2015-04-01

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ Two reasons to use django-pylibmc instead are:
3434
Requirements
3535
------------
3636

37-
django-pylibmc requires pylibmc 1.4.1 or above. It supports Django 1.7 through
38-
1.9, and Python versions 2.7, 3.4, and 3.5.
37+
django-pylibmc requires pylibmc 1.4.1 or above. It supports Django 1.8 through
38+
1.10, and Python versions 2.7, 3.4, and 3.5.
3939

4040
Installation
4141
------------

django_pylibmc/memcached.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,7 @@ def get_backend_timeout(self, timeout=DEFAULT_TIMEOUT):
103103
if timeout == 0:
104104
return timeout
105105

106-
try:
107-
return super(PyLibMCCache, self).get_backend_timeout(timeout)
108-
except AttributeError:
109-
# ._get_memcache_timeout() will be deprecated in Django 1.9
110-
# It's already raising DeprecationWarning in Django 1.8
111-
# See: https://docs.djangoproject.com/en/1.8/internals/deprecation/#deprecation-removed-in-1-9
112-
return self._get_memcache_timeout(timeout)
106+
return super(PyLibMCCache, self).get_backend_timeout(timeout)
113107

114108
def add(self, key, value, timeout=DEFAULT_TIMEOUT, version=None):
115109
key = self.make_key(key, version=version)

setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ def run_tests(self):
4343
# I don't know what exactly this means, but why not?
4444
'Environment :: Web Environment :: Mozilla',
4545
'Framework :: Django',
46+
'Framework :: Django :: 1.8',
47+
'Framework :: Django :: 1.9',
48+
'Framework :: Django :: 1.10',
4649
'Intended Audience :: Developers',
4750
'License :: OSI Approved :: BSD License',
4851
'Operating System :: OS Independent',

tests/tests.py

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
import time
4+
from django.core.cache import caches
45
from django.test import TestCase
56

67
from .models import Poll, expensive_calculation
@@ -15,24 +16,12 @@ def m(n):
1516
return 24
1617

1718

18-
def load_cache(name):
19-
try:
20-
from django.core.cache import caches
21-
except ImportError:
22-
# Use Django 1.6 and earlier method
23-
from django.core.cache import get_cache
24-
return get_cache(name)
25-
else:
26-
return caches[name]
27-
28-
29-
# Lifted originally from django/regressiontests/cache/tests.py.
30-
# In Django 1.8 (and earlier), tests are in tests/cache/tests.py.
19+
# Lifted from tests/cache/tests.py in Django.
3120
class PylibmcCacheTests(TestCase):
3221
cache_name = 'default'
3322

3423
def setUp(self):
35-
self.cache = load_cache(self.cache_name)
24+
self.cache = caches[self.cache_name]
3625

3726
def tearDown(self):
3827
self.cache.clear()

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55

66
[tox]
77
envlist =
8-
py{27,34,35}-django{18,19},
9-
py{27,34,35}-django-master,
8+
py{27,34,35}-django{18,19,110,-master},
109

1110
[testenv]
1211
commands = {envpython} runtests.py
1312
deps =
1413
django18: Django>=1.8,<1.9
1514
django19: Django>=1.9,<1.10
15+
django110: Django>=1.10a1,<1.11
1616
django-master: https://github.com/django/django/archive/master.tar.gz
1717
pylibmc>=1.4.1

0 commit comments

Comments
 (0)