Unverified Commit 2d241f11 authored by Sean Bleier's avatar Sean Bleier Committed by GitHub

Merge pull request #174 from felixxm/django-3.0

Add support for Django 3.0
parents 0b1f870a eb22a4b9
...@@ -9,7 +9,8 @@ env: ...@@ -9,7 +9,8 @@ env:
- DJANGO_VERSION='<2.0' - DJANGO_VERSION='<2.0'
- DJANGO_VERSION='>=2.0,<2.1' - DJANGO_VERSION='>=2.0,<2.1'
- DJANGO_VERSION='>=2.1,<2.2' - DJANGO_VERSION='>=2.1,<2.2'
- DJANGO_VERSION='==2.2b1' - DJANGO_VERSION='>=2.2,<3.0'
- DJANGO_VERSION='>=3.0a1,<3.1'
matrix: matrix:
exclude: exclude:
- python: 2.7 - python: 2.7
...@@ -17,9 +18,13 @@ matrix: ...@@ -17,9 +18,13 @@ matrix:
- python: 2.7 - python: 2.7
env: DJANGO_VERSION='>=2.1,<2.2' env: DJANGO_VERSION='>=2.1,<2.2'
- python: 2.7 - python: 2.7
env: DJANGO_VERSION='==2.2b1' env: DJANGO_VERSION='>=2.2,<3.0'
- python: 2.7
env: DJANGO_VERSION='>=3.0a1,<3.1'
- python: 3.5 - python: 3.5
env: DJANGO_VERSION='<2.0' env: DJANGO_VERSION='<2.0'
- python: 3.5
env: DJANGO_VERSION='>=3.0a1,<3.1'
- python: 3.6 - python: 3.6
env: DJANGO_VERSION='<2.0' env: DJANGO_VERSION='<2.0'
- python: 3.7 - python: 3.7
......
SHELL := /bin/bash SHELL := /bin/bash
PACKAGE_NAME=redis_cache PACKAGE_NAME=redis_cache
DJANGO_VERSION?=>=1.11,<3.0 DJANGO_VERSION?=>=1.11,<3.1
.PHONY: install_requirements .PHONY: install_requirements
install_requirements: requirements*.txt install_requirements: requirements*.txt
......
...@@ -21,6 +21,11 @@ Docs can be found at http://django-redis-cache.readthedocs.org/en/latest/. ...@@ -21,6 +21,11 @@ Docs can be found at http://django-redis-cache.readthedocs.org/en/latest/.
Changelog Changelog
========= =========
X.Y.Z
-----
* Adds support for Django 3.0.
2.0.0 2.0.0
----- -----
......
...@@ -2,9 +2,9 @@ import importlib ...@@ -2,9 +2,9 @@ import importlib
import warnings import warnings
from django.core.exceptions import ImproperlyConfigured from django.core.exceptions import ImproperlyConfigured
from django.utils import six from django.utils.encoding import force_text
from django.utils.encoding import force_text, python_2_unicode_compatible from six import python_2_unicode_compatible, string_types
from django.utils.six.moves.urllib.parse import parse_qs, urlparse from six.moves.urllib.parse import parse_qs, urlparse
from redis._compat import unicode from redis._compat import unicode
from redis.connection import SSLConnection from redis.connection import SSLConnection
...@@ -14,7 +14,7 @@ def get_servers(location): ...@@ -14,7 +14,7 @@ def get_servers(location):
"""Returns a list of servers given the server argument passed in from """Returns a list of servers given the server argument passed in from
Django. Django.
""" """
if isinstance(location, six.string_types): if isinstance(location, string_types):
servers = location.split(',') servers = location.split(',')
elif hasattr(location, '__iter__'): elif hasattr(location, '__iter__'):
servers = location servers = location
......
...@@ -9,7 +9,7 @@ setup( ...@@ -9,7 +9,7 @@ setup(
license="BSD", license="BSD",
packages=["redis_cache", "redis_cache.backends"], packages=["redis_cache", "redis_cache.backends"],
description="Redis Cache Backend for Django", description="Redis Cache Backend for Django",
install_requires=['redis<4.0'], install_requires=['redis<4.0', 'six'],
classifiers=[ classifiers=[
"Programming Language :: Python", "Programming Language :: Python",
"Programming Language :: Python :: 2.7", "Programming Language :: Python :: 2.7",
...@@ -27,5 +27,6 @@ setup( ...@@ -27,5 +27,6 @@ setup(
"Framework :: Django :: 2.0", "Framework :: Django :: 2.0",
"Framework :: Django :: 2.1", "Framework :: Django :: 2.1",
"Framework :: Django :: 2.2", "Framework :: Django :: 2.2",
"Framework :: Django :: 3.0",
], ],
) )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment