Browse Source

Update Tornado Web Server 5.1.1 (cc2cf07) → 5.1.1 (a99f1471).

pull/1200/head
JackDandy 6 years ago
parent
commit
c1d267ba4a
  1. 1
      CHANGES.md
  2. 4
      lib/tornado/util.py
  3. 2
      lib/tornado/web.py
  4. 12
      lib/tornado/websocket.py

1
CHANGES.md

@ -13,6 +13,7 @@
* Update profilehooks module 1.10.1 (fdbf19d) to 1.11.0 (e17f378)
* Update scandir 1.9.0 (9ab3d1f) to 1.10.0 (982e6ba)
* Update Six compatibility library 1.12.0 (d927b9e) to 1.12.0 (8da94b8)
* Update Tornado Web Server 5.1.1 (cc2cf07) to 5.1.1 (a99f1471)
[develop changelog]

4
lib/tornado/util.py

@ -59,7 +59,7 @@ else:
import datetime # noqa
import types # noqa
from typing import Any, AnyStr, Union, Optional, Dict, Mapping # noqa
from typing import Tuple, Match, Callable # noqa
from typing import List, Tuple, Match, Callable # noqa
if PY3:
_BaseString = str
@ -252,7 +252,7 @@ _re_unescape_pattern = re.compile(r'\\(.)', re.DOTALL)
def re_unescape(s):
# type: (str) -> str
"""Unescape a string escaped by `re.escape`.
r"""Unescape a string escaped by `re.escape`.
May raise ``ValueError`` for regular expressions which could not
have been produced by `re.escape` (for example, strings containing

2
lib/tornado/web.py

@ -1887,7 +1887,7 @@ class _ApplicationRouter(ReversibleRuleRouter):
class Application(ReversibleRouter):
"""A collection of request handlers that make up a web application.
r"""A collection of request handlers that make up a web application.
Instances of this class are callable and can be passed directly to
HTTPServer to serve the application::

12
lib/tornado/websocket.py

@ -751,10 +751,14 @@ class WebSocketProtocol13(WebSocketProtocol):
self.stream = self.handler.stream
self.start_pinging()
open_result = self._run_callback(self.handler.open, *self.handler.open_args,
**self.handler.open_kwargs)
if open_result is not None:
yield open_result
try:
open_result = self.handler.open(*self.handler.open_args, **self.handler.open_kwargs)
if open_result is not None:
yield open_result
except Exception:
self.handler.log_exception(*sys.exc_info())
self._abort()
yield self._receive_frame_loop()
def _parse_extensions_header(self, headers):

Loading…
Cancel
Save