Merge lp:~andrewsomething/django-openid-auth/1252445 into lp:~django-openid-auth/django-openid-auth/trunk

Proposed by Andrew Starr-Bochicchio
Status: Rejected
Rejected by: Ricardo Kirkner
Proposed branch: lp:~andrewsomething/django-openid-auth/1252445
Merge into: lp:~django-openid-auth/django-openid-auth/trunk
Diff against target: 79 lines (+20/-11)
5 files modified
django_openid_auth/tests/urls.py (+1/-1)
django_openid_auth/urls.py (+1/-1)
example_consumer/manage.py (+12/-8)
example_consumer/settings.py (+5/-0)
example_consumer/urls.py (+1/-1)
To merge this branch: bzr merge lp:~andrewsomething/django-openid-auth/1252445
Reviewer Review Type Date Requested Status
Ricardo Kirkner Approve
Review via email: mp+195793@code.launchpad.net

Commit message

Fix compatibility issues with Django 1.6.

Description of the change

execute_manager was put on the deprecation path as part of the project
layout refactor in Django 1.4:

https://docs.djangoproject.com/en/1.4/releases/1.4/#django-core-management-execute-manager

Per the deprecation policy that means that the code for execute_manager
has been completely removed in 1.6. django-openid-auth still uses it in
the example_consumer.

This branch uses execute_from_command_line instead.

To post a comment you must log in.
Revision history for this message
Ricardo Kirkner (ricardokirkner) wrote :

LGTM.

review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

Thanks "Ubuntu One Auto Pilot (otto-pilot)" =/ Should I just delete this?

Revision history for this message
Ricardo Kirkner (ricardokirkner) wrote :

Equivalent changes have already landed on trunk by now, making django-openid-auth compatible with Django 1.4 - 1.8.

I'm sorry this MP slipped through the cracks.

Unmerged revisions

110. By Andrew Starr-Bochicchio

Change session serializer to be compatible with Django 1.6 (workaround #1252826)

109. By Andrew Starr-Bochicchio

django.conf.urls.defaults has been removed in Django 1.6

108. By Andrew Starr-Bochicchio

execute_manager was deprecated in Django 1.4 and removed in Django 1.6. Use execute_from_command_line instead.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'django_openid_auth/tests/urls.py'
2--- django_openid_auth/tests/urls.py 2013-03-13 21:55:40 +0000
3+++ django_openid_auth/tests/urls.py 2014-02-22 17:07:15 +0000
4@@ -27,7 +27,7 @@
5 # POSSIBILITY OF SUCH DAMAGE.
6
7 from django.http import HttpResponse
8-from django.conf.urls.defaults import *
9+from django.conf.urls import *
10
11
12 def get_user(request):
13
14=== modified file 'django_openid_auth/urls.py'
15--- django_openid_auth/urls.py 2013-03-13 21:55:40 +0000
16+++ django_openid_auth/urls.py 2014-02-22 17:07:15 +0000
17@@ -27,7 +27,7 @@
18 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
19 # POSSIBILITY OF SUCH DAMAGE.
20
21-from django.conf.urls.defaults import *
22+from django.conf.urls import *
23
24 urlpatterns = patterns('django_openid_auth.views',
25 url(r'^login/$', 'login_begin', name='openid-login'),
26
27=== modified file 'example_consumer/manage.py'
28--- example_consumer/manage.py 2007-05-28 09:01:41 +0000
29+++ example_consumer/manage.py 2014-02-22 17:07:15 +0000
30@@ -1,11 +1,15 @@
31 #!/usr/bin/env python
32-from django.core.management import execute_manager
33-try:
34- import settings # Assumed to be in the same directory.
35-except ImportError:
36- import sys
37- sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
38- sys.exit(1)
39+import os
40+import sys
41+
42+from django.core.management import execute_from_command_line
43
44 if __name__ == "__main__":
45- execute_manager(settings)
46+ try:
47+ import settings # Assumed to be in the same directory.
48+ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
49+ except ImportError:
50+ sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
51+ sys.exit(1)
52+
53+ execute_from_command_line(sys.argv)
54
55=== modified file 'example_consumer/settings.py'
56--- example_consumer/settings.py 2013-07-19 18:54:31 +0000
57+++ example_consumer/settings.py 2014-02-22 17:07:15 +0000
58@@ -152,3 +152,8 @@
59
60 # Should django_auth_openid be used to sign into the admin interface?
61 OPENID_USE_AS_ADMIN_LOGIN = False
62+
63+# Temporarily modify the session serializer because the json serializer in
64+# Django 1.6 can't serialize openid.yadis.manager.YadisServiceManager objects.
65+# See LP: #1252826
66+SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
67
68=== modified file 'example_consumer/urls.py'
69--- example_consumer/urls.py 2013-03-13 21:55:40 +0000
70+++ example_consumer/urls.py 2014-02-22 17:07:15 +0000
71@@ -27,7 +27,7 @@
72 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
73 # POSSIBILITY OF SUCH DAMAGE.
74
75-from django.conf.urls.defaults import *
76+from django.conf.urls import *
77 from django.contrib import admin
78
79 import views

Subscribers

People subscribed via source and target branches