These classes implement the OpenID and OAuth standards. They will
generally need to be subclassed to use them with any particular site.
The degree of customization required will vary, but in most cases
- overridding the class attributes (which are named beginning with
+ overriding the class attributes (which are named beginning with
underscores for historical reasons) should be sufficient.
.. autoclass:: OpenIdMixin
* New function `tornado.options.add_parse_callback` schedules a callback
to be run after the command line or config file has been parsed. The
keyword argument ``final=False`` can be used on either parsing function
- to supress these callbacks.
+ to suppress these callbacks.
* `tornado.options.define` now takes a ``callback`` argument. This callback
will be run with the new value whenever the option is changed. This is
especially useful for options that set other options, such as by reading
ssl_ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
ssl_ctx.load_cert_chain(os.path.join(data_dir, "mydomain.crt"),
os.path.join(data_dir, "mydomain.key"))
- HTTPServer(applicaton, ssl_options=ssl_ctx)
+ HTTPServer(application, ssl_options=ssl_ctx)
`HTTPServer` initialization follows one of three patterns (the
initialization methods are defined on `tornado.tcpserver.TCPServer`):
# bytestrings. This is a bit of a hacky place to do this, but
# it's worth it since the encoding errors that would otherwise
# result are so useless (and tornado is fond of using utf8-encoded
- # byte strings whereever possible).
+ # byte strings wherever possible).
record.message = _safe_unicode(message)
except Exception as e:
record.message = "Bad message (%r): %r" % (e, record.__dict__)
self.server.stop()
# Delay the shutdown of the IOLoop by one iteration because
# the server may still have some cleanup work left when
- # the client finishes with the response (this is noticable
+ # the client finishes with the response (this is noticeable
# with http/2, which leaves a Future with an unexamined
# StreamClosedError on the loop).
self.server_ioloop.add_callback(self.server_ioloop.stop)
def test_spawn_callback(self):
# An added callback runs in the test's stack_context, so will be
- # re-arised in wait().
+ # re-raised in wait().
self.io_loop.add_callback(lambda: 1 / 0)
with self.assertRaises(ZeroDivisionError):
self.wait()