Python 2.7 threadsafe: true running on local

107 views
Skip to first unread message

ivan starkov

unread,
Oct 11, 2011, 7:02:50 PM10/11/11
to google-a...@googlegroups.com
Does anybody could run the base sample for Python 2.7
on local machine with  parameter threadsafe: true in yaml
This sample generate error: Could not find module helloworld.app 

the only way this sample works on my computer
is to change this line "script: helloworld.app"
to this "script: helloworld.py.app"
and add
def main():
    app.run();

if __name__ == "__main__":
    main()
to helloworld.py

And also what is official way to add webapp2 and jinja2 on local computer
i know two working solutions:
1) Add webapp2 jinja2 dirs to my app folder and exlude them in app.yaml

2) Add this libs to GAPP lib folder and change dev_appserver.py adding this lines
os.path.join(DIR_PATH,'lib','jinja2'), os.path.join(DIR_PATH,'lib','webapp2') to EXTRA_PATHS list

Is any elegant solution to make webapp2 and jinja2 work locally?






Steve Sherrie

unread,
Oct 12, 2011, 7:32:09 PM10/12/11
to google-a...@googlegroups.com
No, it looks like the dev_appserver is not yet capable of using 'threadsafe: yes'. However, with 'threadsafe: no', and your handler setup like 'script: main.py', you *can* dev locally, and then make those 2 changes before deploying.

I know that doesn't help if you're testing multithreading features, but I think we're gonna have to wait 'til 1.5.6, or whenever the 2.7 runtime leaves experimental status, before we get that upgrade.


Steve
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/qFolbjU1WSIJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.

Tim Hoffman

unread,
Oct 12, 2011, 8:19:03 PM10/12/11
to google-a...@googlegroups.com
I don't believe the dev server is supported with 2.7 at all.  That was the position during the trusted testers phase
and all of the recent posts here by google indicate that is still the case.

Rgds

Tim

Brian Quinlan

unread,
Oct 12, 2011, 9:44:56 PM10/12/11
to google-a...@googlegroups.com

That's correct - the dev appserver doesn't support Python 2.7 at all.

Cheers,
Brian

> Rgds
> Tim


>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/google-appengine/-/56Nybt3kj2EJ.

Tim Hoffman

unread,
Oct 12, 2011, 10:44:26 PM10/12/11
to google-a...@googlegroups.com
HI Brian

You should put that fact in a prominent position in the 1.5.5 release notes.

Tim

Brian Quinlan

unread,
Oct 13, 2011, 1:10:23 AM10/13/11
to google-a...@googlegroups.com
I can't change the e-mails that we've already sent out but I've
updated the release notes of the code site and I'll add a notice in
the docs.

Cheers,
Brian

> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/google-appengine/-/KmKduPKYPWAJ.

Reply all
Reply to author
Forward
0 new messages