diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 11cdd21f..374b385c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,8 @@ Changelog 2.6.0 (unreleased) ================== +* Added support for Django 3.0 +* Added support for Python 3.8 * Pinned ``django-filer`` to 1.5.0 * Added further tests to raise coverage * Fixed smaller issues found during testing diff --git a/README.rst b/README.rst index 7a8fd7b4..d240d33d 100644 --- a/README.rst +++ b/README.rst @@ -130,7 +130,7 @@ You can run tests by executing:: .. |python| image:: https://img.shields.io/badge/python-2.7%20%7C%203.4+-blue.svg :target: https://pypi.org/project/djangocms-link/ -.. |django| image:: https://img.shields.io/badge/django-1.11%20%7C%202.1%20%7C%202.2-blue.svg +.. |django| image:: https://img.shields.io/badge/django-1.11%20%7C%202.2%20%7C%203.0-blue.svg :target: https://www.djangoproject.com/ .. |djangocms| image:: https://img.shields.io/badge/django%20CMS-3.4%2B-blue.svg :target: https://www.django-cms.org/ diff --git a/djangocms_link/models.py b/djangocms_link/models.py index 356804f9..e2b110d1 100644 --- a/djangocms_link/models.py +++ b/djangocms_link/models.py @@ -9,7 +9,7 @@ from django.contrib.sites.models import Site from django.core.exceptions import ValidationError from django.db import models -from django.utils.encoding import force_text, python_2_unicode_compatible +from django.utils.encoding import force_text from django.utils.translation import ugettext from django.utils.translation import ugettext_lazy as _ @@ -17,6 +17,7 @@ from djangocms_attributes_field.fields import AttributesField from filer.fields.file import FilerFileField +from six import python_2_unicode_compatible from .validators import IntranetURLValidator diff --git a/setup.py b/setup.py index 0b13cbc6..161f26a1 100644 --- a/setup.py +++ b/setup.py @@ -26,10 +26,12 @@ 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'Framework :: Django', 'Framework :: Django :: 1.11', 'Framework :: Django :: 2.1', 'Framework :: Django :: 2.2', + 'Framework :: Django :: 3.0', 'Framework :: Django CMS', 'Framework :: Django CMS :: 3.4', 'Framework :: Django CMS :: 3.5', diff --git a/tests/requirements.txt b/tests/requirements.txt index 1a048892..387097ff 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -2,10 +2,9 @@ django-select2>=5.11,<7 # 7 works in Django 2+ django-filer>=1.5.0 djangocms-text-ckeditor html5lib<0.99999999 -djangocms-helper +django-app-helper tox coverage isort flake8 -# override "pyflakes<2.1" from djangocms-helper -pyflakes>=2.1.0 +pyflakes>=2.1 diff --git a/tests/settings.py b/tests/settings.py index bf61eb37..67871038 100644 --- a/tests/settings.py +++ b/tests/settings.py @@ -34,7 +34,7 @@ def run(): - from djangocms_helper import runner + from app_helper import runner runner.cms('djangocms_link') diff --git a/tests/test_fields.py b/tests/test_fields.py index b5586075..a9dc4ad6 100644 --- a/tests/test_fields.py +++ b/tests/test_fields.py @@ -2,7 +2,7 @@ from django.conf import settings from django.test import TestCase -from djangocms_link.fields import is_select2_enabled, PageSearchField +from djangocms_link.fields import PageSearchField, is_select2_enabled from djangocms_link.fields_select2 import Select2PageSearchField diff --git a/tests/test_migrations.py b/tests/test_migrations.py index 8f52564f..071e0799 100644 --- a/tests/test_migrations.py +++ b/tests/test_migrations.py @@ -3,8 +3,9 @@ # http://tech.octopus.energy/news/2016/01/21/testing-for-missing-migrations-in-django.html from django.core.management import call_command from django.test import TestCase, override_settings -from django.utils.six import text_type -from django.utils.six.moves import StringIO + +from six import text_type +from six.moves import StringIO class MigrationTestCase(TestCase): diff --git a/tests/test_models.py b/tests/test_models.py index e60da121..232a0c77 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -4,7 +4,7 @@ from cms.api import create_page -from djangocms_link.models import Link, TARGET_CHOICES +from djangocms_link.models import TARGET_CHOICES, Link from .helpers import get_filer_file diff --git a/tests/test_plugins.py b/tests/test_plugins.py index 7eea4039..d0ff03c8 100644 --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -7,8 +7,8 @@ from cms.models import Placeholder, StaticPlaceholder from cms.test_utils.testcases import CMSTestCase -from djangocms_link.models import AbstractLink from djangocms_link.cms_plugins import LinkPlugin +from djangocms_link.models import AbstractLink from .helpers import get_filer_file diff --git a/tests/test_validators.py b/tests/test_validators.py index d3f84b77..1ba2e401 100644 --- a/tests/test_validators.py +++ b/tests/test_validators.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- from django.test import TestCase -from djangocms_link.validators import IntranetURLValidator from djangocms_link.models import HOSTNAME +from djangocms_link.validators import IntranetURLValidator class LinkValidatorTestCase(TestCase): diff --git a/tox.ini b/tox.ini index 2563fbe7..ec3f1637 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ envlist = flake8 isort - py{27,34,35,36}-dj111-cms{34,35,36} + py{27,35,36}-dj111-cms{35,36} py{27,35,36}-dj111-cms37 py{35,36,37}-dj{21,22}-cms{36,37} @@ -41,12 +41,14 @@ known_django = django deps = -r{toxinidir}/tests/requirements.txt dj111: Django>=1.11,<2.0 + dj111: django-formtools>=2.0,<2.1 + dj111: django-appconf<=1.0.2 dj21: Django>=2.1,<2.2 dj22: Django>=2.2,<3.0 cms34: django-cms>=3.4,<3.5 cms35: django-cms>=3.5,<3.6 cms36: django-cms>=3.6,<3.7 - cms37: https://github.com/divio/django-cms/archive/release/3.7.x.zip + cms37: django-cms>=3.7,<3.8 commands = {envpython} --version {env:COMMAND:coverage} erase