Pylons / pyramid_cookbook

Pyramid cookbook recipes (documentation)
https://docs.pylonsproject.org/projects/pyramid-cookbook/en/latest/
182 stars 124 forks source link

Updates for Gunicorn 20 #222

Closed tilgovi closed 4 years ago

tilgovi commented 4 years ago

In versions of Gunicorn prior to 20, use of egg:gunicorn#main was deprecated when used with external script runners and the Gunicorn documentation suggested use of the Gunicorn CLI directly.

As requests came into the Gunicorn issue tracker for the ability to advanced Paste features like specifying globals for interpolation in the config file and using alternate server blocks, it became clear that adding these features would significantly inflate the surface of the Gunicorn CLI. Furthermore, it was potentially confusing that using the Gunicorn CLI while specifying another server in the server block would still use Gunicorn as the server.

For version 20, it was decided that it is best to let the tools of the Paste ecosystem manage invoking the server. It is no longer deprecated to specify egg:gunicorn#main as the server and invoke Gunicorn with pserve. Gunicorn is fully supported as a Paste Deploy server factory. Additionally, the Gunicorn CLI fully supports reading a Paste Deploy app factory from a .ini file. However, Gunicorn is not a Paste Script runner.

I suggest removing the "short story" from the gunicorn.rst. It is better to suggest that users change their .ini server block to use Gunicorn but to keep the invocation of pserve as before.

tilgovi commented 4 years ago

More information here: http://docs.gunicorn.org/en/stable/run.html#paste-deployment

stevepiercy commented 4 years ago

I'd accept a PR with the changes. This is, after all, the Pyramid Community Cookbook. :wink:

tilgovi commented 4 years ago

@stevepiercy understood! I almost started with that, but backed away because I couldn't decide exactly what to do. But I guess there's no one better to decide than myself :). PR incoming.

tilgovi commented 4 years ago

PR at #223.