From 6e9c55ac25993e12eb9674c4b11c8673c55cfd54 Mon Sep 17 00:00:00 2001 From: Marcel Hellkamp Date: Sat, 25 Mar 2017 17:53:27 +0100 Subject: [PATCH] Added depr warning for the outdated cherrypy server adapter. If you are using this adapter, simply switch to 'cheroot' This should fix some recent and some very old issues regarding cherrypy: fix #947 Leave explicit the maxima version supported the CherryPy (<= 9.0.0) fix #932 Add ServerAdapter (fix CherryPy ServerAdapter) fix #685 Update CherryPy SSL to use latest API and work on Py3 fix #574 Allow custom bind_addr for CherryPy (backported from commit be90814117008e6f19a2d8d5c67b876787888aa6) [juergh: Adjust context, drop modifications of test/travis-requirements.txt which does not exist in 0.12.] Signed-off-by: Juerg Haefliger --- bottle.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bottle.py b/bottle.py index 11121b8e..60e6c9db 100644 --- a/bottle.py +++ b/bottle.py @@ -2793,7 +2793,11 @@ class server_cls(server_cls): class CherryPyServer(ServerAdapter): def run(self, handler): # pragma: no cover - from cherrypy import wsgiserver + 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