Skip to content

Commit 0cd2e81

Browse files
ilevkivskyiMariatta
authored andcommitted
bpo-29879: Update typing documentation. (GH-4573)
- Add "version added: 3.5.2" note where it was missing. - Remove the mention that Reversible is new in 3.5.2
1 parent d8d6b91 commit 0cd2e81

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

Doc/library/typing.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ See :pep:`484` for more details.
146146
``Derived`` is expected. This is useful when you want to prevent logic
147147
errors with minimal runtime cost.
148148

149+
.. versionadded:: 3.5.2
150+
149151
Callable
150152
--------
151153

@@ -494,6 +496,8 @@ The module defines the following classes, functions and decorators:
494496
``Type[Any]`` is equivalent to ``Type`` which in turn is equivalent
495497
to ``type``, which is the root of Python's metaclass hierarchy.
496498

499+
.. versionadded:: 3.5.2
500+
497501
.. class:: Iterable(Generic[T_co])
498502

499503
A generic version of :class:`collections.abc.Iterable`.
@@ -674,6 +678,8 @@ The module defines the following classes, functions and decorators:
674678

675679
A generic version of :class:`collections.defaultdict`.
676680

681+
.. versionadded:: 3.5.2
682+
677683
.. class:: Counter(collections.Counter, Dict[T, int])
678684

679685
A generic version of :class:`collections.Counter`.
@@ -762,6 +768,8 @@ The module defines the following classes, functions and decorators:
762768
def add_unicode_checkmark(text: Text) -> Text:
763769
return text + u' \u2713'
764770

771+
.. versionadded:: 3.5.2
772+
765773
.. class:: io
766774

767775
Wrapper namespace for I/O stream types.
@@ -847,6 +855,8 @@ The module defines the following classes, functions and decorators:
847855
UserId = NewType('UserId', int)
848856
first_user = UserId(1)
849857

858+
.. versionadded:: 3.5.2
859+
850860
.. function:: cast(typ, val)
851861

852862
Cast a value to a type.
@@ -1054,3 +1064,5 @@ The module defines the following classes, functions and decorators:
10541064
"forward reference", to hide the ``expensive_mod`` reference from the
10551065
interpreter runtime. Type annotations for local variables are not
10561066
evaluated, so the second annotation does not need to be enclosed in quotes.
1067+
1068+
.. versionadded:: 3.5.2

Misc/NEWS.d/3.5.2rc1.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ patch by ingrid.
420420
.. section: Library
421421
422422
A new version of typing.py provides several new classes and features:
423-
@overload outside stubs, Reversible, DefaultDict, Text, ContextManager,
423+
@overload outside stubs, DefaultDict, Text, ContextManager,
424424
Type[], NewType(), TYPE_CHECKING, and numerous bug fixes (note that some of
425425
the new features are not yet implemented in mypy or other static analyzers).
426426
Also classes for PEP 492 (Awaitable, AsyncIterable, AsyncIterator) have been

0 commit comments

Comments
 (0)