Skip to content

Commit

Permalink
Merge pull request mx-moth#13 from timheap/django-3
Browse files Browse the repository at this point in the history
Support Django 3.x, drop support for Django 1.x
  • Loading branch information
Tim Heap authored Dec 30, 2019
2 parents 59e230f + e19b823 commit 66979d1
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 31 deletions.
36 changes: 17 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,34 @@ cache: pip

matrix:
include:
- env: TOXENV="py34-dj{110,111,20}"
- env: TOXENV="py34-dj20"
python: '3.4'
- env: TOXENV="py35-dj{110,111,20,21}"

- env: TOXENV="py35-dj{20,21,22}"
python: '3.5'
- env: TOXENV="py36-dj{110,111,20,21}"
python: '3.6'
- env: TOXENV="py37-dj{110,111,20,21}"
python: '3.7'
dist: xenial
sudo: true

- env: |
TOXENV="py37-dj{111,20,21}-postgres"
TOXENV="py36-dj{20,21,22,30}-postgres"
DATABASE_URL="postgres://postgres@localhost/database"
python: '3.7'
dist: xenial
sudo: true
python: '3.6'
services:
- postgresql
- env: |
TOXENV="py37-dj{111,20,21}-mysql"
TOXENV="py36-dj{20,21,22,30}-mysql"
DATABASE_URL="mysql://[email protected]/database"
python: '3.7'
dist: xenial
sudo: true
python: '3.6'
services:
- mysql
- env: TOXENV="flake8,isort,docs"
- env: TOXENV="py37-dj{20,21,22,30}"
python: '3.7'
dist: xenial
sudo: true

- env: TOXENV="py38-dj{22,30}"
python: '3.8'

- env: TOXENV="flake8,isort,docs"
python: '3.8'

install:
- pip install --upgrade pip wheel tox
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Sphinx==1.3.1
Sphinx==2.3.1
sphinx_rtd_theme
2 changes: 1 addition & 1 deletion enumchoicefield/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __init__(self, enum_class, *args, **kwargs):
len(item.name) for item in enum_class))
super(EnumChoiceField, self).__init__(*args, **kwargs)

def from_db_value(self, value, expression, connection, context):
def from_db_value(self, value, expression, connection):
"""
Convert a string from the database into an Enum value
"""
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
author_email='[email protected]',
url='https://github.com/timheap/django-enumchoicefield',

install_requires=['Django>=1.10'],
install_requires=['Django>=2.0'],
zip_safe=False,
license='BSD License',

Expand All @@ -36,10 +36,10 @@
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Framework :: Django',
'License :: OSI Approved :: BSD License',
],
Expand Down
18 changes: 10 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
[tox]
skip_missing_interpreters = True

envlist =
py34-dj{110,111,20}
py35-dj{110,111,20,21,22}
py36-dj{111,20,21,22}
py37-dj{111,20,21,22}
py34-dj{20}
py35-dj{20,21,22}
py36-dj{20,21,22,30}
py37-dj{20,21,22,30}
py38-dj{22,30}
flake8,isort,docs

[testenv]
Expand All @@ -15,11 +18,10 @@ passenv = DJANGO_SETTINGS_MODULE DATABASE_URL

deps =
-rrequirements-test.txt
dj110: Django~=1.10.0
dj111: Django~=1.11.0
dj20: Django~=2.0.0
dj21: Django~=2.1a1
dj22: Django~=2.2a1
dj21: Django~=2.1.0
dj22: Django~=2.2.0
dj30: Django~=3.0.0
postgres: psycopg2
mysql: mysqlclient

Expand Down

0 comments on commit 66979d1

Please sign in to comment.