Merge ~shanepelletier/django-preflight:SN1842-upgrade-to-django3.2 into django-preflight:master

Proposed by Shane M. Pelletier
Status: Merged
Approved by: Shane M. Pelletier
Approved revision: 7033f90d20a6121c446a1e7bb77c53155cf86d14
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~shanepelletier/django-preflight:SN1842-upgrade-to-django3.2
Merge into: django-preflight:master
Diff against target: 201 lines (+18/-54)
9 files modified
doc/install.rst (+2/-2)
example_project/example_project/settings.py (+1/-2)
example_project/example_project/urls.py (+2/-2)
preflight/models.py (+1/-1)
preflight/tests.py (+1/-1)
preflight/urls.py (+2/-2)
preflight/views.py (+1/-1)
setup.py (+2/-1)
tox.ini (+6/-42)
Reviewer Review Type Date Requested Status
David Approve
Review via email: mp+447994@code.launchpad.net

Commit message

Upgrade to Django >= 3.2

To post a comment you must log in.
Revision history for this message
David (lofidevops) wrote :

LGTM!

review: Approve
Revision history for this message
Otto Co-Pilot (otto-copilot) wrote :
Revision history for this message
Otto Co-Pilot (otto-copilot) wrote :
Revision history for this message
Otto Co-Pilot (otto-copilot) wrote :
Revision history for this message
Otto Co-Pilot (otto-copilot) wrote :
Revision history for this message
Otto Co-Pilot (otto-copilot) wrote :
7033f90... by Shane M. Pelletier

Fix doctest

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/doc/install.rst b/doc/install.rst
index d8dfe41..bcf655e 100644
--- a/doc/install.rst
+++ b/doc/install.rst
@@ -52,13 +52,13 @@ should look like the following:
5252
53.. testcode::53.. testcode::
5454
55 from django.conf.urls import include, url55 from django.urls import include, re_path
5656
57 import preflight57 import preflight
58 preflight.autodiscover()58 preflight.autodiscover()
5959
60 urlpatterns = [60 urlpatterns = [
61 url(r'^preflight/', include('preflight.urls')),61 re_path(r'^preflight/', include('preflight.urls')),
62 ]62 ]
6363
64.. testoutput::64.. testoutput::
diff --git a/example_project/example_project/settings.py b/example_project/example_project/settings.py
index ca540b3..58a50f0 100644
--- a/example_project/example_project/settings.py
+++ b/example_project/example_project/settings.py
@@ -27,12 +27,11 @@ INSTALLED_APPS = [
27 'app',27 'app',
28]28]
2929
30MIDDLEWARE_CLASSES = [30MIDDLEWARE = [
31 'django.contrib.sessions.middleware.SessionMiddleware',31 'django.contrib.sessions.middleware.SessionMiddleware',
32 'django.middleware.common.CommonMiddleware',32 'django.middleware.common.CommonMiddleware',
33 'django.middleware.csrf.CsrfViewMiddleware',33 'django.middleware.csrf.CsrfViewMiddleware',
34 'django.contrib.auth.middleware.AuthenticationMiddleware',34 'django.contrib.auth.middleware.AuthenticationMiddleware',
35 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
36 'django.contrib.messages.middleware.MessageMiddleware',35 'django.contrib.messages.middleware.MessageMiddleware',
37 'django.middleware.clickjacking.XFrameOptionsMiddleware',36 'django.middleware.clickjacking.XFrameOptionsMiddleware',
38]37]
diff --git a/example_project/example_project/urls.py b/example_project/example_project/urls.py
index 04dc288..b1cb34a 100644
--- a/example_project/example_project/urls.py
+++ b/example_project/example_project/urls.py
@@ -1,10 +1,10 @@
1# Copyright 2010 Canonical Ltd. This software is licensed under the1# Copyright 2010 Canonical Ltd. This software is licensed under the
2# GNU Affero General Public License version 3 (see the file LICENSE).2# GNU Affero General Public License version 3 (see the file LICENSE).
3import preflight3import preflight
4from django.conf.urls import include, url4from django.urls import include, re_path
55
6preflight.autodiscover()6preflight.autodiscover()
77
8urlpatterns = [8urlpatterns = [
9 url(r'^preflight/', include('preflight.urls')),9 re_path(r'^preflight/', include('preflight.urls')),
10]10]
diff --git a/preflight/models.py b/preflight/models.py
index fb98037..e0940c0 100644
--- a/preflight/models.py
+++ b/preflight/models.py
@@ -16,10 +16,10 @@ import django
16from django import db16from django import db
17from django.conf import settings17from django.conf import settings
18from django.core.cache import caches18from django.core.cache import caches
19from django.views.debug import HIDDEN_SETTINGS
2019
21from .conf import ENABLE_SETTINGS20from .conf import ENABLE_SETTINGS
2221
22HIDDEN_SETTINGS = re.compile(r"API|TOKEN|KEY|SECRET|PASS|SIGNATURE|HTTP_COOKIE", flags=re.IGNORECASE)
23REGISTRY = []23REGISTRY = []
2424
2525
diff --git a/preflight/tests.py b/preflight/tests.py
index 8fd1e7f..ee6fc7e 100644
--- a/preflight/tests.py
+++ b/preflight/tests.py
@@ -15,7 +15,7 @@ import six
15from django.contrib.auth.models import AnonymousUser, User15from django.contrib.auth.models import AnonymousUser, User
16from django.conf import settings16from django.conf import settings
17from django.core.management import call_command17from django.core.management import call_command
18from django.core.urlresolvers import reverse18from django.urls import reverse
19from django.http import HttpResponse19from django.http import HttpResponse
20from django.test import TestCase20from django.test import TestCase
21from django.template import RequestContext21from django.template import RequestContext
diff --git a/preflight/urls.py b/preflight/urls.py
index ddc9f75..a9e89aa 100644
--- a/preflight/urls.py
+++ b/preflight/urls.py
@@ -3,13 +3,13 @@ from __future__ import unicode_literals
3# GNU Affero General Public License version 3 (see the file LICENSE).3# GNU Affero General Public License version 3 (see the file LICENSE).
44
5import django5import django
6from django.conf.urls import url6from django.urls import re_path
77
8import preflight.views8import preflight.views
99
1010
11urlpatterns = [11urlpatterns = [
12 url(r'^$', preflight.views.overview, name='preflight-overview'),12 re_path(r'^$', preflight.views.overview, name='preflight-overview'),
13]13]
1414
15if django.VERSION[:2] < (1, 10):15if django.VERSION[:2] < (1, 10):
diff --git a/preflight/views.py b/preflight/views.py
index 5db1a32..cad9046 100644
--- a/preflight/views.py
+++ b/preflight/views.py
@@ -77,7 +77,7 @@ def check_basic_auth(request):
77def allow_basic_auth(f):77def allow_basic_auth(f):
78 @functools.wraps(f)78 @functools.wraps(f)
79 def wrapper(self, request):79 def wrapper(self, request):
80 if not request.user.is_authenticated():80 if not request.user.is_authenticated:
81 basic_user = check_basic_auth(request)81 basic_user = check_basic_auth(request)
82 if basic_user is not None:82 if basic_user is not None:
83 request.user = basic_user83 request.user = basic_user
diff --git a/setup.py b/setup.py
index 31ba70e..1dbadaf 100644
--- a/setup.py
+++ b/setup.py
@@ -57,7 +57,8 @@ setup(
57 },57 },
58 install_requires=[58 install_requires=[
59 'django >= 1.4',59 'django >= 1.4',
60 'future >= 0.15.2'60 'future >= 0.15.2',
61 'six'
61 ],62 ],
62 tests_require=tests_require,63 tests_require=tests_require,
63 extras_require={64 extras_require={
diff --git a/tox.ini b/tox.ini
index 60ef9c0..e1a754f 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,8 +1,7 @@
1[tox]1[tox]
2envlist =2envlist =
3 py27-django1.7, py27-django1.8, py27-django1.9, py27-django1.10, py27-django1.11,3 py36, py37, py38, py39, docs
4 py35-django1.11,4skip_missing_interpreters = true
5 docs
65
7[testenv]6[testenv]
8commands=python manage.py test preflight7commands=python manage.py test preflight
@@ -11,6 +10,9 @@ deps =
11 pip == 18.110 pip == 18.1
12 mock > 0.611 mock > 0.6
13 pyquery12 pyquery
13 django>=3.2
14 six
15 future
14install_command = pip install {opts} {packages}16install_command = pip install {opts} {packages}
1517
16[testenv:docs]18[testenv:docs]
@@ -19,42 +21,4 @@ changedir=doc
19deps=sphinx21deps=sphinx
20commands=22commands=
21 sphinx-build -b doctest -d {envtmpdir}/doctrees . {envtmpdir}/doctest23 sphinx-build -b doctest -d {envtmpdir}/doctrees . {envtmpdir}/doctest
22 sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html24 sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
23
24[testenv:py27]
25basepython = python2.7
26
27[testenv:py35]
28basepython = python3.5
29
30[testenv:py27-django1.7]
31deps =
32 {[testenv]deps}
33 gargoyle >= 0.6.0
34 django >= 1.7, < 1.8
35
36[testenv:py27-django1.8]
37deps =
38 {[testenv]deps}
39 gargoyle >= 0.6.0
40 django >= 1.8, < 1.9
41
42[testenv:py27-django1.9]
43deps =
44 {[testenv]deps}
45 django >= 1.9, < 1.10
46
47[testenv:py27-django1.10]
48deps =
49 {[testenv]deps}
50 django >= 1.10, < 1.11
51
52[testenv:py27-django1.11]
53deps =
54 {[testenv]deps}
55 django >= 1.11, < 1.12
56
57[testenv:py35-django1.11]
58deps =
59 {[testenv]deps}
60 django >= 1.11, < 1.12
61\ No newline at end of file25\ No newline at end of file

Subscribers

People subscribed via source and target branches