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

Update CherryPy support for v 9.0.0 + #934

Open
RichardLangFromNZ opened this issue Feb 2, 2017 · 3 comments · May be fixed by #1348
Open

Update CherryPy support for v 9.0.0 + #934

RichardLangFromNZ opened this issue Feb 2, 2017 · 3 comments · May be fixed by #1348

Comments

@RichardLangFromNZ
Copy link

Current bottle (v0.12.13) is failing to import cherrypy.wsgiserver on line 2787 as it no longer exists.

[]http://docs.cherrypy.org/en/latest/history.html#v9-0-0

Work around by installing cherrypy version < 9.0.0

@jasondrew
Copy link

jasondrew commented Mar 12, 2017

A better solution is this fix that I applied inside bottle.py. There's still a wsgiserver implementation available in cherrypy, it's just moved/renamed into 'cheroot'.

    def run(self, handler):  # pragma: no cover
        # JDrew: added the 2nd import to handle the latest cherrypy not
        # supporting 'from cherrypy import wsgiserver'.
        try:
            from cherrypy import wsgiserver
        except ImportError:
            from cheroot.wsgi import Server as wsgiserver```

@liffiton
Copy link

liffiton commented May 4, 2017

This appears to have been fixed in be90814 and nearby commits, but this particular issue wasn't noted in the commit message. I expect the next release will include that support for cheroot.

@dimyme
Copy link

dimyme commented Oct 14, 2018

line 3271 fixed for me:

        # from cherrypy   import           wsgiserver                                  # This will fail for CherryPy >= 9                                   ###    TODO
        from cheroot.wsgi import Server as WSGIServer
        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(**self.options)  ################# ###     wsgiserver.CherryPyWSGIServer(**                  WSGIServer.CherryPyWSGIServer(**

@waghanza waghanza linked a pull request Aug 22, 2021 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants