Account Options

  1. Sign in
Google Groups Home
« Groups Home
Message from discussion Making Django 1.0 work well under Google App Engine
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Guido van Rossum  
View profile  
 More options Aug 11 2008, 4:29 pm
From: "Guido van Rossum" <gvanros...@gmail.com>
Date: Mon, 11 Aug 2008 13:29:06 -0700
Local: Mon, Aug 11 2008 4:29 pm
Subject: Re: Making Django 1.0 work well under Google App Engine
On Mon, Aug 11, 2008 at 1:15 PM, Jacob Kaplan-Moss

<jacob.kaplanm...@gmail.com> wrote:
> Just so we're all here on the same page, I'm mentally grouping
> AppEngine/Django issues with the other "Django on $VM" stuff (even if
> AppEngine isn't "really" an alternate VM). That is, we've made
> alternate VM support a priority for 1.0 (and I've personally been very
> interested in this area), and so we'll do our best to fix any related
> issues.

Sort of. I know that Jython and PyPy are also excited to be able to
say that they support Django (and perhaps IronPython too?). But App
Engine isn't so much a different VM as a different platform. VM-wise
it is CPython; however the platform is missing certain features like
threads, writable files, sockets, and so on.

Running from a zipfile is a bit of a different constraint however --
I'd say this pretty orthogonal to the platform.

> There's a bit of give and take, though -- I'm not really inclined to
> start removing files from Django to sneak under the 1000 file limit,
> for example! But within reason I'll certainly make issues you find a
> priority for 1.0.

And I don't expect you to. By using a zipfile I've got this under control.

> On Mon, Aug 11, 2008 at 2:11 PM, Guido van Rossum <gvanros...@gmail.com> wrote:
>> My work-around however means that Django is now run entirely from a
>> zip file. This is a good idea anyway, it seems to speed up imports and
>> makes deploying the app much quicker.

> BTW, this isn't just true of AppEngine; making Django run properly
> from alternate import mechanisms helps with Jython (i.e. JARs) and
> also any sort of "frozen" app using Django. So these are pretty
> important issues to work out!

Great to hear this!

>> Is there any reason why Django generally
>> seems to prefer the early binding form "from X import Y"?

> I personally find it more readable when dealing with "deep" imports
> (``from django.contrib.syndication.feeds import Feed``, for example)
> but I think I'd agree that as general style stdlib imports ought to be
> of the ``import foo`` variety.

I'm totally in favor of dropping the packages from the path; but I
personally have grown very fond of Google's style convention of always
importing modules, never classes or functions.

> Is there somewhere a list of modules that AppEngine modifies? Might be
> worth quickly auditing Django's use of those modules to check.

Unfortunately there's no definitive list. There is this:

http://code.google.com/appengine/kb/general.html#libraries

but it is pretty incomplete. You can also scrape much of this info
from the SDK (which is open source). The file
google/appengine/tools/dev_appserver.py has a class
HardenedModulesHook which starts with long lists of modules that are
white-listed or not. Unfortunately one of the problems is that e.g.
blacklisting most of socket means that most of urllib doesn't work,
even though it isn't explicitly blacklisted. This is why it's hard to
get a definitive list.

Another source of information would be the "Google App Engine Helper
for Django": http://code.google.com/appengine/articles/appengine_helper_for_django....
Its authors have done some more research into running Django under App
Engine.

--
--Guido van Rossum (home page: http://www.python.org/~guido/)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.