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 — gh-105578: Deprecate `AnyStr` in the docs by michael-the1 · Pull Request #107116 · python/cpython

Conversation

@michael-the1

@michael-the1 michael-the1 commented Jul 23, 2023 •
edited by github-actions Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Deprecate AnyStr in the docs.

  • Issue: Discourage and deprecate typing.AnyStr #105578

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

Sorry, something went wrong.

Uh oh!

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

All reactions
@michael-the1
Deprecate AnyStr in the docs
9cd2b0f
@michael-the1
michael-the1 requested review from AlexWaygood, Fidget-Spinner, JelleZijlstra and gvanrossum as code owners July 23, 2023 10:30
@bedevere-bot bedevere-bot mentioned this pull request Jul 22, 2023
Discourage and deprecate typing.AnyStr #105578
Closed
@bedevere-bot bedevere-bot added awaiting review docs Documentation in the Doc dir skip news labels Jul 23, 2023
AlexWaygood
AlexWaygood reviewed Jul 23, 2023
View reviewed changes

@AlexWaygood AlexWaygood left a comment

Copy link
Copy Markdown
Member

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.

Thank you!

This also needs:

  • A news entry
  • An entry in "What's New in Python 3.13

The deprecation notice also needs to state:

  • That we intend to remove it from __all__ and start emitting deprecation warnings at runtime in Python 3.16
  • That we plan to remove it in Python 3.18

Sorry, something went wrong.

Uh oh!

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

michael-the1 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@AlexWaygood AlexWaygood added type-feature A feature request or enhancement 3.13 only security fixes and removed skip news labels Jul 23, 2023
@bedevere-bot

This comment was marked as outdated.

Sign in to view
@AlexWaygood AlexWaygood added the topic-typing label Jul 23, 2023
michael-the1 added 4 commits July 23, 2023 13:06
@michael-the1
Add NEWS entry
ebd0e7a
@michael-the1
Add deprecation of AnyStr to What's New
d0b90d2
@michael-the1
Add missing backticks and class markers
4e07465
@michael-the1
Fix formatting in What's New
e517799
@michael-the1
michael-the1 requested a review from AlexWaygood July 23, 2023 11:57
AlexWaygood
AlexWaygood reviewed Jul 23, 2023
View reviewed changes

@AlexWaygood AlexWaygood left a comment

Copy link
Copy Markdown
Member

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.

Nearly there! Could you also add a row to the big deprecations table at the bottom of the typing docs: https://docs.python.org/3.13/library/typing.html#deprecation-timeline-of-major-features

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Doc/library/typing.rst Resolved

Uh oh!

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

Comment thread Doc/library/typing.rst Resolved

Uh oh!

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

Comment thread Doc/whatsnew/3.13.rst Resolved

Uh oh!

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

michael-the1 and others added 2 commits July 25, 2023 23:19
@michael-the1 @AlexWaygood
Improve deprecation comments
0d2d4b0
Co-authored-by: Alex Waygood <[email protected]>
@michael-the1
Add deprecation of AnyStr to the Big Table at the bottom
2c948cb
@michael-the1
michael-the1 requested a review from AlexWaygood July 25, 2023 21:26
AlexWaygood
AlexWaygood reviewed Jul 26, 2023
View reviewed changes

@AlexWaygood AlexWaygood left a comment •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

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.

A few suggestions to add some links to https://docs.python.org/3.13/reference/compound_stmts.html#type-params

Some of these are a bit repetitive, but it's important that people see notices about upcoming removals, so it's actually a good thing if we're saying the same thing in lots of places :-)

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Doc/library/typing.rst Resolved

Uh oh!

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

Comment thread Doc/whatsnew/3.13.rst Resolved

Uh oh!

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

Comment thread Doc/whatsnew/3.13.rst Resolved

Uh oh!

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

@michael-the1
Add reference to type-params section
c9df122
@michael-the1
michael-the1 requested a review from AlexWaygood July 30, 2023 16:11
AlexWaygood and others added 2 commits July 31, 2023 16:28
@AlexWaygood
Merge branch 'main' into deprecate-anystr-in-the-docs
84259fa
@AlexWaygood
Small fixups
8e32e29
AlexWaygood
AlexWaygood approved these changes Jul 31, 2023
View reviewed changes

@AlexWaygood AlexWaygood left a comment

Copy link
Copy Markdown
Member

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.

Thank you, looks great!

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting review labels Jul 31, 2023
@AlexWaygood
AlexWaygood enabled auto-merge (squash) July 31, 2023 15:35
@AlexWaygood
AlexWaygood merged commit a22ff8e into python:main Jul 31, 2023
@bedevere-bot bedevere-bot removed the awaiting merge label Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@AlexWaygood AlexWaygood AlexWaygood approved these changes
@gvanrossum gvanrossum Awaiting requested review from gvanrossum
@Fidget-Spinner Fidget-Spinner Awaiting requested review from Fidget-Spinner
@JelleZijlstra JelleZijlstra Awaiting requested review from JelleZijlstra JelleZijlstra is a code owner

Uh oh!

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

Assignees

No one assigned

Labels

3.13 only security fixes docs Documentation in the Doc dir topic-typing type-feature A feature request or enhancement

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.

3 participants

@michael-the1 @bedevere-bot @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.