Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request #15 from sjdines/feature/django_2_compatability
Browse files Browse the repository at this point in the history
re #14 Add Django 2 compatibility.
  • Loading branch information
Stuart Dines authored Jan 18, 2018
2 parents 3ccdbfc + 6ea491e commit f6d63cd
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 15 deletions.
49 changes: 37 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,43 @@
# Config file for automatic testing at travis-ci.org

language: python
matrix:
include:
- python: 2.7
env: TOXENV=django18-py27
- python: 2.7
env: TOXENV=django19-py27
- python: 2.7
env: TOXENV=django110-py27
- python: 2.7
env: TOXENV=django111-py27
- python: 3.3
env: TOXENV=django18-py33
- python: 3.4
env: TOXENV=django18-py34
- python: 3.4
env: TOXENV=django19-py34
- python: 3.4
env: TOXENV=django110-py34
- python: 3.4
env: TOXENV=django111-py34
- python: 3.4
env: TOXENV=django20-py34
- python: 3.5
env: TOXENV=django18-py35
- python: 3.5
env: TOXENV=django19-py35
- python: 3.5
env: TOXENV=django110-py35
- python: 3.5
env: TOXENV=django111-py35
- python: 3.5
env: TOXENV=django20-py35
- python: 3.6
env: TOXENV=django111-py36
- python: 3.6
env: TOXENV=django20-py36


before_install:
- pip install codecov tox
Expand All @@ -11,17 +48,5 @@ install: pip install -r requirements-test.txt
# command to run tests using coverage, e.g. python setup.py test
script: tox

env:
- TOXENV=django18-py27
- TOXENV=django19-py27
- TOXENV=django110-py27
- TOXENV=django18-py33
- TOXENV=django18-py34
- TOXENV=django19-py34
- TOXENV=django110-py34
- TOXENV=django18-py35
- TOXENV=django19-py35
- TOXENV=django110-py35

after_success:
- codecov
3 changes: 2 additions & 1 deletion AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ Contributors
* @Zeioth
* Max Arnold - @max-arnold
* Marcin Zajączkowski - @szpak
* @simaojf
* @simaojf
* Stu Dines - @sjdines
9 changes: 8 additions & 1 deletion disposable_email_checker/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@
from django.core import validators
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
from django.core.urlresolvers import get_callable

from bdea.client import BDEAClient

# Django moved the location of `get_callable` in Django 2.0. We have kept the original import for
# backwards compatibility.
try:
from django.core.urlresolvers import get_callable
except ImportError:
from django.urls import get_callable


class DisposableEmailChecker():
"""
Expand Down
5 changes: 4 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = django{18,19,110}-py{27,34,35}, django18-py33
envlist = django{18,19,110,111}-py{27,34,35}, django111-py36, django18-py33, django20-py{34,35,36}


[testenv]
Expand All @@ -8,11 +8,14 @@ basepython =
py33: python3.3
py34: python3.4
py35: python3.5
py36: python3.6
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/disposable_email_checker
commands = coverage run --source disposable_email_checker runtests.py
deps =
django18: django>=1.8,<1.9
django19: django>=1.9,<1.10
django110: django>=1.10,<1.11
django111: django>=1.11,<2
django20: django>=2,<2.1
-r{toxinidir}/requirements-test.txt

0 comments on commit f6d63cd

Please sign in to comment.