-
-
Notifications
You must be signed in to change notification settings - Fork 35k
bpo-36984: Improve version added references in typing module docs
#13457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ilevkivskyi
merged 1 commit into
python:master
from
asottile:typing_new_in_docs_bpo-36984
Jun 2, 2019
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -555,7 +555,7 @@ The module defines the following classes, functions and decorators: | |
|
|
||
| A generic version of :class:`collections.abc.Collection` | ||
|
|
||
| .. versionadded:: 3.6 | ||
| .. versionadded:: 3.6.0 | ||
|
|
||
| .. class:: AbstractSet(Sized, Collection[T_co]) | ||
|
|
||
|
|
@@ -599,6 +599,7 @@ The module defines the following classes, functions and decorators: | |
|
|
||
| A generic version of :class:`collections.deque`. | ||
|
|
||
| .. versionadded:: 3.5.4 | ||
| .. versionadded:: 3.6.1 | ||
|
|
||
| .. class:: List(list, MutableSequence[T]) | ||
|
|
@@ -648,6 +649,8 @@ The module defines the following classes, functions and decorators: | |
|
|
||
| A generic version of :class:`collections.abc.Awaitable`. | ||
|
|
||
| .. versionadded:: 3.5.2 | ||
|
|
||
| .. class:: Coroutine(Awaitable[V_co], Generic[T_co T_contra, V_co]) | ||
|
|
||
| A generic version of :class:`collections.abc.Coroutine`. | ||
|
|
@@ -661,25 +664,33 @@ The module defines the following classes, functions and decorators: | |
| async def bar() -> None: | ||
| x = await c # type: int | ||
|
|
||
| .. versionadded:: 3.5.3 | ||
|
|
||
| .. class:: AsyncIterable(Generic[T_co]) | ||
|
|
||
| A generic version of :class:`collections.abc.AsyncIterable`. | ||
|
|
||
| .. versionadded:: 3.5.2 | ||
|
|
||
| .. class:: AsyncIterator(AsyncIterable[T_co]) | ||
|
|
||
| A generic version of :class:`collections.abc.AsyncIterator`. | ||
|
|
||
| .. versionadded:: 3.5.2 | ||
|
|
||
| .. class:: ContextManager(Generic[T_co]) | ||
|
|
||
| A generic version of :class:`contextlib.AbstractContextManager`. | ||
|
|
||
| .. versionadded:: 3.6 | ||
| .. versionadded:: 3.5.4 | ||
| .. versionadded:: 3.6.0 | ||
|
|
||
| .. class:: AsyncContextManager(Generic[T_co]) | ||
|
|
||
| A generic version of :class:`contextlib.AbstractAsyncContextManager`. | ||
|
|
||
| .. versionadded:: 3.6 | ||
| .. versionadded:: 3.5.4 | ||
| .. versionadded:: 3.6.2 | ||
|
|
||
| .. class:: Dict(dict, MutableMapping[KT, VT]) | ||
|
|
||
|
|
@@ -708,12 +719,14 @@ The module defines the following classes, functions and decorators: | |
|
|
||
| A generic version of :class:`collections.Counter`. | ||
|
|
||
| .. versionadded:: 3.5.4 | ||
| .. versionadded:: 3.6.1 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same on all of these; that feel super weird; |
||
|
|
||
| .. class:: ChainMap(collections.ChainMap, MutableMapping[KT, VT]) | ||
|
|
||
| A generic version of :class:`collections.ChainMap`. | ||
|
|
||
| .. versionadded:: 3.5.4 | ||
| .. versionadded:: 3.6.1 | ||
|
|
||
| .. class:: Generator(Iterator[T_co], Generic[T_co, T_contra, V_co]) | ||
|
|
@@ -778,7 +791,7 @@ The module defines the following classes, functions and decorators: | |
| yield start | ||
| start = await increment(start) | ||
|
|
||
| .. versionadded:: 3.5.4 | ||
| .. versionadded:: 3.6.1 | ||
|
|
||
| .. class:: Text | ||
|
|
||
|
|
@@ -987,6 +1000,7 @@ The module defines the following classes, functions and decorators: | |
| raise RuntimeError('no way') | ||
|
|
||
| .. versionadded:: 3.5.4 | ||
| .. versionadded:: 3.6.2 | ||
|
|
||
| .. data:: Union | ||
|
|
||
|
|
||
1 change: 1 addition & 0 deletions
1
Misc/NEWS.d/next/Documentation/2019-05-20-22-21-17.bpo-36984.IjZlmS.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Improve version added references in ``typing`` module - by Anthony Sottile. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there 2 "versionadded" here ? was this added both ein 3.5.4 and 3.6.1 ? Meaning it's not in 3.6.0 ?
If that's the case that might look like a typo in the docs from a casual reader, and might need a clarification paragraph.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's correct! it is pretty weird!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the story with versions is related to the fact that
typingmodule used to be provisional, so features were added at random time, even between minor releases.