Update WSGI functions to take necessary arguments
commit7cd3d7e9022a614ef424c266f542c1e5ea52666e
authorEric Searcy <emsearcy@gmail.com>
Thu, 30 Jul 2015 02:16:50 +0000 (29 19:16 -0700)
committerBarry Warsaw <barry@python.org>
Fri, 10 Feb 2017 16:58:53 +0000 (10 11:58 -0500)
tree7f9f4320bd988271e70a06a7314fb728bad460c8
parent2a4cade68d4d77c6107e090a39fad4a3011ee81d
Update WSGI functions to take necessary arguments

* gunicorn.py needs to initialize mailman once, not per request.
* make_application takes environment and response arguments, which it passes to
  the callable WSGI application (in this case, the instance of the RootedAPI
  class).  (wsgiref does something similar, but wsgi_server only needs a copy
  of the application, and it passes the same two arguments to that object
  internally.

Note, in my opinion wsgiapp.py's make_application has a misleading name, since
it doesn't behave like a normal make_application (it's not invoked by a WSGI
server). I've left it as-is, though, since it is public.
src/mailman/rest/gunicorn.py
src/mailman/rest/wsgiapp.py