I believe that the following example is incorrect in the documentation [1]:app = ndb.toplevel(webapp.WSGIApplication)([('/', MainPage)])
It sees to me that the correct way to write this would be:
app = ndb.toplevel(webapp.WSGIApplication([('/', MainPage)]))
Otherwise it just wraps the class, not the actual instance of it and while it seems to work, it can lead to silent corruptions (dropping of async tasks).
Am I correct in this assumption? Should I file a bug for this?
Thanks,
Attila[1] https://developers.google.com/appengine/docs/python/ndb/async