Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.3k
gh-105578: DeprecateAnyStr
in the docs#107116
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 10 commits intopython:mainfrommichael-the1:deprecate-anystr-in-the-docsJul 31, 2023
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
10 commits Select commitHold shift + click to select a range
9cd2b0f
Deprecate AnyStr in the docs
michael-the1ebd0e7a
Add NEWS entry
michael-the1d0b90d2
Add deprecation of AnyStr to What's New
michael-the14e07465
Add missing backticks and class markers
michael-the1e517799
Fix formatting in What's New
michael-the10d2d4b0
Improve deprecation comments
michael-the12c948cb
Add deprecation of AnyStr to the Big Table at the bottom
michael-the1c9df122
Add reference to type-params section
michael-the184259fa
Merge branch 'main' into deprecate-anystr-in-the-docs
AlexWaygood8e32e29
Small fixups
AlexWaygoodFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
Add reference to type-params section
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commitc9df1220c100913b1d5ba8bc33c162b0431b2992
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 |
---|---|---|
@@ -832,8 +832,8 @@ using ``[]``. | ||
.. data:: AnyStr | ||
.. deprecated-removed:: 3.13 3.18 | ||
Deprecated in favor of the new:ref:`type parameter syntax <type-params>`. | ||
Use``class A[T: (str, bytes)]: ...`` instead of importing ``AnyStr``. See | ||
:pep:`695` for more details. | ||
michael-the1 marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
In Python 3.16, ``AnyStr`` will be removed from ``typing.__all__``, and | ||
5 changes: 3 additions & 2 deletionsDoc/whatsnew/3.13.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 |
---|---|---|
@@ -190,7 +190,8 @@ Deprecated | ||
* :data:`typing.AnyStr` is deprecated. In Python 3.16, it will be removed from | ||
``typing.__all__``, and a :exc:`DeprecationWarning` will be emitted when it | ||
is imported or accessed. It will be removed entirely in Python 3.18. Use | ||
the new :ref:`type parameter syntax <type-params>` instead. | ||
(Contributed by Michael The in :gh:`107116`.) | ||
michael-the1 marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
* :mod:`wave`: Deprecate the ``getmark()``, ``setmark()`` and ``getmarkers()`` | ||
@@ -340,7 +341,7 @@ Pending Removal in Python 3.16 | ||
Pending Removal in Python 3.18 | ||
------------------------------ | ||
* :class:`typing.AnyStr`: Use the new:ref:`type parameter syntax <type-params>` instead. See :pep:`695`. (:gh:`105578`) | ||
Pending Removal in Future Versions | ||
---------------------------------- | ||
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.