|
| 1 | +What's new in Tornado 6.5.0 |
| 2 | +=========================== |
| 3 | + |
| 4 | +In progress |
| 5 | +----------- |
| 6 | + |
| 7 | +General Changes |
| 8 | +~~~~~~~~~~~~~~~ |
| 9 | + |
| 10 | +- Python 3.14 is now supported. Older versions of Tornado will work on Python 3.14 but may log |
| 11 | + deprecation warnings. |
| 12 | +- The minimum supported Python version is 3.9. |
| 13 | + |
| 14 | +Deprecation Notices |
| 15 | +~~~~~~~~~~~~~~~~~~~ |
| 16 | + |
| 17 | +- Support for ``obs-fold`` continuation lines in HTTP headers is deprecated and will be removed in |
| 18 | + Tornado 7.0, as is the use of carriage returns without line feeds as header separators. |
| 19 | +- The ``callback`` argument to ``websocket_connect`` is deprecated and will be removed in |
| 20 | + Tornado 7.0. Note that ``on_message_callback`` is not deprecated. |
| 21 | +- The ``log_message`` and ``args`` attributes of `tornado.web.HTTPError` are deprecated. Use the |
| 22 | + new ``get_message`` method instead. |
| 23 | + |
| 24 | +Type Annotation Changes |
| 25 | +~~~~~~~~~~~~~~~~~~~~~~~ |
| 26 | + |
| 27 | +- `tornado.concurrent.chain_future` is now typed as accepting both asyncio and concurrent Futures. |
| 28 | +- `tornado.gen.multi` and ``multi_future`` now take ``Sequences`` and ``Mappings`` instead of |
| 29 | + ``List`` and ``Dict``. |
| 30 | +- `tornado.httputil.RequestStartLine` and `.ResponseStartLine` now have type annotations for |
| 31 | + their attributes. |
| 32 | +- `.HTTPHeaders` now has type annotations for its elements. |
| 33 | +- The ``autoescape`` argument to `tornado.template.BaseLoader` is now marked as optional. |
| 34 | +- ``tornado.routing._RuleList`` is now a ``Sequence`` for more flexibility. |
| 35 | +- ``.RequestHandler.SUPPPORTED_METHODS`` is now typed to support overriding in a subclass. |
| 36 | +- Types for `.RequestHandler.get_body_argument` and ``get_query_argument`` are improved and now |
| 37 | + match the ``get_argument`` method. |
| 38 | +- `.RequestHandler.get_cookie` now has more accurate types. |
| 39 | +- The return type of `.UIModule.render` may now be either `str` or `bytes`. |
| 40 | + |
| 41 | +``tornado.httputil`` |
| 42 | +~~~~~~~~~~~~~~~~~~~~ |
| 43 | + |
| 44 | +- Support for ``obs-fold`` continuation lines in HTTP headers is deprecated and will be removed in |
| 45 | + Tornado 7.0, as is the use of carriage returns without line feeds as header separators. |
| 46 | +- Request start lines may no longer include control characters. |
| 47 | +- Method names containing invalid characters now return error code 400 instead of 405. |
| 48 | +- Header names are now restricted to the set of characters permitted by the RFCs. |
| 49 | +- Control characters are no longer allowed in (incoming) header values. |
| 50 | +- Handling of trailing whitespace in headers has been improved, especially with ``obs-fold`` |
| 51 | + continuation lines. |
| 52 | +- The ``Host`` header is now restricted to the set of characters permitted by the RFCs. It is now an |
| 53 | + error to send more than one ``Host`` header, or to omit a ``Host`` header for a request that is |
| 54 | + not using HTTP/1.0. |
| 55 | + |
| 56 | +``tornado.netutil`` |
| 57 | +~~~~~~~~~~~~~~~~~~~ |
| 58 | + |
| 59 | +- ``.bind_unix_socket`` now supports the Linux abstract namespace. |
| 60 | + |
| 61 | + |
| 62 | +``tornado.platform.twisted`` |
| 63 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 64 | + |
| 65 | +- ``TwistedResolver`` has been deleted. It was already deprecated and scheduled for removal |
| 66 | + in Tornado 7.0, but due to the adoption of RFC 8482 it no longer works for most |
| 67 | + domain names. This class was primarily intended to provide thread-free non-blocking |
| 68 | + DNS resolution. If that is still required, ``tornado.platform.caresresolver`` is the |
| 69 | + next best option, although it has its own limitations which differ from TwistedResolver, |
| 70 | + and it is also deprecated. Most users should switch to the default resolver, which uses |
| 71 | + threads. |
| 72 | + |
| 73 | +``tornado.web`` |
| 74 | +~~~~~~~~~~~~~~~ |
| 75 | + |
| 76 | +- The set of characters allowed in (outgoing) HTTP headers now matches the RFCs. Specifically, tab |
| 77 | + characters are now allowed and DEL is not. |
| 78 | +- Invalid ``If-Modified-Since`` headers are now ignored instead of causing a 500 error. |
| 79 | +- ``%`` characters in the log message of ``tornado.web.HTTPError`` are no longer doubled when no |
| 80 | + additional arguments are passed. This matches the behavior of `logging.LogRecord`. A new method |
| 81 | + ``get_message`` has been added to ``HTTPError`` to allow access to the fully-substituted message; |
| 82 | + directly accessing ``log_message`` and ``args`` is deprecated. |
| 83 | + |
| 84 | +``tornado.websocket`` |
| 85 | +~~~~~~~~~~~~~~~~~~~~~ |
| 86 | + |
| 87 | +- Some bugs involving ``ping_interval`` and ``ping_timeout`` have been fixed. Setting the |
| 88 | + ``ping_timeout`` greater than the ``ping_interval`` is no longer supported. The default |
| 89 | + ``ping_timeout`` is now equal to the ``ping_interval``. |
| 90 | +- The ``callback`` argument to ``websocket_connect`` is deprecated and will be removed in |
| 91 | + Tornado 7.0. Note that ``on_message_callback`` is not deprecated. |
0 commit comments