Commit Graph

22 Commits

Author SHA1 Message Date
Ben Darnell 6c2aae090c all: Support lazy imports of submodules
A getattr hook in the top-level "tornado" package now imports submodules
automatically, eliminating the need to explicitly reference multiple submodules
in imports
2022-11-27 15:41:27 -05:00
Ben Darnell b909d37e54 docs,demos: Update for asyncio.run pattern
Adapt for Python 3.10 deprecation changes by using asyncio.run
instead of IOLoop.start throughout (except for TCPServer multi-process
docs).

Demos have all been changed but I haven't tested all of them.
2022-06-03 14:50:20 -04:00
Poruri Sai Rahul b3c63fbce0
Update super usage (#2912)
On Python 3, super does not need to be called with arguments where as on
Python 2, super needs to be called with a class object and an instance.

This commit updates the super usage using automated regex-based search
and replace. After the automated changes were made, each change was
individually checked before committing.
2020-09-13 11:06:02 -04:00
Ben Darnell 1e9a709111 demos: Format all the demos with `black` 2018-11-02 12:56:28 -04:00
chengkang 9b6d7174df fix issue #2438 2018-07-11 20:29:32 +08:00
Pierce Lopez 7e2fef9fb1 style fix: 2 blank lines around top-level class and function defs
flake8 codes E302 and E305
2018-01-01 15:57:42 -05:00
Pierce Lopez 48e042f2af style fix: closing bracket indent
E123 closing bracket does not match indentation of opening bracket's line
2018-01-01 15:56:07 -05:00
Samuel Chen 1330854b9e update demo/websocket for updating JQuery to 3.1.0 2016-08-08 16:01:50 +08:00
dinever f9741732f0 Use super() to call super "__init__()" 2015-12-08 00:37:43 -05:00
Jan Sarenik 519bb7aa49 Simplify HTML templates by using HTML5 2015-08-16 08:51:06 +02:00
Ben Darnell 4f86890cfa Add make_current keyword argument to IOLoop constructor.
This allows applications to create an IOLoop to be started in another
thread without making it current in the originating thread.

Update docs to use IOLoop.current() in place of IOLoop.instance() when
starting the loop.

Closes #1390.
2015-03-29 16:31:06 -04:00
Ben Darnell 576c1c43bc Implement permessage-deflate websocket extension.
Parameters to the extension are not fully supported (the client side
supports client_no_context_takeover which is mandatory to implement,
but the server rejects any parameters offered by the client, and neither
side supports setting wbits).

Closes #308.
Closes #668.
2014-07-27 01:32:09 -04:00
Ben Darnell 3824b4c80b Drop support for the draft76 version of WebSockets.
Browsers that only support draft76 are now less common than those
that do not support websockets at all, so applications should
use their non-websocket workarounds for these browsers.
2014-06-21 14:06:59 -04:00
shinriyo 142b5fb92f tab to space
tab to space and indent fix
2014-03-26 10:04:07 +09:00
Ozan Yerli 449652b603 Unnecessary MozWebSocket in the WebSocket demo
WebSocket is implemented in all modern web browsers.
2013-04-21 21:30:23 +03:00
Ben Darnell 8ddc760f18 Fix draft76 websocket protocol; fix websocket demo for python 3. 2013-03-18 20:52:23 -04:00
Ben Darnell bc4917b65b Use autoescape in websocket chat demo. 2013-03-03 12:23:28 -05:00
Taylor Hughes 35b432fee2 Make it obvious to anyone reading copy-pasted example code that the cookie secret is not suitable for production use. 2012-08-31 23:47:11 -07:00
Ben Darnell 1b38b58da8 Update websocket chat demo to work when not addressed as localhost.
Turn on draft76 support.
2012-01-21 17:39:37 -08:00
Ben Darnell c91df19763 Make websocket demo work on firefox 6 beta 2011-07-17 15:01:07 -07:00
Ben Darnell 26feb663aa BACKWARDS-INCOMPATIBLE: turn on template autoescaping by default.
Disable autoescaping in demos that don't already use it.
2011-06-11 17:22:09 -07:00
Ben Darnell cad4a30879 Add simple test application for websockets 2011-05-17 23:14:02 -07:00