Skip to content

Commit

Permalink
Added python 3.8 and django 3.0 compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiocaccamo committed Dec 3, 2019
1 parent 1daaf12 commit 9d3ab83
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 8 deletions.
13 changes: 11 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ env:
- TOX_ENV=py35-dj20
- TOX_ENV=py35-dj21
- TOX_ENV=py35-dj22
- TOX_ENV=py35-djmaster
matrix:
include:
- python: "3.6"
Expand All @@ -33,6 +32,8 @@ matrix:
env: TOX_ENV=py36-dj21
- python: "3.6"
env: TOX_ENV=py36-dj22
- python: "3.6"
env: TOX_ENV=py36-dj30
- python: "3.6"
env: TOX_ENV=py36-djmaster
- python: "3.7"
Expand All @@ -41,12 +42,20 @@ matrix:
env: TOX_ENV=py37-dj21
- python: "3.7"
env: TOX_ENV=py37-dj22
- python: "3.7"
env: TOX_ENV=py37-dj30
- python: "3.7"
env: TOX_ENV=py37-djmaster
- python: "3.8"
env: TOX_ENV=py38-dj22
- python: "3.8"
env: TOX_ENV=py38-dj30
- python: "3.8"
env: TOX_ENV=py38-djmaster
allow_failures:
- env: TOX_ENV=py35-djmaster
- env: TOX_ENV=py36-djmaster
- env: TOX_ENV=py37-djmaster
- env: TOX_ENV=py38-djmaster
install:
- pip install tox
script:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ It works at application level, so your django instance should be up.
It doesn't use database and doesn't prevent database access.

## Requirements
- Python 2.7, 3.4, 3.5, 3.6, 3.7
- Django 1.7, 1.8, 1.9, 1.10, 1.11, 2.0, 2.1, 2.2
- Python 2.7, 3.4, 3.5, 3.6, 3.7, 3.8
- Django 1.7, 1.8, 1.9, 1.10, 1.11, 2.0, 2.1, 2.2, 3.0

## Installation

Expand Down
2 changes: 1 addition & 1 deletion maintenance_mode/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from django.core.exceptions import ImproperlyConfigured

try:
from django.utils.decorators import ContextDecorator
from contextlib import ContextDecorator
except ImportError:
# ContextDecorator was introduced in Django 1.8
from django.utils.decorators import available_attrs
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
'Framework :: Django :: 2.0',
'Framework :: Django :: 2.1',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
Expand All @@ -55,6 +56,7 @@
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Software Development :: Build Tools',
],
license='MIT',
Expand Down
8 changes: 5 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
envlist =
py27-{dj17,dj18,dj19,dj110,dj111},
py34-{dj17,dj18,dj19,dj110,dj111,dj20},
py35-{dj18,dj19,dj110,dj111,dj20,dj21,dj22,djmaster},
py36-{dj18,dj19,dj110,dj111,dj20,dj21,dj22,djmaster},
py37-{dj20,dj21,dj22,djmaster},
py35-{dj18,dj19,dj110,dj111,dj20,dj21,dj22},
py36-{dj18,dj19,dj110,dj111,dj20,dj21,dj22,dj30,djmaster},
py37-{dj20,dj21,dj22,dj30,djmaster},
py38-{dj22,dj30,djmaster},
[testenv]
passenv = CI TRAVIS TRAVIS_*
deps =
Expand All @@ -16,6 +17,7 @@ deps =
dj20: Django >= 2.0, < 2.1
dj21: Django >= 2.1, < 2.2
dj22: Django >= 2.2, < 2.3
dj30: Django >= 3.0, < 3.1
djmaster: https://github.com/django/django/archive/master.tar.gz
coverage
codecov
Expand Down

0 comments on commit 9d3ab83

Please sign in to comment.