From 83432a37e6992f801adf7b7a8155aa1d4b018b20 Mon Sep 17 00:00:00 2001 From: Weirdo914 Date: Tue, 14 Jan 2020 14:09:01 +0530 Subject: [PATCH] [requirements] Update dependencies & python version used. #246 Updated dependencies Testing on python version 3.6 and 3.7 Added Support for django 3 Closes #246 --- .travis.yml | 10 +++++++--- django_freeradius/api/urls.py | 2 +- django_freeradius/base/admin.py | 2 +- django_freeradius/tests/test_api.py | 2 +- django_freeradius/tests/test_commands.py | 2 +- requirements-test.txt | 4 ++-- requirements.txt | 9 ++++----- setup.py | 3 +-- 8 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 330dd8c..0e22b65 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,14 +3,14 @@ language: python cache: pip python: - - "3.5" - "3.6" + - "3.7" services: - mysql addons: - postgresql: "9.4" + postgresql: "9.5" branches: only: @@ -22,8 +22,12 @@ env: - DJANGO="django>=2.2,<2.3" DATABASE_URL='postgres://postgres@127.0.0.1/freeradius_test' - DJANGO="django>=2.1,<2.2" DATABASE_URL='mysql://root@127.0.0.1/freeradius_test' - DJANGO="django>=2.1,<2.2" DATABASE_URL='postgres://postgres@127.0.0.1/freeradius_test' + - DJANGO="django>=3.0,<3.1" DATABASE_URL='mysql://root@127.0.0.1/freeradius_test' + - DJANGO="django>=3.0,<3.1" DATABASE_URL='postgres://postgres@127.0.0.1/freeradius_test' - SAMPLE_APP=1 DJANGO="django>=2.1,<2.2" DATABASE_URL='mysql://root@127.0.0.1/freeradius_test' + - SAMPLE_APP=1 DJANGO="django>=3.0,<3.1" DATABASE_URL='mysql://root@127.0.0.1/freeradius_test' - DJANGO="django>=2.0,<2.1" DATABASE_URL='sqlite:///django-freeradius.db' + - DJANGO="django>=3.0,<3.1" DATABASE_URL='sqlite:///django-freeradius.db' before_install: - pip install -U pip wheel @@ -42,7 +46,7 @@ before_script: openwisp-utils-qa-checks --migration-path "./django_freeradius/migrations ./tests/sample_radius/migrations" --skip-checkmakemigrations - | - if [[ $TRAVIS_PYTHON_VERSION == 3.5 && $SAMPLE_APP != "1" ]]; then + if [[ $SAMPLE_APP != "1" ]]; then openwisp-utils-qa-checks \ --skip-isort \ --skip-flake8 \ diff --git a/django_freeradius/api/urls.py b/django_freeradius/api/urls.py index 1970575..604a181 100644 --- a/django_freeradius/api/urls.py +++ b/django_freeradius/api/urls.py @@ -1,7 +1,7 @@ from django.conf.urls import url -from . import views from .. import settings as app_settings +from . import views urlpatterns = [ url(r'^authorize/$', views.authorize, name='authorize'), diff --git a/django_freeradius/base/admin.py b/django_freeradius/base/admin.py index 27372a3..204f8d0 100644 --- a/django_freeradius/base/admin.py +++ b/django_freeradius/base/admin.py @@ -1,10 +1,10 @@ import swapper from django.contrib import messages from django.contrib.admin import ModelAdmin, StackedInline -from django.contrib.admin.templatetags.admin_static import static from django.contrib.admin.utils import model_ngettext from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.core.exceptions import PermissionDenied +from django.templatetags.static import static from django.utils.translation import ugettext_lazy as _ from openwisp_utils.admin import ReadOnlyAdmin, TimeReadonlyAdminMixin diff --git a/django_freeradius/tests/test_api.py b/django_freeradius/tests/test_api.py index f3b7af2..32e38fb 100644 --- a/django_freeradius/tests/test_api.py +++ b/django_freeradius/tests/test_api.py @@ -5,9 +5,9 @@ from django.contrib.auth import get_user_model from django.test import TestCase -from . import CreateRadiusObjectsMixin, PostParamsMixin from .. import settings as app_settings from ..models import RadiusUserGroup +from . import CreateRadiusObjectsMixin, PostParamsMixin from .base.test_api import ( BaseTestApi, BaseTestApiReject, BaseTestAutoGroupname, BaseTestAutoGroupnameDisabled, ) diff --git a/django_freeradius/tests/test_commands.py b/django_freeradius/tests/test_commands.py index d3a2fde..8dcfa9b 100644 --- a/django_freeradius/tests/test_commands.py +++ b/django_freeradius/tests/test_commands.py @@ -3,8 +3,8 @@ from django.test import TestCase -from . import CallCommandMixin, CreateRadiusObjectsMixin, FileMixin from ..models import RadiusAccounting, RadiusBatch, RadiusPostAuth +from . import CallCommandMixin, CreateRadiusObjectsMixin, FileMixin from .base.test_commands import BaseTestCommands diff --git a/requirements-test.txt b/requirements-test.txt index b299155..1d28e3c 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -7,5 +7,5 @@ sphinx_rtd_theme freezegun django-extensions django-rest-auth>=0.9.3,<0.12.0 -django-allauth>=0.39.0,<0.39.1 -openwisp-utils[qa]>=0.3.2 +django-allauth>=0.41.0,<0.42.0 +openwisp-utils[qa]>=0.4.0 diff --git a/requirements.txt b/requirements.txt index 2df799a..c663f59 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,8 @@ -django>=2.0,<2.3 +django>=2.0,<3.1 swapper>=1.1.0,<1.2.0 -# minimum version will have to be 0.3.0 -openwisp-utils>=0.3.2,<0.4.0 +openwisp-utils>=0.4.0,<0.5.0 djangorestframework>=3.8.2,<3.12.0 passlib>=1.7.1,<1.8.0 -django-filter>=2.1.0,<2.2.0 +django-filter>=2.1.0,<2.3.0 djangorestframework-link-header-pagination>=0.1.1,<0.2.0 -weasyprint>=43,<51 +weasyprint>=43,<52 diff --git a/setup.py b/setup.py index 69b538c..22c14f9 100644 --- a/setup.py +++ b/setup.py @@ -59,7 +59,6 @@ def get_install_requires(): 'Operating System :: OS Independent', 'Framework :: Django', 'Topic :: System :: Networking', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3', ] )