From: Ben Darnell Date: Fri, 3 Jun 2022 19:29:26 +0000 (-0400) Subject: Merge pull request #3147 from bdarnell/docs62 X-Git-Tag: v6.2.0b1~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ebbfea6af3f8fd829090025aecbe09f3fe65662;p=thirdparty%2Ftornado.git Merge pull request #3147 from bdarnell/docs62 docs,demos: Update for asyncio.run pattern --- 8ebbfea6af3f8fd829090025aecbe09f3fe65662 diff --cc tornado/web.py index f3eb6e1e7,0604053ff..cd6a81b4b --- a/tornado/web.py +++ b/tornado/web.py @@@ -2095,25 -2095,14 +2097,24 @@@ class Application(ReversibleRouter) autoreload.start() - def listen(self, port: int, address: str = "", **kwargs: Any) -> HTTPServer: + def listen( + self, + port: int, + address: Optional[str] = None, + *, + family: socket.AddressFamily = socket.AF_UNSPEC, + backlog: int = tornado.netutil._DEFAULT_BACKLOG, + flags: Optional[int] = None, + reuse_port: bool = False, + **kwargs: Any + ) -> HTTPServer: """Starts an HTTP server for this application on the given port. - This is a convenience alias for creating an `.HTTPServer` - object and calling its listen method. Keyword arguments not - supported by `HTTPServer.listen <.TCPServer.listen>` are passed to the - `.HTTPServer` constructor. For advanced uses - (e.g. multi-process mode), do not use this method; create an - `.HTTPServer` and call its + This is a convenience alias for creating an `.HTTPServer` object and + calling its listen method. Keyword arguments not supported by + `HTTPServer.listen <.TCPServer.listen>` are passed to the `.HTTPServer` + constructor. For advanced uses (e.g. multi-process mode), do not use + this method; create an `.HTTPServer` and call its `.TCPServer.bind`/`.TCPServer.start` methods directly. Note that after calling this method you still need to call