Hm... Apparently webapp2 and NDB don't like each other. I'll look into
this more.
IIUC without such a decorator ndb cannot progress the eventloop and
hence you'll get deadlock issues (no progress == deadlock).
FYI I tried a couple of py25 apps on 1.6.0 dev_appserver using the
built in ndb version without any troubles, but this doesn't mean that
there aren't any.
Actually, as long as you don't use any async_*() calls or yield, you
don't need that decorator -- the synchronous calls run the event loop
until they see progress. I see the same problem with or without it,
but only in the Python 2.7 runtime. My hunch is that the event loop
state gets reset however by some shenanigans with os.environ, which is
not a simple dict in the 2.7 App Engine runtime.
I'll get to the bottom of this yet.
> FYI I tried a couple of py25 apps on 1.6.0 dev_appserver using the
> built in ndb version without any troubles, but this doesn't mean that
> there aren't any.
It works consistently with py25 for me too.
--Guido
The problem is that when using the Py27 SDK, somehow os.getenv()
doesn't act the same way as os.environ.get().
I'll see if I can get this fixed in the final 1.6 SDK that goes out
next week. Hopefully the fix is to make os.getenv() work properly.
--Guido