Merge lp:~shanepelletier/django-openid-auth/upgrade-to-django-3.2 into lp:django-openid-auth

Proposed by Shane M. Pelletier
Status: Merged
Approved by: Shane M. Pelletier
Approved revision: 137
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: lp:~shanepelletier/django-openid-auth/upgrade-to-django-3.2
Merge into: lp:django-openid-auth
Diff against target: 194 lines (+32/-38)
9 files modified
django_openid_auth/forms.py (+1/-1)
django_openid_auth/models.py (+4/-0)
django_openid_auth/signals.py (+2/-3)
django_openid_auth/tests/urls.py (+3/-3)
django_openid_auth/urls.py (+4/-4)
example_consumer/settings.py (+1/-0)
example_consumer/urls.py (+6/-6)
setup.py (+2/-2)
tox.ini (+9/-19)
To merge this branch: bzr merge lp:~shanepelletier/django-openid-auth/upgrade-to-django-3.2
Reviewer Review Type Date Requested Status
Maximiliano Bertacchini Approve
Review via email: mp+448158@code.launchpad.net

Commit message

Upgrade to Django>=3.2

To post a comment you must log in.
Revision history for this message
Maximiliano Bertacchini (maxiberta) wrote :

LGTM, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'django_openid_auth/forms.py'
2--- django_openid_auth/forms.py 2020-07-08 01:09:47 +0000
3+++ django_openid_auth/forms.py 2023-08-01 17:48:31 +0000
4@@ -33,7 +33,7 @@
5 from django.contrib.auth.admin import UserAdmin
6 from django.contrib.auth.forms import UserChangeForm
7 from django.contrib.auth.models import Group
8-from django.utils.translation import ugettext as _
9+from django.utils.translation import gettext as _
10 from django.conf import settings
11
12 from openid.yadis import xri
13
14=== modified file 'django_openid_auth/models.py'
15--- django_openid_auth/models.py 2020-07-07 22:57:21 +0000
16+++ django_openid_auth/models.py 2023-08-01 17:48:31 +0000
17@@ -35,6 +35,7 @@
18
19
20 class Nonce(models.Model):
21+ id = models.AutoField(primary_key=True)
22 server_url = models.CharField(max_length=2047)
23 timestamp = models.IntegerField()
24 salt = models.CharField(max_length=40)
25@@ -44,6 +45,8 @@
26
27
28 class Association(models.Model):
29+ id = models.AutoField(primary_key=True)
30+
31 server_url = models.TextField(max_length=2047)
32 handle = models.CharField(max_length=255)
33 secret = models.TextField(max_length=255) # Stored base64 encoded
34@@ -56,6 +59,7 @@
35
36
37 class UserOpenID(models.Model):
38+ id = models.AutoField(primary_key=True)
39 user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
40 claimed_id = models.TextField(max_length=2047, unique=True)
41 display_id = models.TextField(max_length=2047)
42
43=== modified file 'django_openid_auth/signals.py'
44--- django_openid_auth/signals.py 2016-08-12 12:03:47 +0000
45+++ django_openid_auth/signals.py 2023-08-01 17:48:31 +0000
46@@ -32,6 +32,5 @@
47 import django.dispatch
48
49
50-openid_login_complete = django.dispatch.Signal(providing_args=[
51- 'request', 'openid_response'])
52-openid_duplicate_username = django.dispatch.Signal(providing_args=['username'])
53+openid_login_complete = django.dispatch.Signal()
54+openid_duplicate_username = django.dispatch.Signal()
55
56=== modified file 'django_openid_auth/tests/urls.py'
57--- django_openid_auth/tests/urls.py 2017-01-16 12:22:28 +0000
58+++ django_openid_auth/tests/urls.py 2023-08-01 17:48:31 +0000
59@@ -28,7 +28,7 @@
60
61 from __future__ import unicode_literals
62
63-from django.conf.urls import include, url
64+from django.urls import include, re_path
65 from django.http import HttpResponse
66
67
68@@ -37,6 +37,6 @@
69
70
71 urlpatterns = [
72- url(r'^getuser/$', get_user),
73- url(r'^openid/', include('django_openid_auth.urls')),
74+ re_path(r'^getuser/$', get_user),
75+ re_path(r'^openid/', include('django_openid_auth.urls')),
76 ]
77
78=== modified file 'django_openid_auth/urls.py'
79--- django_openid_auth/urls.py 2017-01-16 12:22:28 +0000
80+++ django_openid_auth/urls.py 2023-08-01 17:48:31 +0000
81@@ -29,7 +29,7 @@
82
83 from __future__ import unicode_literals
84
85-from django.conf.urls import url
86+from django.urls import re_path
87
88 from django_openid_auth.views import (
89 login_begin,
90@@ -39,7 +39,7 @@
91
92
93 urlpatterns = [
94- url(r'^login/$', login_begin, name='openid-login'),
95- url(r'^complete/$', login_complete, name='openid-complete'),
96- url(r'^logo.gif$', logo, name='openid-logo'),
97+ re_path(r'^login/$', login_begin, name='openid-login'),
98+ re_path(r'^complete/$', login_complete, name='openid-complete'),
99+ re_path(r'^logo.gif$', logo, name='openid-logo'),
100 ]
101
102=== modified file 'example_consumer/settings.py'
103--- example_consumer/settings.py 2020-07-08 01:09:47 +0000
104+++ example_consumer/settings.py 2023-08-01 17:48:31 +0000
105@@ -65,6 +65,7 @@
106 'django.template.context_processors.debug',
107 'django.template.context_processors.i18n',
108 'django.template.context_processors.media',
109+ 'django.template.context_processors.request',
110 'django.template.context_processors.static',
111 'django.template.context_processors.tz',
112 'django.contrib.messages.context_processors.messages',
113
114=== modified file 'example_consumer/urls.py'
115--- example_consumer/urls.py 2020-07-08 01:02:19 +0000
116+++ example_consumer/urls.py 2023-08-01 17:48:31 +0000
117@@ -27,7 +27,7 @@
118 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
119 # POSSIBILITY OF SUCH DAMAGE.
120
121-from django.conf.urls import include, url
122+from django.urls import include, re_path
123 from django.contrib import admin
124 from django.contrib.auth import logout
125
126@@ -37,10 +37,10 @@
127 admin.autodiscover()
128
129 urlpatterns = [
130- url(r'^$', views.index),
131- url(r'^openid/', include('django_openid_auth.urls')),
132- url(r'^logout/$', logout),
133- url(r'^private/$', views.require_authentication),
134+ re_path(r'^$', views.index),
135+ re_path(r'^openid/', include('django_openid_auth.urls')),
136+ re_path(r'^logout/$', logout),
137+ re_path(r'^private/$', views.require_authentication),
138 ]
139
140-urlpatterns.append(url(r'^admin/', admin.site.urls))
141+urlpatterns.append(re_path(r'^admin/', admin.site.urls))
142
143=== modified file 'setup.py'
144--- setup.py 2020-08-14 19:44:58 +0000
145+++ setup.py 2023-08-01 17:48:31 +0000
146@@ -45,9 +45,9 @@
147 from setuptools import find_packages, setup
148
149 description, long_description = __doc__.split('\n\n', 1)
150-VERSION = '0.16'
151+VERSION = '0.17'
152
153-install_requires = ['django>=2.2', 'python3-openid']
154+install_requires = ['django>=3.2', 'python3-openid']
155
156 setup(
157 name='django-openid-auth',
158
159=== modified file 'tox.ini'
160--- tox.ini 2020-07-13 15:54:36 +0000
161+++ tox.ini 2023-08-01 17:48:31 +0000
162@@ -12,22 +12,12 @@
163
164 [tox]
165 envlist =
166- py3-django2.2
167-# sdist crashes without `deps`.
168-skipsdist = true
169-
170-[testenv:py3-django2.2]
171-basepython = python3
172-commands =
173- pip install --upgrade pip
174- pip install mock python3-openid django==2.2.14
175- python manage.py test django_openid_auth
176-
177-[testenv:py3-django3.0]
178-# Django 3 requires python 3.6 which we don't have on ancient xenial.
179-# Once the mergebot machine is updated we can change this.
180-basepython = python3
181-commands =
182- pip install --upgrade pip
183- pip install mock python3-openid django==3.0.8
184- python manage.py test django_openid_auth
185+ py36, py37, py38, py39
186+
187+[testenv]
188+commands =
189+ python manage.py test django_openid_auth
190+deps =
191+ mock
192+ python3-openid
193+ django>=3.2
194\ No newline at end of file

Subscribers

People subscribed via source and target branches