Skip to content

Commit 10a122c

Browse files
bpo-23722: Fix docs for future __classcell__ changes. (GH-6999)
(cherry picked from commit 8ae8e6a) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
1 parent 09a5c07 commit 10a122c

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

Doc/reference/datamodel.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1887,7 +1887,7 @@ current call is identified based on the first argument passed to the method.
18871887
be propagated up to the ``type.__new__`` call in order for the class to be
18881888
initialised correctly.
18891889
Failing to do so will result in a :exc:`DeprecationWarning` in Python 3.6,
1890-
and a :exc:`RuntimeWarning` in the future.
1890+
and a :exc:`RuntimeError` in Python 3.8.
18911891

18921892
When using the default metaclass :class:`type`, or any metaclass that ultimately
18931893
calls ``type.__new__``, the following additional customisation steps are

Doc/whatsnew/3.6.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2270,7 +2270,8 @@ Changes in the Python API
22702270
direct references from methods to the implicit ``__class__`` closure
22712271
variable, the implicit ``__classcell__`` namespace entry must now be passed
22722272
up to ``type.__new__`` for initialisation. Failing to do so will result in
2273-
a :exc:`DeprecationWarning` in 3.6 and a :exc:`RuntimeWarning` in the future.
2273+
a :exc:`DeprecationWarning` in Python 3.6 and a :exc:`RuntimeError` in
2274+
Python 3.8.
22742275

22752276
Changes in the C API
22762277
--------------------

0 commit comments

Comments
 (0)