Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Minor improvements to typing docs#104465

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
AlexWaygood merged 2 commits intopython:mainfromJelleZijlstra:typingdocs
May 14, 2023

Conversation

JelleZijlstra
Copy link
Member

@JelleZijlstraJelleZijlstra commentedMay 14, 2023
edited by github-actionsbot
Loading

Will comment on the PR with specific motivations.


📚 Documentation preview 📚:https://cpython-previews--104465.org.readthedocs.build/

Will comment on the PR with specific motivations.
@@ -19,7 +19,7 @@

This module provides runtime support for type hints. The most fundamental
support consists of the types :data:`Any`, :data:`Union`, :data:`Callable`,
:class:`TypeVar`, and :class:`Generic`. For afullspecification, please see
:class:`TypeVar`, and :class:`Generic`. For a specification, please see
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Not a full specification any more, considering how much we've added since.

AlexWaygood reacted with thumbs up emoji
@@ -592,7 +592,7 @@ The module defines the following classes, functions and decorators.
when the checked program targets Python 3.9 or newer.

The deprecated types will be removed from the :mod:`typing` module
in the first Python version released 5 years after the release of Python 3.9.0.
no sooner than the first Python version released 5 years after the release of Python 3.9.0.
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This would be 3.13 I believe, and I don't think we're going to remove them in 3.13.

AlexWaygood reacted with thumbs up emoji
@@ -1550,7 +1552,7 @@ These are not used in annotations. They are building blocks for creating generic

.. data:: AnyStr

``AnyStr`` is a :class:`constrained type variable <TypeVar>` defined as
``AnyStr`` is a :ref:`constrained type variable <_typing-constrained-typevar>` defined as
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This link was incorrectly shown in monospace font. I took the opportunity to link to a more specific place.

@@ -2112,7 +2114,7 @@ Other concrete types
Python 2 is no longer supported, and most type checkers also no longer
support type checking Python 2 code. Removal of the alias is not
currently planned, but users are encouraged to use
:class:`str` instead of ``Text`` wherever possible.
:class:`str` instead of ``Text``.
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The only reason I can think of why it wouldn't be possible is that you're still supporting Python 2, and we don't need to care about that.

AlexWaygood reacted with thumbs up emoji
@AlexWaygoodAlexWaygood merged commit2f7b5e4 intopython:mainMay 14, 2023
@miss-islington
Copy link
Contributor

Thanks@JelleZijlstra for the PR, and@AlexWaygood for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-104475 is a backport of this pull request to the3.11 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.11only security fixes labelMay 14, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMay 14, 2023
(cherry picked from commit2f7b5e4)Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
AlexWaygood pushed a commit that referenced this pull requestMay 14, 2023
Minor improvements to typing docs (GH-104465)(cherry picked from commit2f7b5e4)Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
@JelleZijlstraJelleZijlstra deleted the typingdocs branchMay 14, 2023 12:13
carljm added a commit to carljm/cpython that referenced this pull requestMay 15, 2023
* main: (29 commits)pythongh-101819: Fix _io clinic input for unused base class method stubs (python#104418)pythongh-101819: Isolate `_io` (python#101948)  Bump mypy from 1.2.0 to 1.3.0 in /Tools/clinic (python#104501)pythongh-104494: Update certain Tkinter pack/place tests for Tk 8.7 errors (python#104495)pythongh-104050: Run mypy on `clinic.py` in CI (python#104421)pythongh-104490: Consistently define phony make targets (python#104491)pythongh-67056: document that registering/unregistering an atexit func from within an atexit func is undefined (python#104473)pythongh-104487: PYTHON_FOR_REGEN must be minimum Python 3.10 (python#104488)pythongh-101282: move BOLT config after PGO (pythongh-104493)pythongh-104469 Convert _testcapi/float.c to use AC (pythongh-104470)pythongh-104456: Fix ref leak in _ctypes.COMError (python#104457)pythongh-98539: Make _SSLTransportProtocol.abort() safe to call when closed (python#104474)pythongh-104337: Clarify random.gammavariate doc entry  (python#104410)  Minor improvements to typing docs (python#104465)pythongh-87092: avoid gcc warning on uninitialized struct field in assemble.c (python#104460)pythonGH-71383: IDLE - Document testing subsets of modules (python#104463)pythongh-104454: Fix refleak in AttributeError_reduce (python#104455)pythongh-75710: IDLE - add docstrings and comments to editor module (python#104446)pythongh-91896: Revert some very noisy DeprecationWarnings for `ByteString` (python#104424)  Add a mention of PYTHONBREAKPOINT to breakpoint() docs (python#104430)  ...
carljm added a commit to carljm/cpython that referenced this pull requestMay 15, 2023
* main: (204 commits)pythongh-101819: Fix _io clinic input for unused base class method stubs (python#104418)pythongh-101819: Isolate `_io` (python#101948)  Bump mypy from 1.2.0 to 1.3.0 in /Tools/clinic (python#104501)pythongh-104494: Update certain Tkinter pack/place tests for Tk 8.7 errors (python#104495)pythongh-104050: Run mypy on `clinic.py` in CI (python#104421)pythongh-104490: Consistently define phony make targets (python#104491)pythongh-67056: document that registering/unregistering an atexit func from within an atexit func is undefined (python#104473)pythongh-104487: PYTHON_FOR_REGEN must be minimum Python 3.10 (python#104488)pythongh-101282: move BOLT config after PGO (pythongh-104493)pythongh-104469 Convert _testcapi/float.c to use AC (pythongh-104470)pythongh-104456: Fix ref leak in _ctypes.COMError (python#104457)pythongh-98539: Make _SSLTransportProtocol.abort() safe to call when closed (python#104474)pythongh-104337: Clarify random.gammavariate doc entry  (python#104410)  Minor improvements to typing docs (python#104465)pythongh-87092: avoid gcc warning on uninitialized struct field in assemble.c (python#104460)pythonGH-71383: IDLE - Document testing subsets of modules (python#104463)pythongh-104454: Fix refleak in AttributeError_reduce (python#104455)pythongh-75710: IDLE - add docstrings and comments to editor module (python#104446)pythongh-91896: Revert some very noisy DeprecationWarnings for `ByteString` (python#104424)  Add a mention of PYTHONBREAKPOINT to breakpoint() docs (python#104430)  ...
@JelleZijlstraJelleZijlstra restored the typingdocs branchSeptember 10, 2024 23:37
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@Fidget-SpinnerFidget-SpinnerFidget-Spinner approved these changes

@AlexWaygoodAlexWaygoodAlexWaygood approved these changes

@gvanrossumgvanrossumAwaiting requested review from gvanrossum

Assignees
No one assigned
Labels
docsDocumentation in the Doc dirskip issueskip news
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@JelleZijlstra@miss-islington@bedevere-bot@Fidget-Spinner@AlexWaygood

[8]ページ先頭

©2009-2025 Movatter.jp