Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Commit

Permalink
Import webapp2 instead of google.appengine.ext.webapp
Browse files Browse the repository at this point in the history
This choice is apparently more robust in situations / runtimes where the import mechanism in google/appengine/ext/webapp/__init__.py does not appear to do the right thing.
  • Loading branch information
puccia committed Jul 8, 2015
1 parent f46290a commit f3f8b4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oauth2client/appengine.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
import threading

import httplib2
import webapp2 as webapp

from google.appengine.api import app_identity
from google.appengine.api import memcache
from google.appengine.api import users
from google.appengine.ext import db
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import login_required
from google.appengine.ext.webapp.util import run_wsgi_app
from oauth2client import GOOGLE_AUTH_URI
Expand Down

3 comments on commit f3f8b4f

@tseaver
Copy link

@tseaver tseaver commented on f3f8b4f Sep 8, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change breaks gcloud.python now that oauth2client 1.5.0 is being used.

What guarantees that webapp2 as a top-level import will be available?

@nathanielmanistaatgoogle
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm... unclear on the premise of the question. Why should there be a guarantee that this module will have imported another particular module and exposed it as a certain attribute?

@tseaver
Copy link

@tseaver tseaver commented on f3f8b4f Sep 9, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

webapp2 is not listed as an install_requires dependency, which means it may not be installed (except, presumably on GAE). See #302 for discussion.

Please sign in to comment.