Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade project for Python 3.7 and Django 2.1 #93

Merged
merged 10 commits into from
Jul 28, 2018
4 changes: 2 additions & 2 deletions .pyup.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
update: all
pin: True
branch: development
schedule: "every week on thursday"
schedule: "monthly"
branch_prefix: update/
pr_prefix: "[PyUp]"
pr_prefix: "❗️ "
42 changes: 24 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,42 @@ python:
- 3.4
- 3.5
- 3.6
- 3.7-dev
env:
- DJANGO='django>=1.8,<1.9'
- DJANGO='django>=1.10,<1.11'
- DJANGO='django>=1.11,<1.12'
- DJANGO='django>=2.0,<2.1'
- DJANGO='django>=2.1rc,<2.2'
- DJANGO=https://github.com/django/django/archive/master.tar.gz
matrix:
include:
- python: 3.7
env: DJANGO='django>=2.0,<2.1'
sudo: required
dist: xenial
- python: 3.7
env: DJANGO='django>=2.1rc,<2.2'
sudo: required
dist: xenial
- python: 3.7
env: DJANGO=https://github.com/django/django/archive/master.tar.gz
sudo: required
dist: xenial
exclude:
- python: 3.4
env: DJANGO=https://github.com/django/django/archive/master.tar.gz
- python: 3.4
env: DJANGO='django>=2.1rc,<2.2'
- python: 3.6
env: DJANGO='django>=1.8,<1.9'
- python: 3.6
env: DJANGO='django>=1.10,<1.11'
- python: 3.7-dev
env: DJANGO='django>=1.8,<1.9'
- python: 3.7-dev
env: DJANGO='django>=1.10,<1.11'
- python: 3.7-dev
env: DJANGO='django>=1.11,<1.12'
allow_failures:
- python: 3.5
env: DJANGO=https://github.com/django/django/archive/master.tar.gz
- python: 3.6
env: DJANGO=https://github.com/django/django/archive/master.tar.gz
- python: 3.7-dev
env: DJANGO='django>=2.0,<2.1'
- python: 3.7-dev
- python: 3.7
env: DJANGO=https://github.com/django/django/archive/master.tar.gz
sudo: required
dist: xenial
install:
- pip install -r requirements.txt
- pip install -r example_extension_project/requirements.txt
Expand All @@ -47,11 +53,11 @@ install:
- pip install codecov
- ./setup.py develop
before_script:
- if [[ `python -V | grep -c -e 3.6` -eq 1 && "$DJANGO" == 'django>=1.11,<1.12' ]]; then ./setup.py check --strict --metadata --restructuredtext ; fi
- if [[ `python -V | grep -c -e 3.6` -eq 1 && "$DJANGO" == 'django>=1.11,<1.12' ]]; then check-manifest . ; fi
- if [[ `python -V | grep -c -e 3.6` -eq 1 && "$DJANGO" == 'django>=1.11,<1.12' ]]; then flake8 src tests setup.py runtests.py ; fi
- if [[ `python -V | grep -c -e 3.6` -eq 1 && "$DJANGO" == 'django>=1.11,<1.12' ]]; then isort --verbose --check-only --diff --recursive src tests setup.py runtests.py ; fi
- if [[ `python -V | grep -c -e 3.6` -eq 1 && "$DJANGO" == 'django>=1.11,<1.12' ]]; then pylint --rcfile=.pylintrc -d duplicate-code -d fixme src tests setup.py runtests.py ; fi
- if [[ `python -V | grep -c -e 3.7` -eq 1 && "$DJANGO" == 'django>=1.11,<1.12' ]]; then ./setup.py check --strict --metadata --restructuredtext ; fi
- if [[ `python -V | grep -c -e 3.7` -eq 1 && "$DJANGO" == 'django>=1.11,<1.12' ]]; then check-manifest . ; fi
- if [[ `python -V | grep -c -e 3.7` -eq 1 && "$DJANGO" == 'django>=1.11,<1.12' ]]; then flake8 src tests setup.py runtests.py ; fi
- if [[ `python -V | grep -c -e 3.7` -eq 1 && "$DJANGO" == 'django>=1.11,<1.12' ]]; then isort --verbose --check-only --diff --recursive src tests setup.py runtests.py ; fi
- if [[ `python -V | grep -c -e 3.7` -eq 1 && "$DJANGO" == 'django>=1.11,<1.12' ]]; then pylint --rcfile=.pylintrc -d duplicate-code -d fixme src tests setup.py runtests.py ; fi
script:
# do not use setup.py test with coverage; missing files omitted entirely
- coverage run runtests.py
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Tests: |Travis| |AppVeyor| |Coverage| |PyUp|
:target: https://pypi.python.org/pypi/django-improved-user/
:alt: Python Support

.. |Django| image:: https://img.shields.io/badge/Django-1.8%2C%201.10%2C%201.11-blue.svg
.. |Django| image:: https://img.shields.io/badge/Django-1.8%2C%201.11%2C%202.0%2C%202.1-blue.svg
:target: https://pypi.python.org/pypi/django-improved-user/
:alt: Django Support

Expand Down
18 changes: 12 additions & 6 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ environment:
- PYTHON: "C:\\Python34"
DJANGO: "django>=1.8,<1.9"

- PYTHON: "C:\\Python34"
DJANGO: "django>=1.10,<1.11"

- PYTHON: "C:\\Python34"
DJANGO: "django>=1.11,<1.12"

Expand All @@ -29,21 +26,30 @@ environment:
- PYTHON: "C:\\Python35"
DJANGO: "django>=1.8,<1.9"

- PYTHON: "C:\\Python35"
DJANGO: "django>=1.10,<1.11"

- PYTHON: "C:\\Python35"
DJANGO: "django>=1.11,<1.12"

- PYTHON: "C:\\Python35"
DJANGO: "django>=2.0,<2.1"

- PYTHON: "C:\\Python35"
DJANGO: "django>=2.1rc,<2.2"

- PYTHON: "C:\\Python36"
DJANGO: "django>=1.11,<1.12"

- PYTHON: "C:\\Python36"
DJANGO: "django>=2.0,<2.1"

- PYTHON: "C:\\Python36"
DJANGO: "django>=2.1rc,<2.2"

- PYTHON: "C:\\Python37"
DJANGO: "django>=2.0,<2.1"

- PYTHON: "C:\\Python37"
DJANGO: "django>=2.1rc,<2.2"


init:
- echo "%DJANGO%"
Expand Down
2 changes: 1 addition & 1 deletion example_extension_project/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
django-coverage-plugin==1.5.0
git+https://github.com/jambonsw/django_coverage_plugin@fix_issue_51_change_token_type_for_django_21#egg=django_coverage_plugin
django-extensions==2.1.0
factory-boy==2.11.1
2 changes: 1 addition & 1 deletion example_integration_project/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
django-coverage-plugin==1.5.0
git+https://github.com/jambonsw/django_coverage_plugin@fix_issue_51_change_token_type_for_django_21#egg=django_coverage_plugin
django-extensions==2.1.0
django-registration==2.4.1
2 changes: 1 addition & 1 deletion example_replacement_project/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
django-coverage-plugin==1.5.0
git+https://github.com/jambonsw/django_coverage_plugin@fix_issue_51_change_token_type_for_django_21#egg=django_coverage_plugin
django-extensions==2.1.0
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def run_tests(self):
packages=find_packages('src'),
package_dir={'': 'src'},
install_requires=[
'django>=1.8,!=1.9.*',
'django>=1.8,!=1.9.*,!=1.10.*',
],
extras_require={
'factory': [
Expand Down Expand Up @@ -180,10 +180,12 @@ def run_tests(self):
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3 :: Only',
'Framework :: Django',
'Framework :: Django :: 1.8',
'Framework :: Django :: 1.10',
'Framework :: Django :: 1.11',
'Framework :: Django :: 2.0',
'Framework :: Django :: 2.1',
],
)
5 changes: 3 additions & 2 deletions tests/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ def test_display_fields(self):

def test_add_has_required_fields(self):
"""Test all required fields in Admin Add view"""
excluded_model_fields = ['date_joined', 'password']
excluded_model_fields = [
'date_joined', 'is_active', 'is_staff', 'is_superuser', 'password',
]
required_model_fields = [
field.name
for field in User._meta.get_fields()
Expand All @@ -108,7 +110,6 @@ def test_add_has_required_fields(self):
and hasattr(field, 'blank') and field.blank is False)
]
extra_form_fields = [

field_name
for field_name in list(
UserCreationForm.declared_fields, # pylint: disable=no-member
Expand Down
22 changes: 12 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
[tox]
envlist =
py36-django20-lint,
py36-django20-pylint,
py36-django20-pkgcheck,
py37-django21-lint,
py37-django21-pylint,
py37-django21-pkgcheck,
py35-docs,
{py34,py35}-django{18,110,111,20}-unit
{py35}-django{master}-unit,
{py36}-django{111,20,master}-unit,
{py34,py35}-django{18,110,111,20}-{extension,integration,replacement}
{py35}-django{master}-{extension,integration,replacement},
{py36}-django{111,20,master}-{extension,integration,replacement},
py34-django{18,111,20}-unit
py35-django{18,111,20,21,master}-unit
py36-django{111,20,21,master}-unit,
py37-django{20,21,master}-unit,
py34-django{18,111,20}-{extension,integration,replacement}
py35-django{18,111,20,21,master}-{extension,integration,replacement}
py36-django{111,20,21,master}-{extension,integration,replacement},
py37-django{20,21,master}-{extension,integration,replacement},

[testenv]
changedir =
Expand All @@ -32,9 +34,9 @@ deps =
{fixme,integration,pylint}: -r{toxinidir}/example_integration_project/requirements.txt
{fixme,pylint,replacement}: -r{toxinidir}/example_replacement_project/requirements.txt
django18: Django>=1.8,<1.9
django110: Django>=1.10,<1.11
django111: Django>=1.11,<2.0
django20: Django>=2.0,<2.1
django21: Django>=2.1rc,<2.2
djangomaster: https://github.com/django/django/archive/master.tar.gz
commands =
docs: sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
Expand Down