summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-05-20 05:48:12 (GMT)
committerGitHub <noreply@github.com>2018-05-20 05:48:12 (GMT)
commitf5e7b1999f46e592d42dfab51563ea5411946fb7 (patch)
tree3001498a55273fc45ac4d2c7b393190d4d2dbd42 /Doc
parent8ae8e6af37f29163ee263e293570cb892dc5b5d5 (diff)
downloadcpython-f5e7b1999f46e592d42dfab51563ea5411946fb7.zip
cpython-f5e7b1999f46e592d42dfab51563ea5411946fb7.tar.gz
cpython-f5e7b1999f46e592d42dfab51563ea5411946fb7.tar.bz2
bpo-23722: Raise a RuntimeError for absent __classcell__. (GH-6931)
A DeprecationWarning was emitted in Python 3.6-3.7.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/reference/datamodel.rst3
-rw-r--r--Doc/whatsnew/3.8.rst5
2 files changed, 6 insertions, 2 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index cc8dc95..855f241 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -1967,8 +1967,7 @@ current call is identified based on the first argument passed to the method.
as a ``__classcell__`` entry in the class namespace. If present, this must
be propagated up to the ``type.__new__`` call in order for the class to be
initialised correctly.
- Failing to do so will result in a :exc:`DeprecationWarning` in Python 3.6,
- and a :exc:`RuntimeError` in Python 3.8.
+ Failing to do so will result in a :exc:`RuntimeError` in Python 3.8.
When using the default metaclass :class:`type`, or any metaclass that ultimately
calls ``type.__new__``, the following additional customisation steps are
diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst
index 11538e2..9aad908 100644
--- a/Doc/whatsnew/3.8.rst
+++ b/Doc/whatsnew/3.8.rst
@@ -146,6 +146,11 @@ Changes in the Python API
a database if it does not exist.
(Contributed by Serhiy Storchaka in :issue:`32749`.)
+* A :exc:`RuntimeError` is now raised when the custom metaclass doesn't
+ provide the ``__classcell__`` entry in the namespace passed to
+ ``type.__new__``. A :exc:`DeprecationWarning` was emitted in Python
+ 3.6--3.7. (Contributed by Serhiy Storchaka in :issue:`23722`.)
+
CPython bytecode changes
------------------------