Merge lp:~albertkol/django-openid-auth/django-4-update into lp:django-openid-auth

Proposed by Albert Kolozsvari
Status: Needs review
Proposed branch: lp:~albertkol/django-openid-auth/django-4-update
Merge into: lp:django-openid-auth
Diff against target: 620 lines (+222/-143)
12 files modified
.bzrignore (+1/-1)
django_openid_auth/forms.py (+1/-1)
django_openid_auth/signals.py (+2/-3)
django_openid_auth/tests/test_auth.py (+2/-2)
django_openid_auth/tests/urls.py (+4/-4)
django_openid_auth/urls.py (+4/-4)
example_consumer/__init__.py (+1/-1)
example_consumer/settings.py (+94/-67)
example_consumer/urls.py (+23/-13)
example_consumer/views.py (+29/-19)
example_consumer/wsgi.py (+35/-3)
setup.py (+26/-25)
To merge this branch: bzr merge lp:~albertkol/django-openid-auth/django-4-update
Reviewer Review Type Date Requested Status
Daniel Manrique (community) Approve
Review via email: mp+428029@code.launchpad.net

Commit message

Make the package Django 4-compatible.
Bump version to 0.17.

Description of the change

This branch pushes a new version of the package to make it Django 4 compatible.

`example_customer` was refactored to follow Django 4 standards.

Fixed broken imports like:
- `django.utils.translation import ugettext`
- `django.conf.urls import include, url`.

Signals no longer need arguments to be instantiated.

New version number: 0.17

To post a comment you must log in.
Revision history for this message
Daniel Manrique (roadmr) wrote :

LGTM in general, a couple of minor comments below.

review: Approve
Revision history for this message
Daniel Manrique (roadmr) wrote :

+1, thanks

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
Daniel Manrique (roadmr) wrote :

i need to make some tweaks in the merge/CI configuration for this to merge properly.

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 :

Unmerged revisions

143. By Albert Kolozsvari

Final adjustments

142. By Albert Kolozsvari

Bump version to 0.17

141. By Albert Kolozsvari

Fix tests

140. By Albert Kolozsvari

Update example_customer views

139. By Albert Kolozsvari

Make example_customer Django 4.1 friendly

138. By Albert Kolozsvari

Fix boolean error on /

137. By Albert Kolozsvari

Make running migration work

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2015-04-23 20:02:39 +0000
3+++ .bzrignore 2022-08-09 14:17:53 +0000
4@@ -2,4 +2,4 @@
5 build
6 dist
7 db.sqlite3
8-.tox
9+.tox
10\ No newline at end of file
11
12=== modified file 'django_openid_auth/forms.py'
13--- django_openid_auth/forms.py 2020-07-08 01:09:47 +0000
14+++ django_openid_auth/forms.py 2022-08-09 14:17:53 +0000
15@@ -33,7 +33,7 @@
16 from django.contrib.auth.admin import UserAdmin
17 from django.contrib.auth.forms import UserChangeForm
18 from django.contrib.auth.models import Group
19-from django.utils.translation import ugettext as _
20+from django.utils.translation import gettext as _
21 from django.conf import settings
22
23 from openid.yadis import xri
24
25=== modified file 'django_openid_auth/signals.py'
26--- django_openid_auth/signals.py 2016-08-12 12:03:47 +0000
27+++ django_openid_auth/signals.py 2022-08-09 14:17:53 +0000
28@@ -32,6 +32,5 @@
29 import django.dispatch
30
31
32-openid_login_complete = django.dispatch.Signal(providing_args=[
33- 'request', 'openid_response'])
34-openid_duplicate_username = django.dispatch.Signal(providing_args=['username'])
35+openid_login_complete = django.dispatch.Signal()
36+openid_duplicate_username = django.dispatch.Signal()
37
38=== modified file 'django_openid_auth/tests/test_auth.py'
39--- django_openid_auth/tests/test_auth.py 2020-07-09 20:05:34 +0000
40+++ django_openid_auth/tests/test_auth.py 2022-08-09 14:17:53 +0000
41@@ -1039,9 +1039,9 @@
42 self.inject_test_models()
43
44 def inject_test_models(self):
45- installed_apps = settings.INSTALLED_APPS + (
46+ installed_apps = settings.INSTALLED_APPS + [
47 'django_openid_auth.tests',
48- )
49+ ]
50 p = self.settings(INSTALLED_APPS=installed_apps)
51 p.enable()
52 self.addCleanup(p.disable)
53
54=== modified file 'django_openid_auth/tests/urls.py'
55--- django_openid_auth/tests/urls.py 2017-01-16 12:22:28 +0000
56+++ django_openid_auth/tests/urls.py 2022-08-09 14:17:53 +0000
57@@ -1,6 +1,6 @@
58 # django-openid-auth - OpenID integration for django.contrib.auth
59 #
60-# Copyright (C) 2009-2013 Canonical Ltd.
61+# Copyright (C) 2009-2022 Canonical Ltd.
62 #
63 # Redistribution and use in source and binary forms, with or without
64 # modification, are permitted provided that the following conditions
65@@ -28,7 +28,7 @@
66
67 from __future__ import unicode_literals
68
69-from django.conf.urls import include, url
70+from django.urls import include, path
71 from django.http import HttpResponse
72
73
74@@ -37,6 +37,6 @@
75
76
77 urlpatterns = [
78- url(r'^getuser/$', get_user),
79- url(r'^openid/', include('django_openid_auth.urls')),
80+ path('getuser/', get_user),
81+ path('openid/', include('django_openid_auth.urls')),
82 ]
83
84=== modified file 'django_openid_auth/urls.py'
85--- django_openid_auth/urls.py 2017-01-16 12:22:28 +0000
86+++ django_openid_auth/urls.py 2022-08-09 14:17:53 +0000
87@@ -29,7 +29,7 @@
88
89 from __future__ import unicode_literals
90
91-from django.conf.urls import url
92+from django.urls import path
93
94 from django_openid_auth.views import (
95 login_begin,
96@@ -39,7 +39,7 @@
97
98
99 urlpatterns = [
100- url(r'^login/$', login_begin, name='openid-login'),
101- url(r'^complete/$', login_complete, name='openid-complete'),
102- url(r'^logo.gif$', logo, name='openid-logo'),
103+ path('login/', login_begin, name='openid-login'),
104+ path('complete/', login_complete, name='openid-complete'),
105+ path('logo.gif', logo, name='openid-logo'),
106 ]
107
108=== modified file 'example_consumer/__init__.py'
109--- example_consumer/__init__.py 2013-03-13 21:55:40 +0000
110+++ example_consumer/__init__.py 2022-08-09 14:17:53 +0000
111@@ -1,7 +1,7 @@
112 # django-openid-auth - OpenID integration for django.contrib.auth
113 #
114 # Copyright (C) 2007 Simon Willison
115-# Copyright (C) 2008-2013 Canonical Ltd.
116+# Copyright (C) 2008-2022 Canonical Ltd.
117 #
118 # Redistribution and use in source and binary forms, with or without
119 # modification, are permitted provided that the following conditions
120
121=== modified file 'example_consumer/settings.py'
122--- example_consumer/settings.py 2020-07-08 01:09:47 +0000
123+++ example_consumer/settings.py 2022-08-09 14:17:53 +0000
124@@ -1,7 +1,7 @@
125 # django-openid-auth - OpenID integration for django.contrib.auth
126 #
127 # Copyright (C) 2007 Simon Willison
128-# Copyright (C) 2008-2020 Canonical Ltd.
129+# Copyright (C) 2008-2022 Canonical Ltd.
130 #
131 # Redistribution and use in source and binary forms, with or without
132 # modification, are permitted provided that the following conditions
133@@ -30,110 +30,137 @@
134 """
135 Django settings for example_consumer project.
136
137+Generated by 'django-admin startproject' using Django 4.1.
138+
139 For more information on this file, see
140-https://docs.djangoproject.com/en/1.7/topics/settings/
141+https://docs.djangoproject.com/en/4.1/topics/settings/
142
143 For the full list of settings and their values, see
144-https://docs.djangoproject.com/en/1.7/ref/settings/
145+https://docs.djangoproject.com/en/4.1/ref/settings/
146 """
147
148-# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
149-import os
150-import django
151+from pathlib import Path
152
153-BASE_DIR = os.path.dirname(os.path.dirname(__file__))
154+# Build paths inside the project like this: BASE_DIR / 'subdir'.
155+BASE_DIR = Path(__file__).resolve().parent.parent
156
157
158 # Quick-start development settings - unsuitable for production
159-# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
160+# See https://docs.djangoproject.com/en/4.1/howto/deployment/checklist/
161
162 # SECURITY WARNING: keep the secret key used in production secret!
163-SECRET_KEY = '34958734985734985734985798437'
164+SECRET_KEY = "34958734985734985734985798437"
165
166 # SECURITY WARNING: don't run with debug turned on in production!
167 DEBUG = True
168
169-TEMPLATE_DEBUG = True
170+ALLOWED_HOSTS = []
171+
172+
173+# Application definition
174+
175+INSTALLED_APPS = [
176+ "django.contrib.admin",
177+ "django.contrib.auth",
178+ "django.contrib.contenttypes",
179+ "django.contrib.sessions",
180+ "django.contrib.messages",
181+ "django.contrib.staticfiles",
182+ "django_openid_auth",
183+]
184+
185+MIDDLEWARE = [
186+ "django.middleware.security.SecurityMiddleware",
187+ "django.contrib.sessions.middleware.SessionMiddleware",
188+ "django.middleware.common.CommonMiddleware",
189+ "django.middleware.csrf.CsrfViewMiddleware",
190+ "django.contrib.auth.middleware.AuthenticationMiddleware",
191+ "django.contrib.messages.middleware.MessageMiddleware",
192+ "django.middleware.clickjacking.XFrameOptionsMiddleware",
193+]
194+
195+ROOT_URLCONF = "example_consumer.urls"
196+
197 TEMPLATES = [
198 {
199- 'BACKEND': 'django.template.backends.django.DjangoTemplates',
200- 'DIRS': [],
201- 'APP_DIRS': True,
202- 'OPTIONS': {
203- 'context_processors': [
204- 'django.contrib.auth.context_processors.auth',
205- 'django.template.context_processors.debug',
206- 'django.template.context_processors.i18n',
207- 'django.template.context_processors.media',
208- 'django.template.context_processors.static',
209- 'django.template.context_processors.tz',
210- 'django.contrib.messages.context_processors.messages',
211+ "BACKEND": "django.template.backends.django.DjangoTemplates",
212+ "DIRS": [],
213+ "APP_DIRS": True,
214+ "OPTIONS": {
215+ "context_processors": [
216+ "django.template.context_processors.debug",
217+ "django.template.context_processors.request",
218+ "django.contrib.auth.context_processors.auth",
219+ "django.contrib.messages.context_processors.messages",
220 ]
221- }
222+ },
223 }
224 ]
225
226-ALLOWED_HOSTS = []
227-
228-MIDDLEWARE = [
229- 'django.middleware.security.SecurityMiddleware',
230- 'django.contrib.sessions.middleware.SessionMiddleware',
231- 'django.middleware.common.CommonMiddleware',
232- 'django.middleware.csrf.CsrfViewMiddleware',
233- 'django.contrib.auth.middleware.AuthenticationMiddleware',
234- 'django.contrib.messages.middleware.MessageMiddleware',
235- 'django.middleware.clickjacking.XFrameOptionsMiddleware',
236-]
237-
238-# Application definition
239-
240-INSTALLED_APPS = (
241- 'django.contrib.auth',
242- 'django.contrib.contenttypes',
243- 'django.contrib.messages',
244- 'django.contrib.sessions',
245- 'django.contrib.admin',
246- 'django_openid_auth',
247-)
248-
249-ROOT_URLCONF = 'example_consumer.urls'
250-
251-WSGI_APPLICATION = 'example_consumer.wsgi.application'
252+WSGI_APPLICATION = "example_consumer.wsgi.application"
253
254 # Database
255-# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
256+# https://docs.djangoproject.com/en/4.1/ref/settings/#databases
257
258 DATABASES = {
259- 'default': {
260- 'ENGINE': 'django.db.backends.sqlite3',
261- 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
262+ "default": {
263+ "ENGINE": "django.db.backends.sqlite3",
264+ "NAME": f"{BASE_DIR}/db.sqlite3",
265 }
266 }
267
268+
269+# Password validation
270+# https://docs.djangoproject.com/en/4.1/ref/settings/#auth-password-validators
271+
272+AUTH_PREFIX = "django.contrib.auth.password_validation"
273+AUTH_PASSWORD_VALIDATORS = [
274+ {
275+ "NAME": f"{AUTH_PREFIX}.UserAttributeSimilarityValidator",
276+ },
277+ {
278+ "NAME": f"{AUTH_PREFIX}.MinimumLengthValidator",
279+ },
280+ {
281+ "NAME": f"{AUTH_PREFIX}.CommonPasswordValidator",
282+ },
283+ {
284+ "NAME": f"{AUTH_PREFIX}.NumericPasswordValidator",
285+ },
286+]
287+
288+
289 # Internationalization
290-# https://docs.djangoproject.com/en/1.7/topics/i18n/
291-
292-LANGUAGE_CODE = 'en-us'
293-
294-TIME_ZONE = 'UTC'
295+# https://docs.djangoproject.com/en/4.1/topics/i18n/
296+
297+LANGUAGE_CODE = "en-us"
298+
299+TIME_ZONE = "UTC"
300
301 USE_I18N = True
302
303 USE_TZ = True
304
305+
306 # Static files (CSS, JavaScript, Images)
307-# https://docs.djangoproject.com/en/1.7/howto/static-files/
308-
309-STATIC_URL = '/static/'
310+# https://docs.djangoproject.com/en/4.1/howto/static-files/
311+
312+STATIC_URL = "static/"
313+
314+# Default primary key field type
315+# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field
316+
317+DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
318+
319
320 # the library python-openid does not support a json session serializer
321 # <openid.yadis.manager.YadisServiceManager> is not JSON serializable
322 # https://github.com/openid/python-openid/issues/17
323-SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
324+SESSION_SERIALIZER = "django.contrib.sessions.serializers.PickleSerializer"
325
326 AUTHENTICATION_BACKENDS = (
327- 'django_openid_auth.auth.OpenIDBackend',
328- 'django.contrib.auth.backends.ModelBackend',
329+ "django_openid_auth.auth.OpenIDBackend",
330+ "django.contrib.auth.backends.ModelBackend",
331 )
332
333 # Should users be created when new OpenIDs are used to log in?
334@@ -153,11 +180,11 @@
335
336 # If set, always use this as the identity URL rather than asking the
337 # user. This only makes sense if it is a server URL.
338-OPENID_SSO_SERVER_URL = 'https://login.ubuntu.com/'
339+OPENID_SSO_SERVER_URL = "https://login.launchpad.net/"
340
341 # Tell django.contrib.auth to use the OpenID signin URLs.
342-LOGIN_URL = '/openid/login/'
343-LOGIN_REDIRECT_URL = '/'
344+LOGIN_URL = "/openid/login/"
345+LOGIN_REDIRECT_URL = "/"
346
347 # Should django_auth_openid be used to sign into the admin interface?
348 OPENID_USE_AS_ADMIN_LOGIN = False
349
350=== modified file 'example_consumer/urls.py'
351--- example_consumer/urls.py 2020-07-08 01:02:19 +0000
352+++ example_consumer/urls.py 2022-08-09 14:17:53 +0000
353@@ -1,7 +1,7 @@
354 # django-openid-auth - OpenID integration for django.contrib.auth
355 #
356 # Copyright (C) 2007 Simon Willison
357-# Copyright (C) 2008-2020 Canonical Ltd.
358+# Copyright (C) 2008-2022 Canonical Ltd.
359 #
360 # Redistribution and use in source and binary forms, with or without
361 # modification, are permitted provided that the following conditions
362@@ -27,20 +27,30 @@
363 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
364 # POSSIBILITY OF SUCH DAMAGE.
365
366-from django.conf.urls import include, url
367+
368+"""example_consumer URL Configuration
369+
370+The `urlpatterns` list routes URLs to views. For more information please see:
371+ https://docs.djangoproject.com/en/4.1/topics/http/urls/
372+Examples:
373+Function views
374+ 1. Add an import: from my_app import views
375+ 2. Add a URL to urlpatterns: path('', views.home, name='home')
376+Class-based views
377+ 1. Add an import: from other_app.views import Home
378+ 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
379+Including another URLconf
380+ 1. Import the include() function: from django.urls import include, path
381+ 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
382+"""
383 from django.contrib import admin
384-from django.contrib.auth import logout
385-
386+from django.urls import include, path
387 from example_consumer import views
388
389-
390-admin.autodiscover()
391-
392 urlpatterns = [
393- url(r'^$', views.index),
394- url(r'^openid/', include('django_openid_auth.urls')),
395- url(r'^logout/$', logout),
396- url(r'^private/$', views.require_authentication),
397+ path("", views.index),
398+ path("openid/", include("django_openid_auth.urls")),
399+ path("logout/", views.logout_view),
400+ path("private/", views.require_authentication),
401+ path("admin/", admin.site.urls),
402 ]
403-
404-urlpatterns.append(url(r'^admin/', admin.site.urls))
405
406=== modified file 'example_consumer/views.py'
407--- example_consumer/views.py 2013-03-13 21:55:40 +0000
408+++ example_consumer/views.py 2022-08-09 14:17:53 +0000
409@@ -1,7 +1,7 @@
410 # django-openid-auth - OpenID integration for django.contrib.auth
411 #
412 # Copyright (C) 2007 Simon Willison
413-# Copyright (C) 2008-2013 Canonical Ltd.
414+# Copyright (C) 2008-2022 Canonical Ltd.
415 #
416 # Redistribution and use in source and binary forms, with or without
417 # modification, are permitted provided that the following conditions
418@@ -27,31 +27,41 @@
419 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
420 # POSSIBILITY OF SUCH DAMAGE.
421
422-from django.contrib.auth.decorators import login_required
423-from django.http import HttpResponse
424+
425+from django.contrib.auth import logout, decorators
426+from django.http import HttpResponse, HttpResponseRedirect
427 from django.utils.html import escape
428
429
430 def index(request):
431- s = ['<p>']
432- if request.user.is_authenticated():
433- s.append('You are signed in as <strong>%s</strong> (%s)' % (
434- escape(request.user.username),
435- escape(request.user.get_full_name())))
436+ s = ["<p>"]
437+ s.append('<a href="/admin">Go to admin</a>')
438+ s.append("</p>")
439+
440+ s.append("<p>")
441+ if request.user.is_authenticated:
442+ user_name = escape(request.user.username)
443+ full_name = escape(request.user.get_full_name())
444+
445+ s.append(
446+ f"You are signed in as <strong>{user_name}</strong> ({full_name})"
447+ )
448 s.append(' | <a href="/logout">Sign out</a>')
449 else:
450 s.append('<a href="/openid/login">Sign in with OpenID</a>')
451-
452- s.append('</p>')
453+ s.append("</p>")
454
455 s.append('<p><a href="/private">This requires authentication</a></p>')
456- return HttpResponse('\n'.join(s))
457-
458-
459-def next_works(request):
460- return HttpResponse('?next= bit works. <a href="/">Home</a>')
461-
462-
463-@login_required
464+
465+ return HttpResponse("\n".join(s))
466+
467+
468+@decorators.login_required
469 def require_authentication(request):
470- return HttpResponse('This page requires authentication')
471+ return HttpResponse("This page requires authentication")
472+
473+
474+def logout_view(request):
475+ logout(request)
476+
477+ return HttpResponseRedirect("/")
478
479=== modified file 'example_consumer/wsgi.py'
480--- example_consumer/wsgi.py 2015-04-23 20:02:39 +0000
481+++ example_consumer/wsgi.py 2022-08-09 14:17:53 +0000
482@@ -1,14 +1,46 @@
483+# django-openid-auth - OpenID integration for django.contrib.auth
484+#
485+# Copyright (C) 2007 Simon Willison
486+# Copyright (C) 2008-2022 Canonical Ltd.
487+#
488+# Redistribution and use in source and binary forms, with or without
489+# modification, are permitted provided that the following conditions
490+# are met:
491+#
492+# * Redistributions of source code must retain the above copyright
493+# notice, this list of conditions and the following disclaimer.
494+#
495+# * Redistributions in binary form must reproduce the above copyright
496+# notice, this list of conditions and the following disclaimer in the
497+# documentation and/or other materials provided with the distribution.
498+#
499+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
500+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
501+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
502+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
503+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
504+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
505+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
506+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
507+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
508+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
509+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
510+# POSSIBILITY OF SUCH DAMAGE.
511+
512+
513 """
514-WSGI config for demo project.
515+WSGI config for example_consumer project.
516
517 It exposes the WSGI callable as a module-level variable named ``application``.
518
519 For more information on this file, see
520-https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
521+https://docs.djangoproject.com/en/4.1/howto/deployment/wsgi/
522 """
523
524 import os
525-os.environ.setdefault("DJANGO_SETTINGS_MODULE", "demo.settings")
526
527 from django.core.wsgi import get_wsgi_application
528+
529+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "example_consumer.settings")
530+
531 application = get_wsgi_application()
532
533=== modified file 'setup.py'
534--- setup.py 2020-08-14 19:44:58 +0000
535+++ setup.py 2022-08-09 14:17:53 +0000
536@@ -1,7 +1,7 @@
537 #!/usr/bin/env python
538 # django-openid-auth - OpenID integration for django.contrib.auth
539 #
540-# Copyright (C) 2009-2020 Canonical Ltd.
541+# Copyright (C) 2009-2022 Canonical Ltd.
542 #
543 # Redistribution and use in source and binary forms, with or without
544 # modification, are permitted provided that the following conditions
545@@ -26,6 +26,8 @@
546 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
547 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
548 # POSSIBILITY OF SUCH DAMAGE.
549+
550+
551 """OpenID integration for django.contrib.auth
552
553 A library that can be used to add OpenID support to Django applications.
554@@ -40,43 +42,42 @@
555 info.
556 """
557
558-import sys
559
560 from setuptools import find_packages, setup
561
562-description, long_description = __doc__.split('\n\n', 1)
563-VERSION = '0.16'
564+description, long_description = __doc__.split("\n\n", 1)
565+VERSION = "0.17"
566
567-install_requires = ['django>=2.2', 'python3-openid']
568+install_requires = ["django>=2.2", "python3-openid"]
569
570 setup(
571- name='django-openid-auth',
572+ name="django-openid-auth",
573 version=VERSION,
574-
575 packages=find_packages(),
576 install_requires=install_requires,
577 package_data={
578- 'django_openid_auth': ['templates/openid/*.html'],
579+ "django_openid_auth": ["templates/openid/*.html"],
580 },
581-
582 # metadata for upload to PyPI
583- author='Canonical Ltd',
584- author_email='noreply@canonical.com',
585+ author="Canonical Ltd",
586+ author_email="noreply@canonical.com",
587 description=description,
588 long_description=long_description,
589- license='BSD',
590- platforms=['any'],
591- url='https://launchpad.net/django-openid-auth',
592- download_url=('http://launchpad.net/django-openid-auth/trunk/%s/+download'
593- '/django-openid-auth-%s.tar.gz' % (VERSION, VERSION)),
594+ license="BSD",
595+ platforms=["any"],
596+ url="https://launchpad.net/django-openid-auth",
597+ download_url=(
598+ f"http://launchpad.net/django-openid-auth/trunk/{VERSION}/+download"
599+ f"/django-openid-auth-{VERSION}.tar.gz"
600+ ),
601 classifiers=[
602- 'Development Status :: 5 - Production/Stable',
603- 'Environment :: Web Environment',
604- 'Framework :: Django',
605- 'Intended Audience :: Developers',
606- 'License :: OSI Approved :: BSD License',
607- 'Operating System :: OS Independent',
608- 'Programming Language :: Python',
609- 'Topic :: Software Development :: Libraries :: Python Modules'
610- ],
611+ "Development Status :: 5 - Production/Stable",
612+ "Environment :: Web Environment",
613+ "Framework :: Django",
614+ "Intended Audience :: Developers",
615+ "License :: OSI Approved :: BSD License",
616+ "Operating System :: OS Independent",
617+ "Programming Language :: Python",
618+ "Topic :: Software Development :: Libraries :: Python Modules",
619+ ],
620 )

Subscribers

People subscribed via source and target branches