The next release of Tornado (will be 4.0 when released, although the current master branch hasn't been updated to change all mentions of 3.3 to 4.0) makes some major changes to the HTTP internals and breaks gunicorn's monkey-patching of HTTPConnection.finish. Fortunately, there is now a cleaner way to do the tracking that gunicorn wants to do here, since the interface between HTTPServer and Application is more formally defined by the HTTPServerConnectionDelegate and HTTPMessageDelegate interfaces, so you should be able to wrap the Application (which implements/subclasses HTTPServerConnectionDelegate) and the HTTPMessageDelegate its start_request method returns.
Thanks, @bdarnell. Since you're familiar with these changes, do you think you could write a patch?
I've never actually used gunicorn and it doesn't look like there is any unit test coverage of this module, so I'm probably not the best person to make this change.
@bdarnell thanks! I will make sure the worker is working for the next release. Any idea when the 4.0 will be out?
I'm going to release a beta of 4.0 within a couple of weeks.
I apologize for forgetting to ping this thread again, but Tornado 4.0 was just released today.
@bdarnell thanks, should be fixed with a release today, I'm working on it :)
support tornado 4.0