summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2020-04-04 21:43:20 (GMT)
committerGitHub <noreply@github.com>2020-04-04 21:43:20 (GMT)
commit6fed3c85402c5ca704eb3f3189ca3f5c67a08d19 (patch)
tree756d989deaee347ca211d42abf124d1817ef8ff3 /Doc
parent1b21573a89632356737a24302dd64c9eb1457a7b (diff)
downloadcpython-6fed3c85402c5ca704eb3f3189ca3f5c67a08d19.zip
cpython-6fed3c85402c5ca704eb3f3189ca3f5c67a08d19.tar.gz
cpython-6fed3c85402c5ca704eb3f3189ca3f5c67a08d19.tar.bz2
bpo-40182: Remove the _field_types attribute of the NamedTuple class (GH-19368)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/typing.rst9
-rw-r--r--Doc/whatsnew/3.9.rst5
2 files changed, 10 insertions, 4 deletions
diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst
index 58ae184..fa13c07 100644
--- a/Doc/library/typing.rst
+++ b/Doc/library/typing.rst
@@ -960,13 +960,14 @@ The module defines the following classes, functions and decorators:
Added support for default values, methods, and docstrings.
.. versionchanged:: 3.8
- Deprecated the ``_field_types`` attribute in favor of the more
- standard ``__annotations__`` attribute which has the same information.
-
- .. versionchanged:: 3.8
The ``_field_types`` and ``__annotations__`` attributes are
now regular dictionaries instead of instances of ``OrderedDict``.
+ .. versionchanged:: 3.9
+ Removed the ``_field_types`` attribute in favor of the more
+ standard ``__annotations__`` attribute which has the same information.
+
+
.. class:: TypedDict(dict)
A simple typed namespace. At runtime it is equivalent to
diff --git a/Doc/whatsnew/3.9.rst b/Doc/whatsnew/3.9.rst
index fc48cd6..ef499f5 100644
--- a/Doc/whatsnew/3.9.rst
+++ b/Doc/whatsnew/3.9.rst
@@ -734,6 +734,11 @@ Removed
defining ``COUNT_ALLOCS`` macro.
(Contributed by Victor Stinner in :issue:`39489`.)
+* The ``_field_types`` attribute of the :class:`typing.NamedTuple` class
+ has been removed. It was deprecated deprecated since Python 3.8. Use
+ the ``__annotations__`` attribute instead.
+ (Contributed by Serhiy Storchaka in :issue:`40182`.)
+
Porting to Python 3.9
=====================