Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace cherrypy with cheroot #1348

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.rst
Expand Up @@ -21,7 +21,7 @@
.. _paste: http://pythonpaste.org/
.. _fapws3: https://github.com/william-os4y/fapws3
.. _bjoern: https://github.com/jonashaag/bjoern
.. _cherrypy: http://www.cherrypy.org/
.. _cheroot: https://cheroot.rtfd.io/
.. _WSGI: http://www.wsgi.org/
.. _Python: http://python.org/

Expand All @@ -35,7 +35,7 @@ Bottle is a fast, simple and lightweight WSGI_ micro web-framework for Python_.
* **Routing:** Requests to function-call mapping with support for clean and dynamic URLs.
* **Templates:** Fast and pythonic `*built-in template engine* <http://bottlepy.org/docs/dev/tutorial.html#tutorial-templates>`_ and support for mako_, jinja2_ and cheetah_ templates.
* **Utilities:** Convenient access to form data, file uploads, cookies, headers and other HTTP-related metadata.
* **Server:** Built-in HTTP development server and support for paste_, fapws3_, bjoern_, `Google App Engine <https://cloud.google.com/appengine/>`_, cherrypy_ or any other WSGI_ capable HTTP server.
* **Server:** Built-in HTTP development server and support for paste_, fapws3_, bjoern_, `Google App Engine <https://cloud.google.com/appengine/>`_, cheroot_ or any other WSGI_ capable HTTP server.

Homepage and documentation: http://bottlepy.org

Expand Down
33 changes: 2 additions & 31 deletions bottle.py
Expand Up @@ -3287,35 +3287,6 @@ class server_cls(server_cls):
raise


class CherryPyServer(ServerAdapter):
def run(self, handler): # pragma: no cover
depr(0, 13, "The wsgi server part of cherrypy was split into a new "
"project called 'cheroot'.", "Use the 'cheroot' server "
"adapter instead of cherrypy.")
from cherrypy import wsgiserver # This will fail for CherryPy >= 9

self.options['bind_addr'] = (self.host, self.port)
self.options['wsgi_app'] = handler

certfile = self.options.get('certfile')
if certfile:
del self.options['certfile']
keyfile = self.options.get('keyfile')
if keyfile:
del self.options['keyfile']

server = wsgiserver.CherryPyWSGIServer(**self.options)
if certfile:
server.ssl_certificate = certfile
if keyfile:
server.ssl_private_key = keyfile

try:
server.start()
finally:
server.stop()


class CherootServer(ServerAdapter):
def run(self, handler): # pragma: no cover
from cheroot import wsgi
Expand Down Expand Up @@ -3557,7 +3528,7 @@ def get_event_loop(self):

class AutoServer(ServerAdapter):
""" Untested. """
adapters = [WaitressServer, PasteServer, TwistedServer, CherryPyServer,
adapters = [WaitressServer, PasteServer, TwistedServer,
CherootServer, WSGIRefServer]

def run(self, handler):
Expand All @@ -3573,7 +3544,7 @@ def run(self, handler):
'flup': FlupFCGIServer,
'wsgiref': WSGIRefServer,
'waitress': WaitressServer,
'cherrypy': CherryPyServer,
'cherrypy': CherootServer,
'cheroot': CherootServer,
'paste': PasteServer,
'fapws3': FapwsServer,
Expand Down
4 changes: 2 additions & 2 deletions docs/_locale/_pot/deployment.pot
Expand Up @@ -65,7 +65,7 @@ msgid "Switching the Server Backend"
msgstr ""

#: ../../deployment.rst:54
msgid "The easiest way to increase performance is to install a multi-threaded server library like paste_ or cherrypy_ and tell Bottle to use that instead of the single-threaded default server::"
msgid "The easiest way to increase performance is to install a multi-threaded server library like paste_ or cheroot_ and tell Bottle to use that instead of the single-threaded default server::"
msgstr ""

#: ../../deployment.rst:58
Expand Down Expand Up @@ -133,7 +133,7 @@ msgid "cherrypy"
msgstr ""

#: ../../deployment.rst:67
msgid "cherrypy_"
msgid "cheroot_"
msgstr ""

#: ../../deployment.rst:67
Expand Down
2 changes: 1 addition & 1 deletion docs/_locale/_pot/index.pot
Expand Up @@ -37,7 +37,7 @@ msgid "**Utilities:** Convenient access to form data, file uploads, cookies, hea
msgstr ""

#: ../../index.rst:28
msgid "**Server:** Built-in HTTP development server and support for paste_, bjoern_, gae_, cherrypy_ or any other WSGI_ capable HTTP server."
msgid "**Server:** Built-in HTTP development server and support for paste_, bjoern_, gae_, cheroot_ or any other WSGI_ capable HTTP server."
msgstr ""

#: ../../index.rst:31
Expand Down
2 changes: 1 addition & 1 deletion docs/_locale/_pot/recipes.pot
Expand Up @@ -194,7 +194,7 @@ msgid "Do not cache small files because a disk seek would take longer than on-th
msgstr ""

#: ../../recipes.rst:232
msgid "Because of these requirements, it is the recommendation of the Bottle project that Gzip compression is best handled by the WSGI server Bottle runs on top of. WSGI servers such as cherrypy_ provide a GzipFilter_ middleware that can be used to accomplish this."
msgid "Because of these requirements, it is the recommendation of the Bottle project that Gzip compression is best handled by the WSGI server Bottle runs on top of. WSGI servers such as cheroot_ provide a GzipFilter_ middleware that can be used to accomplish this."
msgstr ""

#: ../../recipes.rst:236
Expand Down
2 changes: 1 addition & 1 deletion docs/_locale/_pot/tutorial.pot
Expand Up @@ -890,7 +890,7 @@ msgid "Bottle runs on the built-in `wsgiref WSGIServer <http://docs.python.org/l
msgstr ""

#: ../../tutorial.rst:1036
msgid "The easiest way to increase performance is to install a multi-threaded server library like paste_ or cherrypy_ and tell Bottle to use that instead of the single-threaded server::"
msgid "The easiest way to increase performance is to install a multi-threaded server library like paste_ or cheroot_ and tell Bottle to use that instead of the single-threaded server::"
msgstr ""

#: ../../tutorial.rst:1040
Expand Down
2 changes: 1 addition & 1 deletion docs/_locale/_pot/tutorial_app.pot
Expand Up @@ -481,7 +481,7 @@ msgid "As said above, the standard server is perfectly suitable for development,
msgstr ""

#: ../../tutorial_app.rst:488
msgid "But Bottle has already various adapters to multi-threaded servers on board, which perform better on higher load. Bottle supports Cherrypy_, Flup_ and Paste_."
msgid "But Bottle has already various adapters to multi-threaded servers on board, which perform better on higher load. Bottle supports cheroot_, Flup_ and Paste_."
msgstr ""

#: ../../tutorial_app.rst:490
Expand Down
4 changes: 2 additions & 2 deletions docs/_locale/de_DE/LC_MESSAGES/deployment.po
Expand Up @@ -102,7 +102,7 @@ msgstr ""
#: ../../deployment.rst:54
msgid ""
"The easiest way to increase performance is to install a multi-threaded "
"server library like paste_ or cherrypy_ and tell Bottle to use that instead "
"server library like paste_ or cheroot_ and tell Bottle to use that instead "
"of the single-threaded default server::"
msgstr ""

Expand Down Expand Up @@ -173,7 +173,7 @@ msgid "cherrypy"
msgstr ""

#: ../../deployment.rst:67
msgid "cherrypy_"
msgid "cheroot_"
msgstr ""

#: ../../deployment.rst:67
Expand Down
2 changes: 1 addition & 1 deletion docs/_locale/de_DE/LC_MESSAGES/index.po
Expand Up @@ -49,7 +49,7 @@ msgstr ""
#: ../../index.rst:28
msgid ""
"**Server:** Built-in HTTP development server and support for paste_, "
"bjoern_, gae_, cherrypy_ or any other WSGI_ capable HTTP server."
"bjoern_, gae_, cheroot_ or any other WSGI_ capable HTTP server."
msgstr ""

#: ../../index.rst:31
Expand Down
2 changes: 1 addition & 1 deletion docs/_locale/de_DE/LC_MESSAGES/recipes.po
Expand Up @@ -260,7 +260,7 @@ msgstr ""
msgid ""
"Because of these requirements, it is the recommendation of the Bottle "
"project that Gzip compression is best handled by the WSGI server Bottle runs"
" on top of. WSGI servers such as cherrypy_ provide a GzipFilter_ middleware "
" on top of. WSGI servers such as cheroot_ provide a GzipFilter_ middleware "
"that can be used to accomplish this."
msgstr ""

Expand Down
2 changes: 1 addition & 1 deletion docs/_locale/de_DE/LC_MESSAGES/tutorial.po
Expand Up @@ -1390,7 +1390,7 @@ msgstr ""
#: ../../tutorial.rst:1036
msgid ""
"The easiest way to increase performance is to install a multi-threaded "
"server library like paste_ or cherrypy_ and tell Bottle to use that instead "
"server library like paste_ or cheroot_ and tell Bottle to use that instead "
"of the single-threaded server::"
msgstr ""

Expand Down
2 changes: 1 addition & 1 deletion docs/_locale/de_DE/LC_MESSAGES/tutorial_app.po
Expand Up @@ -773,7 +773,7 @@ msgstr ""
#: ../../tutorial_app.rst:488
msgid ""
"But Bottle has already various adapters to multi-threaded servers on board, "
"which perform better on higher load. Bottle supports Cherrypy_, Flup_ and "
"which perform better on higher load. Bottle supports cheroot_, Flup_ and "
"Paste_."
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions docs/_locale/fr/LC_MESSAGES/deployment.po
Expand Up @@ -103,7 +103,7 @@ msgstr ""
#: ../../deployment.rst:54
msgid ""
"The easiest way to increase performance is to install a multi-threaded "
"server library like paste_ or cherrypy_ and tell Bottle to use that instead "
"server library like paste_ or cheroot_ and tell Bottle to use that instead "
"of the single-threaded default server::"
msgstr ""

Expand Down Expand Up @@ -174,7 +174,7 @@ msgid "cherrypy"
msgstr ""

#: ../../deployment.rst:67
msgid "cherrypy_"
msgid "cheroot_"
msgstr ""

#: ../../deployment.rst:67
Expand Down
2 changes: 1 addition & 1 deletion docs/_locale/fr/LC_MESSAGES/index.po
Expand Up @@ -50,7 +50,7 @@ msgstr ""
#: ../../index.rst:28
msgid ""
"**Server:** Built-in HTTP development server and support for paste_, "
"bjoern_, gae_, cherrypy_ or any other WSGI_ capable HTTP server."
"bjoern_, gae_, cheroot_ or any other WSGI_ capable HTTP server."
msgstr ""

#: ../../index.rst:31
Expand Down
2 changes: 1 addition & 1 deletion docs/_locale/fr/LC_MESSAGES/recipes.po
Expand Up @@ -260,7 +260,7 @@ msgstr ""
msgid ""
"Because of these requirements, it is the recommendation of the Bottle "
"project that Gzip compression is best handled by the WSGI server Bottle runs"
" on top of. WSGI servers such as cherrypy_ provide a GzipFilter_ middleware "
" on top of. WSGI servers such as cheroot_ provide a GzipFilter_ middleware "
"that can be used to accomplish this."
msgstr ""

Expand Down
2 changes: 1 addition & 1 deletion docs/_locale/fr/LC_MESSAGES/tutorial.po
Expand Up @@ -1388,7 +1388,7 @@ msgstr ""
#: ../../tutorial.rst:1036
msgid ""
"The easiest way to increase performance is to install a multi-threaded "
"server library like paste_ or cherrypy_ and tell Bottle to use that instead "
"server library like paste_ or cheroot_ and tell Bottle to use that instead "
"of the single-threaded server::"
msgstr ""

Expand Down
2 changes: 1 addition & 1 deletion docs/_locale/fr/LC_MESSAGES/tutorial_app.po
Expand Up @@ -773,7 +773,7 @@ msgstr ""
#: ../../tutorial_app.rst:488
msgid ""
"But Bottle has already various adapters to multi-threaded servers on board, "
"which perform better on higher load. Bottle supports Cherrypy_, Flup_ and "
"which perform better on higher load. Bottle supports cheroot_, Flup_ and "
"Paste_."
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions docs/_locale/ja_JP/LC_MESSAGES/deployment.po
Expand Up @@ -102,7 +102,7 @@ msgstr ""
#: ../../deployment.rst:54
msgid ""
"The easiest way to increase performance is to install a multi-threaded "
"server library like paste_ or cherrypy_ and tell Bottle to use that instead "
"server library like paste_ or cheroot_ and tell Bottle to use that instead "
"of the single-threaded default server::"
msgstr ""

Expand Down Expand Up @@ -173,7 +173,7 @@ msgid "cherrypy"
msgstr ""

#: ../../deployment.rst:67
msgid "cherrypy_"
msgid "cheroot_"
msgstr ""

#: ../../deployment.rst:67
Expand Down
2 changes: 1 addition & 1 deletion docs/_locale/ja_JP/LC_MESSAGES/index.po
Expand Up @@ -52,7 +52,7 @@ msgstr "ファイルアップロートやクッキー、ヘッダー、その他
#: ../../index.rst:28
msgid ""
"**Server:** Built-in HTTP development server and support for paste_, "
"bjoern_, gae_, cherrypy_ or any other WSGI_ capable HTTP server."
"bjoern_, gae_, cheroot_ or any other WSGI_ capable HTTP server."
msgstr ""

#: ../../index.rst:31
Expand Down
2 changes: 1 addition & 1 deletion docs/_locale/ja_JP/LC_MESSAGES/recipes.po
Expand Up @@ -260,7 +260,7 @@ msgstr ""
msgid ""
"Because of these requirements, it is the recommendation of the Bottle "
"project that Gzip compression is best handled by the WSGI server Bottle runs"
" on top of. WSGI servers such as cherrypy_ provide a GzipFilter_ middleware "
" on top of. WSGI servers such as cheroot_ provide a GzipFilter_ middleware "
"that can be used to accomplish this."
msgstr ""

Expand Down
2 changes: 1 addition & 1 deletion docs/_locale/ja_JP/LC_MESSAGES/tutorial.po
Expand Up @@ -1389,7 +1389,7 @@ msgstr ""
#: ../../tutorial.rst:1036
msgid ""
"The easiest way to increase performance is to install a multi-threaded "
"server library like paste_ or cherrypy_ and tell Bottle to use that instead "
"server library like paste_ or cheroot_ and tell Bottle to use that instead "
"of the single-threaded server::"
msgstr ""

Expand Down
2 changes: 1 addition & 1 deletion docs/_locale/ja_JP/LC_MESSAGES/tutorial_app.po
Expand Up @@ -773,7 +773,7 @@ msgstr ""
#: ../../tutorial_app.rst:488
msgid ""
"But Bottle has already various adapters to multi-threaded servers on board, "
"which perform better on higher load. Bottle supports Cherrypy_, Flup_ and "
"which perform better on higher load. Bottle supports cheroot_, Flup_ and "
"Paste_."
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions docs/_locale/pt_BR/LC_MESSAGES/_pot/deployment.po
Expand Up @@ -95,7 +95,7 @@ msgstr ""
#: ../../deployment.rst:53
msgid ""
"The easiest way to increase performance is to install a multi-threaded "
"server library like paste_ or cherrypy_ and tell Bottle to use that instead "
"server library like paste_ or cheroot_ and tell Bottle to use that instead "
"of the single-threaded default server::"
msgstr ""

Expand Down Expand Up @@ -166,7 +166,7 @@ msgid "cherrypy"
msgstr ""

#: ../../deployment.rst:66
msgid "cherrypy_"
msgid "cheroot_"
msgstr ""

#: ../../deployment.rst:66
Expand Down
2 changes: 1 addition & 1 deletion docs/_locale/pt_BR/LC_MESSAGES/_pot/index.po
Expand Up @@ -43,7 +43,7 @@ msgstr ""
#: ../../index.rst:29
msgid ""
"**Server:** Built-in HTTP development server and support for paste_, "
"fapws3_, bjoern_, gae_, cherrypy_ or any other WSGI_ capable HTTP server."
"fapws3_, bjoern_, gae_, cheroot_ or any other WSGI_ capable HTTP server."
msgstr ""

#: ../../index.rst:32
Expand Down
2 changes: 1 addition & 1 deletion docs/_locale/pt_BR/LC_MESSAGES/_pot/recipes.po
Expand Up @@ -233,7 +233,7 @@ msgstr ""
msgid ""
"Because of these requirements, it is the recommendation of the Bottle "
"project that Gzip compression is best handled by the WSGI server Bottle runs"
" on top of. WSGI servers such as cherrypy_ provide a GzipFilter_ middleware "
" on top of. WSGI servers such as cheroot_ provide a GzipFilter_ middleware "
"that can be used to accomplish this."
msgstr ""

Expand Down
2 changes: 1 addition & 1 deletion docs/_locale/pt_BR/LC_MESSAGES/_pot/tutorial.po
Expand Up @@ -1429,7 +1429,7 @@ msgstr ""
#: ../../tutorial.rst:1048
msgid ""
"The easiest way to increase performance is to install a multi-threaded "
"server library like paste_ or cherrypy_ and tell Bottle to use that instead "
"server library like paste_ or cheroot_ and tell Bottle to use that instead "
"of the single-threaded server::"
msgstr ""

Expand Down
2 changes: 1 addition & 1 deletion docs/_locale/pt_BR/LC_MESSAGES/_pot/tutorial_app.po
Expand Up @@ -793,7 +793,7 @@ msgstr ""
#: ../../tutorial_app.rst:494
msgid ""
"But Bottle has already various adapters to multi-threaded servers on board, "
"which perform better on higher load. Bottle supports Cherrypy_, Fapws3_, "
"which perform better on higher load. Bottle supports cheroot_, Fapws3_, "
"Flup_ and Paste_."
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions docs/_locale/pt_BR/LC_MESSAGES/deployment.po
Expand Up @@ -102,7 +102,7 @@ msgstr ""
#: ../../deployment.rst:54
msgid ""
"The easiest way to increase performance is to install a multi-threaded "
"server library like paste_ or cherrypy_ and tell Bottle to use that instead "
"server library like paste_ or cheroot_ and tell Bottle to use that instead "
"of the single-threaded default server::"
msgstr ""

Expand Down Expand Up @@ -173,7 +173,7 @@ msgid "cherrypy"
msgstr ""

#: ../../deployment.rst:67
msgid "cherrypy_"
msgid "cheroot_"
msgstr ""

#: ../../deployment.rst:67
Expand Down
2 changes: 1 addition & 1 deletion docs/_locale/pt_BR/LC_MESSAGES/index.po
Expand Up @@ -53,7 +53,7 @@ msgstr "**Utilitários:** Conveniente acesso a dados de formulários, upload de
#: ../../index.rst:28
msgid ""
"**Server:** Built-in HTTP development server and support for paste_, "
"bjoern_, gae_, cherrypy_ or any other WSGI_ capable HTTP server."
"bjoern_, gae_, cheroot_ or any other WSGI_ capable HTTP server."
msgstr ""

#: ../../index.rst:31
Expand Down
2 changes: 1 addition & 1 deletion docs/_locale/pt_BR/LC_MESSAGES/recipes.po
Expand Up @@ -260,7 +260,7 @@ msgstr ""
msgid ""
"Because of these requirements, it is the recommendation of the Bottle "
"project that Gzip compression is best handled by the WSGI server Bottle runs"
" on top of. WSGI servers such as cherrypy_ provide a GzipFilter_ middleware "
" on top of. WSGI servers such as cheroot_ provide a GzipFilter_ middleware "
"that can be used to accomplish this."
msgstr ""

Expand Down
2 changes: 1 addition & 1 deletion docs/_locale/pt_BR/LC_MESSAGES/tutorial.po
Expand Up @@ -1390,7 +1390,7 @@ msgstr ""
#: ../../tutorial.rst:1036
msgid ""
"The easiest way to increase performance is to install a multi-threaded "
"server library like paste_ or cherrypy_ and tell Bottle to use that instead "
"server library like paste_ or cheroot_ and tell Bottle to use that instead "
"of the single-threaded server::"
msgstr ""

Expand Down
2 changes: 1 addition & 1 deletion docs/_locale/pt_BR/LC_MESSAGES/tutorial_app.po
Expand Up @@ -773,7 +773,7 @@ msgstr ""
#: ../../tutorial_app.rst:488
msgid ""
"But Bottle has already various adapters to multi-threaded servers on board, "
"which perform better on higher load. Bottle supports Cherrypy_, Flup_ and "
"which perform better on higher load. Bottle supports cheroot_, Flup_ and "
"Paste_."
msgstr ""

Expand Down