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
=== modified file 'django_openid_auth/forms.py'
--- django_openid_auth/forms.py 2020-07-08 01:09:47 +0000
+++ django_openid_auth/forms.py 2023-08-01 17:48:31 +0000
@@ -33,7 +33,7 @@
33from django.contrib.auth.admin import UserAdmin33from django.contrib.auth.admin import UserAdmin
34from django.contrib.auth.forms import UserChangeForm34from django.contrib.auth.forms import UserChangeForm
35from django.contrib.auth.models import Group35from django.contrib.auth.models import Group
36from django.utils.translation import ugettext as _36from django.utils.translation import gettext as _
37from django.conf import settings37from django.conf import settings
3838
39from openid.yadis import xri39from openid.yadis import xri
4040
=== modified file 'django_openid_auth/models.py'
--- django_openid_auth/models.py 2020-07-07 22:57:21 +0000
+++ django_openid_auth/models.py 2023-08-01 17:48:31 +0000
@@ -35,6 +35,7 @@
3535
3636
37class Nonce(models.Model):37class Nonce(models.Model):
38 id = models.AutoField(primary_key=True)
38 server_url = models.CharField(max_length=2047)39 server_url = models.CharField(max_length=2047)
39 timestamp = models.IntegerField()40 timestamp = models.IntegerField()
40 salt = models.CharField(max_length=40)41 salt = models.CharField(max_length=40)
@@ -44,6 +45,8 @@
4445
4546
46class Association(models.Model):47class Association(models.Model):
48 id = models.AutoField(primary_key=True)
49
47 server_url = models.TextField(max_length=2047)50 server_url = models.TextField(max_length=2047)
48 handle = models.CharField(max_length=255)51 handle = models.CharField(max_length=255)
49 secret = models.TextField(max_length=255) # Stored base64 encoded52 secret = models.TextField(max_length=255) # Stored base64 encoded
@@ -56,6 +59,7 @@
5659
5760
58class UserOpenID(models.Model):61class UserOpenID(models.Model):
62 id = models.AutoField(primary_key=True)
59 user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)63 user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
60 claimed_id = models.TextField(max_length=2047, unique=True)64 claimed_id = models.TextField(max_length=2047, unique=True)
61 display_id = models.TextField(max_length=2047)65 display_id = models.TextField(max_length=2047)
6266
=== modified file 'django_openid_auth/signals.py'
--- django_openid_auth/signals.py 2016-08-12 12:03:47 +0000
+++ django_openid_auth/signals.py 2023-08-01 17:48:31 +0000
@@ -32,6 +32,5 @@
32import django.dispatch32import django.dispatch
3333
3434
35openid_login_complete = django.dispatch.Signal(providing_args=[35openid_login_complete = django.dispatch.Signal()
36 'request', 'openid_response'])36openid_duplicate_username = django.dispatch.Signal()
37openid_duplicate_username = django.dispatch.Signal(providing_args=['username'])
3837
=== modified file 'django_openid_auth/tests/urls.py'
--- django_openid_auth/tests/urls.py 2017-01-16 12:22:28 +0000
+++ django_openid_auth/tests/urls.py 2023-08-01 17:48:31 +0000
@@ -28,7 +28,7 @@
2828
29from __future__ import unicode_literals29from __future__ import unicode_literals
3030
31from django.conf.urls import include, url31from django.urls import include, re_path
32from django.http import HttpResponse32from django.http import HttpResponse
3333
3434
@@ -37,6 +37,6 @@
3737
3838
39urlpatterns = [39urlpatterns = [
40 url(r'^getuser/$', get_user),40 re_path(r'^getuser/$', get_user),
41 url(r'^openid/', include('django_openid_auth.urls')),41 re_path(r'^openid/', include('django_openid_auth.urls')),
42]42]
4343
=== modified file 'django_openid_auth/urls.py'
--- django_openid_auth/urls.py 2017-01-16 12:22:28 +0000
+++ django_openid_auth/urls.py 2023-08-01 17:48:31 +0000
@@ -29,7 +29,7 @@
2929
30from __future__ import unicode_literals30from __future__ import unicode_literals
3131
32from django.conf.urls import url32from django.urls import re_path
3333
34from django_openid_auth.views import (34from django_openid_auth.views import (
35 login_begin,35 login_begin,
@@ -39,7 +39,7 @@
3939
4040
41urlpatterns = [41urlpatterns = [
42 url(r'^login/$', login_begin, name='openid-login'),42 re_path(r'^login/$', login_begin, name='openid-login'),
43 url(r'^complete/$', login_complete, name='openid-complete'),43 re_path(r'^complete/$', login_complete, name='openid-complete'),
44 url(r'^logo.gif$', logo, name='openid-logo'),44 re_path(r'^logo.gif$', logo, name='openid-logo'),
45]45]
4646
=== modified file 'example_consumer/settings.py'
--- example_consumer/settings.py 2020-07-08 01:09:47 +0000
+++ example_consumer/settings.py 2023-08-01 17:48:31 +0000
@@ -65,6 +65,7 @@
65 'django.template.context_processors.debug',65 'django.template.context_processors.debug',
66 'django.template.context_processors.i18n',66 'django.template.context_processors.i18n',
67 'django.template.context_processors.media',67 'django.template.context_processors.media',
68 'django.template.context_processors.request',
68 'django.template.context_processors.static',69 'django.template.context_processors.static',
69 'django.template.context_processors.tz',70 'django.template.context_processors.tz',
70 'django.contrib.messages.context_processors.messages',71 'django.contrib.messages.context_processors.messages',
7172
=== modified file 'example_consumer/urls.py'
--- example_consumer/urls.py 2020-07-08 01:02:19 +0000
+++ example_consumer/urls.py 2023-08-01 17:48:31 +0000
@@ -27,7 +27,7 @@
27# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE27# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28# POSSIBILITY OF SUCH DAMAGE.28# POSSIBILITY OF SUCH DAMAGE.
2929
30from django.conf.urls import include, url30from django.urls import include, re_path
31from django.contrib import admin31from django.contrib import admin
32from django.contrib.auth import logout32from django.contrib.auth import logout
3333
@@ -37,10 +37,10 @@
37admin.autodiscover()37admin.autodiscover()
3838
39urlpatterns = [39urlpatterns = [
40 url(r'^$', views.index),40 re_path(r'^$', views.index),
41 url(r'^openid/', include('django_openid_auth.urls')),41 re_path(r'^openid/', include('django_openid_auth.urls')),
42 url(r'^logout/$', logout),42 re_path(r'^logout/$', logout),
43 url(r'^private/$', views.require_authentication),43 re_path(r'^private/$', views.require_authentication),
44]44]
4545
46urlpatterns.append(url(r'^admin/', admin.site.urls))46urlpatterns.append(re_path(r'^admin/', admin.site.urls))
4747
=== modified file 'setup.py'
--- setup.py 2020-08-14 19:44:58 +0000
+++ setup.py 2023-08-01 17:48:31 +0000
@@ -45,9 +45,9 @@
45from setuptools import find_packages, setup45from setuptools import find_packages, setup
4646
47description, long_description = __doc__.split('\n\n', 1)47description, long_description = __doc__.split('\n\n', 1)
48VERSION = '0.16'48VERSION = '0.17'
4949
50install_requires = ['django>=2.2', 'python3-openid']50install_requires = ['django>=3.2', 'python3-openid']
5151
52setup(52setup(
53 name='django-openid-auth',53 name='django-openid-auth',
5454
=== modified file 'tox.ini'
--- tox.ini 2020-07-13 15:54:36 +0000
+++ tox.ini 2023-08-01 17:48:31 +0000
@@ -12,22 +12,12 @@
1212
13[tox]13[tox]
14envlist =14envlist =
15 py3-django2.215 py36, py37, py38, py39
16# sdist crashes without `deps`.16
17skipsdist = true17[testenv]
1818commands =
19[testenv:py3-django2.2]19 python manage.py test django_openid_auth
20basepython = python320deps =
21commands =21 mock
22 pip install --upgrade pip22 python3-openid
23 pip install mock python3-openid django==2.2.1423 django>=3.2
24 python manage.py test django_openid_auth
25
26[testenv:py3-django3.0]
27# Django 3 requires python 3.6 which we don't have on ancient xenial.
28# Once the mergebot machine is updated we can change this.
29basepython = python3
30commands =
31 pip install --upgrade pip
32 pip install mock python3-openid django==3.0.8
33 python manage.py test django_openid_auth
34\ No newline at end of file24\ No newline at end of file

Subscribers

People subscribed via source and target branches