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

class TCPServer has no attribute 'shutdown_request' when debugging Cherrrypy webserver #95

Open
watercrossing opened this issue Feb 8, 2017 · 1 comment

Comments

@watercrossing
Copy link

A simple webserver using cherrypy fails to debug. Cherrypy 10.0, python 2.6.

[08/Feb/2017:10:59:56] ENGINE AttributeError("class TCPServer has no attribute 'shutdown_request'",)
Traceback (most recent call last):
  File "venv/lib/python2.6/site-packages/cheroot/server.py", line 966, in communicate
    req.respond()
  File "venv/lib/python2.6/site-packages/cheroot/server.py", line 792, in respond
    self.server.gateway(self).respond()
  File "venv/lib/python2.6/site-packages/cheroot/wsgi.py", line 96, in respond
    response = self.req.server.wsgi_app(self.env, self.start_response)
  File "venv/lib/python2.6/site-packages/cherrypy/_cptree.py", line 287, in __call__
    return app(environ, start_response)
  File "venv/lib/python2.6/site-packages/cherrypy/_cptree.py", line 153, in __call__
    return self.wsgiapp(environ, start_response)
  File "venv/lib/python2.6/site-packages/cherrypy/_cpwsgi.py", line 448, in __call__
    head = callable(head, **conf)
  File "venv/lib/python2.6/site-packages/wdb/ext.py", line 121, in __init__
    _patch_tcpserver()
  File "venv/lib/python2.6/site-packages/wdb/ext.py", line 37, in _patch_tcpserver
    shutdown_request = TCPServer.shutdown_request
AttributeError: class TCPServer has no attribute 'shutdown_request'
@watercrossing
Copy link
Author

This seems non-obvious to fix. Python 2.6's SocketServer implementations do not expose a shutdown_request method that can be overwritten (compare 2.6 with 2.7). I guess one could overwrite shutdown_server instead.

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

No branches or pull requests

1 participant