GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Minor improvements to typing docs by JelleZijlstra · Pull Request #104465 · python/cpython

Conversation

@JelleZijlstra

@JelleZijlstra JelleZijlstra commented May 14, 2023 •
edited by github-actions Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Will comment on the PR with specific motivations.


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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@JelleZijlstra
Minor improvements to typing docs
07cddea
Will comment on the PR with specific motivations.
@JelleZijlstra JelleZijlstra added the skip news label May 14, 2023
@JelleZijlstra
JelleZijlstra requested review from AlexWaygood, Fidget-Spinner and gvanrossum as code owners May 14, 2023 05:02
@bedevere-bot bedevere-bot added awaiting core review docs Documentation in the Doc dir labels May 14, 2023
@JelleZijlstra JelleZijlstra added needs backport to 3.11 only security fixes skip issue labels May 14, 2023
JelleZijlstra
JelleZijlstra commented May 14, 2023
View reviewed changes
Comment thread Doc/library/typing.rst
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 a full specification, please see
:class:`TypeVar`, and :class:`Generic`. For a specification, please see

@JelleZijlstra JelleZijlstra May 14, 2023

Copy link
Copy Markdown
Member Author

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.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

AlexWaygood reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread Doc/library/typing.rst

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.

@JelleZijlstra JelleZijlstra May 14, 2023

Copy link
Copy Markdown
Member Author

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.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

AlexWaygood reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread Doc/library/typing.rst Outdated
.. data:: AnyStr

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

@JelleZijlstra JelleZijlstra May 14, 2023

Copy link
Copy Markdown
Member Author

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.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/library/typing.rst
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``.

@JelleZijlstra JelleZijlstra May 14, 2023

Copy link
Copy Markdown
Member Author

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.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

AlexWaygood reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@JelleZijlstra
fix label
68c7e8b
AlexWaygood
AlexWaygood approved these changes May 14, 2023
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels May 14, 2023
Fidget-Spinner
Fidget-Spinner approved these changes May 14, 2023
View reviewed changes
@AlexWaygood
AlexWaygood merged commit 2f7b5e4 into python:main May 14, 2023
@miss-islington

miss-islington commented May 14, 2023

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the awaiting merge label May 14, 2023
@bedevere-bot

bedevere-bot commented May 14, 2023

Copy link
Copy Markdown

GH-104475 is a backport of this pull request to the 3.11 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label May 14, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 14, 2023
@JelleZijlstra @miss-islington
Minor improvements to typing docs (pythonGH-104465)
eb6fbf0
(cherry picked from commit 2f7b5e4)

Co-authored-by: Jelle Zijlstra <[email protected]>
AlexWaygood pushed a commit that referenced this pull request May 14, 2023
@miss-islington @JelleZijlstra
[3.11] Minor improvements to typing docs (GH-104465) (#104475)
f5f9975
Minor improvements to typing docs (GH-104465)
(cherry picked from commit 2f7b5e4)

Co-authored-by: Jelle Zijlstra <[email protected]>
@JelleZijlstra
JelleZijlstra deleted the typingdocs branch May 14, 2023 12:13
carljm added a commit to carljm/cpython that referenced this pull request May 15, 2023
@carljm
Merge branch 'main' into supermon
343867a
* 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 request May 15, 2023
@carljm
Merge branch 'main' into cached_property_docs
452d9f5
* 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)
  ...
@JelleZijlstra
JelleZijlstra restored the typingdocs branch September 10, 2024 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Fidget-Spinner Fidget-Spinner Fidget-Spinner approved these changes
@AlexWaygood AlexWaygood AlexWaygood approved these changes
@gvanrossum gvanrossum Awaiting requested review from gvanrossum

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

docs Documentation in the Doc dir skip issue skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@JelleZijlstra @miss-islington @bedevere-bot @Fidget-Spinner @AlexWaygood
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.