Refs #23919 -- Stopped inheriting from object to define new style classes.

This commit is contained in:
Simon Charette 2017-01-19 02:39:46 -05:00 committed by Claude Paroz
parent a556396339
commit cecc079168
293 changed files with 512 additions and 514 deletions

View file

@ -169,7 +169,7 @@ def make_middleware_decorator(middleware_class):
if ContextDecorator is None:
# ContextDecorator was introduced in Python 3.2
# See https://docs.python.org/3/library/contextlib.html#contextlib.ContextDecorator
class ContextDecorator(object):
class ContextDecorator:
"""
A base class that enables a context manager to also be used as a decorator.
"""
@ -181,7 +181,7 @@ if ContextDecorator is None:
return inner
class classproperty(object):
class classproperty:
def __init__(self, method=None):
self.fget = method