From: Ben Darnell Date: Thu, 13 Jun 2024 17:51:48 +0000 (-0400) Subject: *: Remove redundant (object) base classes X-Git-Tag: v6.5.0b1~47^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04ebadd87ded3588c868dcfeb0cc8aeb19e039c7;p=thirdparty%2Ftornado.git *: Remove redundant (object) base classes This was only necessary in python 3. This change was made with a version of pyupgrade that was modified to perform only this change. --- diff --git a/demos/chat/chatdemo.py b/demos/chat/chatdemo.py index 28c12108f..8cc6f65aa 100755 --- a/demos/chat/chatdemo.py +++ b/demos/chat/chatdemo.py @@ -25,7 +25,7 @@ define("port", default=8888, help="run on the given port", type=int) define("debug", default=True, help="run in debug mode") -class MessageBuffer(object): +class MessageBuffer: def __init__(self): # cond is notified whenever the message cache is updated self.cond = tornado.locks.Condition() diff --git a/tornado/auth.py b/tornado/auth.py index 2f115f576..0a98beb27 100644 --- a/tornado/auth.py +++ b/tornado/auth.py @@ -91,7 +91,7 @@ class AuthError(Exception): pass -class OpenIdMixin(object): +class OpenIdMixin: """Abstract implementation of OpenID and Attribute Exchange. Class attributes: @@ -284,7 +284,7 @@ class OpenIdMixin(object): return httpclient.AsyncHTTPClient() -class OAuthMixin(object): +class OAuthMixin: """Abstract implementation of OAuth 1.0 and 1.0a. See `TwitterMixin` below for an example implementation. @@ -552,7 +552,7 @@ class OAuthMixin(object): return httpclient.AsyncHTTPClient() -class OAuth2Mixin(object): +class OAuth2Mixin: """Abstract implementation of OAuth 2.0. See `FacebookGraphMixin` or `GoogleOAuth2Mixin` below for example diff --git a/tornado/gen.py b/tornado/gen.py index 7d8747748..1eb5e7984 100644 --- a/tornado/gen.py +++ b/tornado/gen.py @@ -300,7 +300,7 @@ class Return(Exception): self.args = (value,) -class WaitIterator(object): +class WaitIterator: """Provides an iterator to yield the results of awaitables as they finish. Yielding a set of awaitables like this: @@ -668,7 +668,7 @@ def sleep(duration: float) -> "Future[None]": return f -class _NullFuture(object): +class _NullFuture: """_NullFuture resembles a Future that finished with a result of None. It's not actually a `Future` to avoid depending on a particular event loop. @@ -713,7 +713,7 @@ In native coroutines, the equivalent of ``yield gen.moment`` is """ -class Runner(object): +class Runner: """Internal implementation of `tornado.gen.coroutine`. Maintains information about pending callbacks and their results. diff --git a/tornado/http1connection.py b/tornado/http1connection.py index 1a23f5c7f..53cfca968 100644 --- a/tornado/http1connection.py +++ b/tornado/http1connection.py @@ -46,7 +46,7 @@ class _QuietException(Exception): pass -class _ExceptionLoggingContext(object): +class _ExceptionLoggingContext: """Used with the ``with`` statement when calling delegate methods to log any exceptions with the given logger. Any exceptions caught are converted to _QuietException @@ -70,7 +70,7 @@ class _ExceptionLoggingContext(object): raise _QuietException -class HTTP1ConnectionParameters(object): +class HTTP1ConnectionParameters: """Parameters for `.HTTP1Connection` and `.HTTP1ServerConnection`.""" def __init__( @@ -761,7 +761,7 @@ class _GzipMessageDelegate(httputil.HTTPMessageDelegate): return self._delegate.on_connection_close() -class HTTP1ServerConnection(object): +class HTTP1ServerConnection: """An HTTP/1.x server.""" def __init__( diff --git a/tornado/httpclient.py b/tornado/httpclient.py index 3011c371b..b26ed449e 100644 --- a/tornado/httpclient.py +++ b/tornado/httpclient.py @@ -56,7 +56,7 @@ from tornado.util import Configurable from typing import Type, Any, Union, Dict, Callable, Optional, cast -class HTTPClient(object): +class HTTPClient: """A blocking HTTP client. This interface is provided to make it easier to share code between @@ -336,7 +336,7 @@ class AsyncHTTPClient(Configurable): super(AsyncHTTPClient, cls).configure(impl, **kwargs) -class HTTPRequest(object): +class HTTPRequest: """HTTP client request object.""" _headers = None # type: Union[Dict[str, str], httputil.HTTPHeaders] @@ -571,7 +571,7 @@ class HTTPRequest(object): self._body = utf8(value) -class HTTPResponse(object): +class HTTPResponse: """HTTP Response object. Attributes: @@ -732,7 +732,7 @@ class HTTPClientError(Exception): HTTPError = HTTPClientError -class _RequestProxy(object): +class _RequestProxy: """Combines an object with a dictionary of defaults. Used internally by AsyncHTTPClient implementations. diff --git a/tornado/httpserver.py b/tornado/httpserver.py index 757f711b2..58c74e472 100644 --- a/tornado/httpserver.py +++ b/tornado/httpserver.py @@ -295,7 +295,7 @@ class _CallableAdapter(httputil.HTTPMessageDelegate): del self._chunks -class _HTTPRequestContext(object): +class _HTTPRequestContext: def __init__( self, stream: iostream.IOStream, diff --git a/tornado/httputil.py b/tornado/httputil.py index e2e51dfa1..ecd53742c 100644 --- a/tornado/httputil.py +++ b/tornado/httputil.py @@ -253,7 +253,7 @@ class HTTPHeaders(StrMutableMapping): __unicode__ = __str__ -class HTTPServerRequest(object): +class HTTPServerRequest: """A single HTTP request. All attributes are type `str` unless otherwise noted. @@ -494,7 +494,7 @@ class HTTPOutputError(Exception): pass -class HTTPServerConnectionDelegate(object): +class HTTPServerConnectionDelegate: """Implement this interface to handle requests from `.HTTPServer`. .. versionadded:: 4.0 @@ -523,7 +523,7 @@ class HTTPServerConnectionDelegate(object): pass -class HTTPMessageDelegate(object): +class HTTPMessageDelegate: """Implement this interface to handle an HTTP request or response. .. versionadded:: 4.0 @@ -569,7 +569,7 @@ class HTTPMessageDelegate(object): pass -class HTTPConnection(object): +class HTTPConnection: """Applications use this interface to write their responses. .. versionadded:: 4.0 diff --git a/tornado/ioloop.py b/tornado/ioloop.py index 5a880b0cd..612aac3e8 100644 --- a/tornado/ioloop.py +++ b/tornado/ioloop.py @@ -819,7 +819,7 @@ class IOLoop(Configurable): self._pending_tasks.discard(f) -class _Timeout(object): +class _Timeout: """An IOLoop timeout, a UNIX timestamp and a callback""" # Reduce memory overhead when there are lots of pending callbacks @@ -848,7 +848,7 @@ class _Timeout(object): return self.tdeadline <= other.tdeadline -class PeriodicCallback(object): +class PeriodicCallback: """Schedules the given callback to be called periodically. The callback is called every ``callback_time`` milliseconds when diff --git a/tornado/iostream.py b/tornado/iostream.py index e3956c4d1..a8955148f 100644 --- a/tornado/iostream.py +++ b/tornado/iostream.py @@ -114,7 +114,7 @@ class StreamBufferFullError(Exception): """Exception raised by `IOStream` methods when the buffer is full.""" -class _StreamBuffer(object): +class _StreamBuffer: """ A specialized buffer that tries to avoid copies when large pieces of data are encountered. @@ -204,7 +204,7 @@ class _StreamBuffer(object): self._first_pos = pos -class BaseIOStream(object): +class BaseIOStream: """A utility class to write to and read from a non-blocking file or socket. We support a non-blocking ``write()`` and a family of ``read_*()`` diff --git a/tornado/locale.py b/tornado/locale.py index c5526703b..3fb1a6861 100644 --- a/tornado/locale.py +++ b/tornado/locale.py @@ -221,7 +221,7 @@ def get_supported_locales() -> Iterable[str]: return _supported_locales -class Locale(object): +class Locale: """Object representing a locale. After calling one of `load_translations` or `load_gettext_translations`, diff --git a/tornado/locks.py b/tornado/locks.py index 1bcec1b3a..6d794687d 100644 --- a/tornado/locks.py +++ b/tornado/locks.py @@ -28,7 +28,7 @@ if typing.TYPE_CHECKING: __all__ = ["Condition", "Event", "Semaphore", "BoundedSemaphore", "Lock"] -class _TimeoutGarbageCollector(object): +class _TimeoutGarbageCollector: """Base class for objects that periodically clean up timed-out waiters. Avoids memory leak in a common pattern like: @@ -155,7 +155,7 @@ class Condition(_TimeoutGarbageCollector): self.notify(len(self._waiters)) -class Event(object): +class Event: """An event blocks coroutines until its internal flag is set to True. Similar to `threading.Event`. @@ -255,7 +255,7 @@ class Event(object): return timeout_fut -class _ReleasingContextManager(object): +class _ReleasingContextManager: """Releases a Lock or Semaphore at the end of a "with" statement. with (yield semaphore.acquire()): @@ -484,7 +484,7 @@ class BoundedSemaphore(Semaphore): super().release() -class Lock(object): +class Lock: """A lock for coroutines. A Lock begins unlocked, and `acquire` locks it immediately. While it is diff --git a/tornado/options.py b/tornado/options.py index cb66b7711..46c740b58 100644 --- a/tornado/options.py +++ b/tornado/options.py @@ -130,7 +130,7 @@ class Error(Exception): pass -class OptionParser(object): +class OptionParser: """A collection of options, a dictionary with object-like access. Normally accessed via static functions in the `tornado.options` module, @@ -498,7 +498,7 @@ class OptionParser(object): return _Mockable(self) -class _Mockable(object): +class _Mockable: """`mock.patch` compatible wrapper for `OptionParser`. As of ``mock`` version 1.0.1, when an object uses ``__getattr__`` @@ -528,7 +528,7 @@ class _Mockable(object): setattr(self._options, name, self._originals.pop(name)) -class _Option(object): +class _Option: # This class could almost be made generic, but the way the types # interact with the multiple argument makes this tricky. (default # and the callback use List[T], but type is still Type[T]). diff --git a/tornado/process.py b/tornado/process.py index 12e3eb648..339ef659b 100644 --- a/tornado/process.py +++ b/tornado/process.py @@ -185,7 +185,7 @@ def task_id() -> Optional[int]: return _task_id -class Subprocess(object): +class Subprocess: """Wraps ``subprocess.Popen`` with IOStream support. The constructor is the same as ``subprocess.Popen`` with the following diff --git a/tornado/routing.py b/tornado/routing.py index a145d7191..607e9f1d7 100644 --- a/tornado/routing.py +++ b/tornado/routing.py @@ -438,7 +438,7 @@ class ReversibleRuleRouter(ReversibleRouter, RuleRouter): return None -class Rule(object): +class Rule: """A routing rule.""" def __init__( @@ -487,7 +487,7 @@ class Rule(object): ) -class Matcher(object): +class Matcher: """Represents a matcher for request features.""" def match(self, request: httputil.HTTPServerRequest) -> Optional[Dict[str, Any]]: diff --git a/tornado/tcpclient.py b/tornado/tcpclient.py index 0a829062e..0971ac084 100644 --- a/tornado/tcpclient.py +++ b/tornado/tcpclient.py @@ -38,7 +38,7 @@ if typing.TYPE_CHECKING: _INITIAL_CONNECT_TIMEOUT = 0.3 -class _Connector(object): +class _Connector: """A stateless implementation of the "Happy Eyeballs" algorithm. "Happy Eyeballs" is documented in RFC6555 as the recommended practice @@ -199,7 +199,7 @@ class _Connector(object): stream.close() -class TCPClient(object): +class TCPClient: """A non-blocking TCP connection factory. .. versionchanged:: 5.0 diff --git a/tornado/tcpserver.py b/tornado/tcpserver.py index 02c0ca0cc..4b84af311 100644 --- a/tornado/tcpserver.py +++ b/tornado/tcpserver.py @@ -40,7 +40,7 @@ if typing.TYPE_CHECKING: from typing import Callable, List # noqa: F401 -class TCPServer(object): +class TCPServer: r"""A non-blocking, single-threaded TCP server. To use `TCPServer`, define a subclass which overrides the `handle_stream` diff --git a/tornado/template.py b/tornado/template.py index 2340cdbef..e8be9064f 100644 --- a/tornado/template.py +++ b/tornado/template.py @@ -249,7 +249,7 @@ def filter_whitespace(mode: str, text: str) -> str: raise Exception("invalid whitespace mode %s" % mode) -class Template(object): +class Template: """A compiled template. We compile into Python from the given template_string. You can generate @@ -389,7 +389,7 @@ class Template(object): return ancestors -class BaseLoader(object): +class BaseLoader: """Base class for template loaders. You must use a template loader to use template constructs like @@ -500,7 +500,7 @@ class DictLoader(BaseLoader): return Template(self.dict[name], name=name, loader=self) -class _Node(object): +class _Node: def each_child(self) -> Iterable["_Node"]: return () @@ -720,7 +720,7 @@ class ParseError(Exception): return "%s at %s:%d" % (self.message, self.filename, self.lineno) -class _CodeWriter(object): +class _CodeWriter: def __init__( self, file: TextIO, @@ -740,7 +740,7 @@ class _CodeWriter(object): return self._indent def indent(self) -> "ContextManager": - class Indenter(object): + class Indenter: def __enter__(_) -> "_CodeWriter": self._indent += 1 return self @@ -755,7 +755,7 @@ class _CodeWriter(object): self.include_stack.append((self.current_template, line)) self.current_template = template - class IncludeTemplate(object): + class IncludeTemplate: def __enter__(_) -> "_CodeWriter": return self @@ -778,7 +778,7 @@ class _CodeWriter(object): print(" " * indent + line + line_comment, file=self.file) -class _TemplateReader(object): +class _TemplateReader: def __init__(self, name: str, text: str, whitespace: str) -> None: self.name = name self.text = text diff --git a/tornado/test/circlerefs_test.py b/tornado/test/circlerefs_test.py index 5c25adffd..d5f7e9692 100644 --- a/tornado/test/circlerefs_test.py +++ b/tornado/test/circlerefs_test.py @@ -105,7 +105,7 @@ def assert_no_cycle_garbage(): class CircleRefsTest(unittest.TestCase): def test_known_leak(self): # Construct a known leak scenario to make sure the test harness works. - class C(object): + class C: def __init__(self, name): self.name = name self.a: typing.Optional[C] = None @@ -199,7 +199,7 @@ class CircleRefsTest(unittest.TestCase): with concurrent.futures.ThreadPoolExecutor(1) as thread_pool: - class Factory(object): + class Factory: executor = thread_pool @tornado.concurrent.run_on_executor diff --git a/tornado/test/concurrent_test.py b/tornado/test/concurrent_test.py index 009d6ed43..ea20ed36a 100644 --- a/tornado/test/concurrent_test.py +++ b/tornado/test/concurrent_test.py @@ -94,7 +94,7 @@ class CapError(Exception): pass -class BaseCapClient(object): +class BaseCapClient: def __init__(self, port): self.port = port @@ -124,7 +124,7 @@ class GeneratorCapClient(BaseCapClient): raise gen.Return(self.process_response(data)) -class ClientTestMixin(object): +class ClientTestMixin: client_class = None # type: typing.Callable def setUp(self): @@ -174,7 +174,7 @@ class GeneratorClientTest(ClientTestMixin, AsyncTestCase): class RunOnExecutorTest(AsyncTestCase): @gen_test def test_no_calling(self): - class Object(object): + class Object: def __init__(self): self.executor = futures.thread.ThreadPoolExecutor(1) @@ -188,7 +188,7 @@ class RunOnExecutorTest(AsyncTestCase): @gen_test def test_call_with_no_args(self): - class Object(object): + class Object: def __init__(self): self.executor = futures.thread.ThreadPoolExecutor(1) @@ -202,7 +202,7 @@ class RunOnExecutorTest(AsyncTestCase): @gen_test def test_call_with_executor(self): - class Object(object): + class Object: def __init__(self): self.__executor = futures.thread.ThreadPoolExecutor(1) @@ -216,7 +216,7 @@ class RunOnExecutorTest(AsyncTestCase): @gen_test def test_async_await(self): - class Object(object): + class Object: def __init__(self): self.executor = futures.thread.ThreadPoolExecutor(1) diff --git a/tornado/test/gen_test.py b/tornado/test/gen_test.py index b49563656..3190ef40f 100644 --- a/tornado/test/gen_test.py +++ b/tornado/test/gen_test.py @@ -581,7 +581,7 @@ class GenCoroutineTest(AsyncTestCase): # without waiting for garbage collection. @gen.coroutine def inner(): - class Foo(object): + class Foo: pass local_var = Foo() diff --git a/tornado/test/httpserver_test.py b/tornado/test/httpserver_test.py index 762c23f6e..07244634a 100644 --- a/tornado/test/httpserver_test.py +++ b/tornado/test/httpserver_test.py @@ -115,7 +115,7 @@ class BaseSSLTest(AsyncHTTPSTestCase): return Application([("/", HelloWorldRequestHandler, dict(protocol="https"))]) -class SSLTestMixin(object): +class SSLTestMixin: def get_ssl_options(self): return dict( ssl_version=self.get_ssl_version(), diff --git a/tornado/test/ioloop_test.py b/tornado/test/ioloop_test.py index 07a7cf0c3..212393928 100644 --- a/tornado/test/ioloop_test.py +++ b/tornado/test/ioloop_test.py @@ -265,7 +265,7 @@ class TestIOLoop(AsyncTestCase): # Use a socket since they are supported by IOLoop on all platforms. # Unfortunately, sockets don't support the .closed attribute for # inspecting their close status, so we must use a wrapper. - class SocketWrapper(object): + class SocketWrapper: def __init__(self, sockobj): self.sockobj = sockobj self.closed = False diff --git a/tornado/test/iostream_test.py b/tornado/test/iostream_test.py index 096dfa868..a7d415fbf 100644 --- a/tornado/test/iostream_test.py +++ b/tornado/test/iostream_test.py @@ -57,7 +57,7 @@ class HelloHandler(RequestHandler): self.write("Hello") -class TestIOStreamWebMixin(object): +class TestIOStreamWebMixin: def _make_client_iostream(self): raise NotImplementedError() @@ -177,7 +177,7 @@ class TestIOStreamWebMixin(object): stream.read_bytes(1) -class TestReadWriteMixin(object): +class TestReadWriteMixin: # Tests where one stream reads and the other writes. # These should work for BaseIOStream implementations. diff --git a/tornado/test/netutil_test.py b/tornado/test/netutil_test.py index 33a8b7dba..0f0bb2a91 100644 --- a/tornado/test/netutil_test.py +++ b/tornado/test/netutil_test.py @@ -30,7 +30,7 @@ else: from tornado.platform.caresresolver import CaresResolver -class _ResolverTestMixin(object): +class _ResolverTestMixin: resolver = None # type: typing.Any @gen_test @@ -48,7 +48,7 @@ class _ResolverTestMixin(object): # It is impossible to quickly and consistently generate an error in name # resolution, so test this case separately, using mocks as needed. -class _ResolverErrorTestMixin(object): +class _ResolverErrorTestMixin: resolver = None # type: typing.Any @gen_test diff --git a/tornado/test/options_test.py b/tornado/test/options_test.py index 6f4021c68..3ad1a9d9e 100644 --- a/tornado/test/options_test.py +++ b/tornado/test/options_test.py @@ -15,7 +15,7 @@ if typing.TYPE_CHECKING: from typing import List # noqa: F401 -class Email(object): +class Email: def __init__(self, value): if isinstance(value, str) and "@" in value: self._value = value diff --git a/tornado/test/simple_httpclient_test.py b/tornado/test/simple_httpclient_test.py index 50fdcb153..7ee524553 100644 --- a/tornado/test/simple_httpclient_test.py +++ b/tornado/test/simple_httpclient_test.py @@ -142,7 +142,7 @@ class RespondInPrepareHandler(RequestHandler): self.finish("forbidden") -class SimpleHTTPClientTestMixin(object): +class SimpleHTTPClientTestMixin: def create_client(self, **kwargs): raise NotImplementedError() diff --git a/tornado/test/tcpclient_test.py b/tornado/test/tcpclient_test.py index 7116d2777..2973d248d 100644 --- a/tornado/test/tcpclient_test.py +++ b/tornado/test/tcpclient_test.py @@ -197,7 +197,7 @@ class TestConnectorSplit(unittest.TestCase): class ConnectorTest(AsyncTestCase): - class FakeStream(object): + class FakeStream: def __init__(self): self.closed = False diff --git a/tornado/test/web_test.py b/tornado/test/web_test.py index 351a2a897..c65e60541 100644 --- a/tornado/test/web_test.py +++ b/tornado/test/web_test.py @@ -2422,7 +2422,7 @@ class BaseFlowControlHandler(RequestHandler): self.write(dict(methods=self.methods)) -class BaseStreamingRequestFlowControlTest(object): +class BaseStreamingRequestFlowControlTest: def get_httpserver_options(self): # Use a small chunk size so flow control is relevant even though # all the data arrives at once. diff --git a/tornado/test/websocket_test.py b/tornado/test/websocket_test.py index 8a3ac7125..e7228ee82 100644 --- a/tornado/test/websocket_test.py +++ b/tornado/test/websocket_test.py @@ -661,7 +661,7 @@ class WebSocketNativeCoroutineTest(WebSocketBaseTestCase): self.assertEqual(res, "hello2") -class CompressionTestMixin(object): +class CompressionTestMixin: MESSAGE = "Hello world. Testing 123 123" def get_app(self): @@ -766,7 +766,7 @@ class DefaultCompressionTest(CompressionTestMixin, WebSocketBaseTestCase): self.assertEqual(bytes_out, bytes_in + 12) -class MaskFunctionMixin(object): +class MaskFunctionMixin: # Subclasses should define self.mask(mask, data) def mask(self, mask: bytes, data: bytes) -> bytes: raise NotImplementedError() diff --git a/tornado/util.py b/tornado/util.py index 1fc2c69a5..bf907b336 100644 --- a/tornado/util.py +++ b/tornado/util.py @@ -65,7 +65,7 @@ class ObjectDict(Dict[str, Any]): self[name] = value -class GzipDecompressor(object): +class GzipDecompressor: """Streaming gzip decompressor. The interface is like that of `zlib.decompressobj` (without some of the @@ -201,7 +201,7 @@ def re_unescape(s: str) -> str: return _re_unescape_pattern.sub(_re_unescape_replacement, s) -class Configurable(object): +class Configurable: """Base class for configurable interfaces. A configurable interface is an (abstract) class whose constructor @@ -336,7 +336,7 @@ class Configurable(object): base.__impl_kwargs = saved[1] -class ArgReplacer(object): +class ArgReplacer: """Replaces one value in an ``args, kwargs`` pair. Inspects the function signature to find an argument by name diff --git a/tornado/web.py b/tornado/web.py index 30cef30bd..648bdc385 100644 --- a/tornado/web.py +++ b/tornado/web.py @@ -176,7 +176,7 @@ class _ArgDefaultMarker: _ARG_DEFAULT = _ArgDefaultMarker() -class RequestHandler(object): +class RequestHandler: """Base class for HTTP request handlers. Subclasses must define at least one of the methods defined in the @@ -3187,7 +3187,7 @@ class FallbackHandler(RequestHandler): self.on_finish() -class OutputTransform(object): +class OutputTransform: """A transform modifies the result of an HTTP request (e.g., GZip encoding) Applications are not expected to create their own OutputTransforms @@ -3339,7 +3339,7 @@ def authenticated( return wrapper -class UIModule(object): +class UIModule: """A re-usable, modular UI unit on a page. UI modules often execute additional queries, and they can include @@ -3487,7 +3487,7 @@ class TemplateModule(UIModule): return "".join(self._get_resources("html_body")) -class _UIModuleNamespace(object): +class _UIModuleNamespace: """Lazy namespace which creates UIModule proxies bound to a handler.""" def __init__( diff --git a/tornado/websocket.py b/tornado/websocket.py index ad5db5590..7694c41b2 100644 --- a/tornado/websocket.py +++ b/tornado/websocket.py @@ -115,7 +115,7 @@ class _DecompressTooLargeError(Exception): pass -class _WebSocketParams(object): +class _WebSocketParams: def __init__( self, ping_interval: Optional[float] = None, @@ -698,7 +698,7 @@ class WebSocketProtocol(abc.ABC): raise NotImplementedError() -class _PerMessageDeflateCompressor(object): +class _PerMessageDeflateCompressor: def __init__( self, persistent: bool, @@ -746,7 +746,7 @@ class _PerMessageDeflateCompressor(object): return data[:-4] -class _PerMessageDeflateDecompressor(object): +class _PerMessageDeflateDecompressor: def __init__( self, persistent: bool, diff --git a/tornado/wsgi.py b/tornado/wsgi.py index 32641be30..8a08d56e7 100644 --- a/tornado/wsgi.py +++ b/tornado/wsgi.py @@ -56,7 +56,7 @@ def to_wsgi_str(s: bytes) -> str: return s.decode("latin1") -class WSGIContainer(object): +class WSGIContainer: r"""Makes a WSGI-compatible application runnable on Tornado's HTTP server. .. warning::