nephics/tornado — pull request #1 by JohnVinyard (2013-09-10 01:26:00+00:00)
Title: Fix bug whereby asynchronous decorator is applied to put and post method...

Fixed a bug whereby `asynchronous` decorator was applied on each class Instantiation, leading to max recursion depth errors. This code demonstrates the problem:

```
from tornado import ioloop,web
import inspect

@web.stream_body
class Handler(web.RequestHandler):
def put(self):
print len([x for x in inspect.stack() if 'wrapper' in str(x)])
self.finish()

application = web.Application([
(r'/',Handler)
])

if __name__ == '__main__':
application.listen(8080)
ioloop.IOLoop.instance().start()
```

Each new request will show the stack depth increasing until a max recursion depth error is encountered.

This happens because `asynchronous` is applied inside `__init__`.