this change, code changes may be required for compatibility with
Tornado 5.0, as detailed in the following section.
- Support for Python 2.7 and 3.4 are deprecated; Tornado 6.0 will
- require Python 3.5+. TODO(bdarnell): decide whether to drop py2 in 5.0
+ require Python 3.5+.
Backwards-compatibility notes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
`.ExecutorResolver`, and `.ThreadedResolver` have been removed.
- `.add_accept_handler` returns a callable which can be used to remove
all handlers that were added.
+- `.OverrideResolver` now accepts per-family overrides.
`tornado.options`
~~~~~~~~~~~~~~~~~
This can be used to make local DNS changes (e.g. for testing)
without modifying system-wide settings.
- The mapping can contain either host strings or host-port pairs or
- host-port-family triplets.
+ The mapping can be in three formats::
+
+ {
+ # Hostname to host or ip
+ "example.com": "127.0.1.1",
+
+ # Host+port to host+port
+ ("login.example.com", 443): ("localhost", 1443),
+
+ # Host+port+address family to host+port
+ ("login.example.com", 443, socket.AF_INET6): ("::1", 1443),
+ }
+
+ .. versionchanged:: 5.0
+ Added support for host-port-family triplets.
"""
def initialize(self, resolver, mapping):
self.resolver = resolver