plone / plone.recipe.zope2instance

zc.buildout recipe to setup and configure a Zope 2 instance.
https://pypi.org/project/plone.recipe.zope2instance
6 stars 23 forks source link

Add http-fast-listen option for waitress #75

Closed tschorr closed 5 years ago

tschorr commented 5 years ago

s. https://github.com/plone/plone.recipe.zope2instance/issues/71 (and also https://github.com/zopefoundation/Zope/issues/416).

waitress.serve() accepts a list of (prebound) sockets, https://waitress.readthedocs.io/en/latest/arguments.html.

Suggestion is to bind a socket before loading the application and to use a custom server_factory to make this work with PasteDeploy. This could also be done in https://github.com/zopefoundation/Zope, but plone.recipe.zope2instance is already relying on waitress anyway (Zope doesn't really seem to depend on waitress even though it is currently required it in it's setup.py).

mister-roboto commented 5 years ago

@tschorr thanks for creating this Pull Request and help improve Plone!

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass.

Whenever you feel that the pull request is ready to be tested, either start all jenkins jobs pull requests by yourself, or simply add a comment in this pull request stating:

@jenkins-plone-org please run jobs

With this simple comment all the jobs will be started automatically.

Happy hacking!

tschorr commented 5 years ago

@jenkins-plone-org please run jobs

tschorr commented 5 years ago

@jenkins-plone-org please run jobs

tschorr commented 5 years ago

@jenkins-plone-org please run jobs

icemac commented 5 years ago

Hm, there are broken tests, I'd like to review after they are fixed.

tschorr commented 5 years ago

There are broken doctests after merging master. I'm about to fix them. Don't merge

tschorr commented 5 years ago

@jenkins-plone-org please run jobs

tschorr commented 5 years ago

@icemac Travis tests are green now and the one failing Robot Test on Jenkins looks unrelated. Feel free to review.

@jensens I currently don't have an opportunity to test this on Windows

tschorr commented 5 years ago

@icemac I'm basically following https://pastedeploy.readthedocs.io/en/latest/#paste-server-factory. I opted for import waitress and waitress.serve to avaoid the ambiguity.

icemac commented 5 years ago

@jenkins-plone-org please run jobs

tschorr commented 5 years ago

Again the one failing robot test looks unrelated.

jensens commented 5 years ago

Indeed, I merge this one now.