mirror of
https://github.com/django/django.git
synced 2025-12-19 07:12:25 +00:00
Refs #23919 -- Stopped inheriting from object to define new style classes.
This commit is contained in:
parent
a556396339
commit
cecc079168
293 changed files with 512 additions and 514 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue