diff options
author | Raymond Hettinger <rhettinger@users.noreply.github.com> | 2022-05-06 07:57:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-06 07:57:53 (GMT) |
commit | ebaf0945f9f630f32755137a54abd0a49f068e9a (patch) | |
tree | ec1da2c8721f17b58d1f161b911ea9223275dec7 /Doc/howto | |
parent | bebb944de56883e886891b9786351ad36240d989 (diff) | |
download | cpython-ebaf0945f9f630f32755137a54abd0a49f068e9a.zip cpython-ebaf0945f9f630f32755137a54abd0a49f068e9a.tar.gz cpython-ebaf0945f9f630f32755137a54abd0a49f068e9a.tar.bz2 |
GH-89519: Deprecate classmethod descriptor chaining (#92379)
Diffstat (limited to 'Doc/howto')
-rw-r--r-- | Doc/howto/descriptor.rst | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Doc/howto/descriptor.rst b/Doc/howto/descriptor.rst index 825e9d0..5e9b110 100644 --- a/Doc/howto/descriptor.rst +++ b/Doc/howto/descriptor.rst @@ -1349,6 +1349,8 @@ Using the non-data descriptor protocol, a pure Python version of if cls is None: cls = type(obj) if hasattr(type(self.f), '__get__'): + # This code path was added in Python 3.9 + # and was deprecated in Python 3.11. return self.f.__get__(cls, cls) return MethodType(self.f, cls) @@ -1386,7 +1388,7 @@ Using the non-data descriptor protocol, a pure Python version of The code path for ``hasattr(type(self.f), '__get__')`` was added in Python 3.9 and makes it possible for :func:`classmethod` to support chained decorators. For example, a classmethod and property could be -chained together: +chained together. In Python 3.11, this functionality was deprecated. .. testcode:: |