diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index d3645366..2daa57bc 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -15,11 +15,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9"] - django-version: ["2.2", "3.1", "3.2", "4.0"] + python-version: ["3.8", "3.9", "3.10"] + django-version: ["3.2", "4.0"] include: - - python-version: "3.10" - django-version: "4.0" + - python-version: "3.7" + django-version: "3.2" steps: - uses: actions/checkout@v2 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c06a4d20..0f8808b6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: - id: debug-statements - repo: https://github.com/asottile/pyupgrade - rev: v2.31.0 + rev: v2.31.1 hooks: - id: pyupgrade args: [--py36-plus] @@ -32,15 +32,15 @@ repos: args: ['--settings-path=pyproject.toml'] - repo: https://github.com/psf/black - rev: 21.12b0 + rev: 22.3.0 hooks: - id: black - repo: https://github.com/adamchainz/django-upgrade - rev: 1.3.2 + rev: 1.4.0 hooks: - id: django-upgrade - args: [--target-version, "2.2"] + args: [--target-version, "3.2"] - repo: https://github.com/pycqa/flake8 rev: 4.0.1 diff --git a/djangosaml2/utils.py b/djangosaml2/utils.py index d81b259e..1b4e824a 100644 --- a/djangosaml2/utils.py +++ b/djangosaml2/utils.py @@ -22,14 +22,10 @@ from django.core.exceptions import ImproperlyConfigured from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import resolve_url -from saml2.mdstore import MetaDataMDX - -try: - from django.utils.http import url_has_allowed_host_and_scheme -except ImportError: # django 2.2 - from django.utils.http import is_safe_url as url_has_allowed_host_and_scheme +from django.utils.http import url_has_allowed_host_and_scheme from saml2.config import SPConfig +from saml2.mdstore import MetaDataMDX from saml2.s_utils import UnknownSystemEntity logger = logging.getLogger(__name__) diff --git a/setup.py b/setup.py index 13e8f606..5ec88ccd 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ def read(*rnames): setup( name="djangosaml2", - version="1.4.0", + version="1.5.0", description="pysaml2 integration for Django", long_description=read("README.md"), long_description_content_type="text/markdown", @@ -35,15 +35,12 @@ def read(*rnames): "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", - "Framework :: Django :: 2.2", - "Framework :: Django :: 3.1", "Framework :: Django :: 3.2", "Framework :: Django :: 4.0", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", diff --git a/tox.ini b/tox.ini index a04936ec..ecab4b99 100644 --- a/tox.ini +++ b/tox.ini @@ -1,14 +1,12 @@ [tox] envlist = - py{3.6,3.7,3.8,3.9,3.10}-django{2.2,3.1,3.2,4.0} + py{3.7,3.8,3.9,3.10}-django{3.2,4.0} [testenv] commands = python tests/run_tests.py deps = - django2.2: django~=2.2 - django3.1: django~=3.1 django3.2: django~=3.2 django4.0: django~=4.0 djangomaster: https://github.com/django/django/archive/master.tar.gz