Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
bpo-47061: deprecate the aifc module#32134
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
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
7 commits Select commit Hold shift + click to select a range
5942b70 bpo-47061: deprecate the `aifc` module
brettcannon 0575c77 Add NEWS entry
brettcannon 20a160c Fix whitespace
brettcannon 027a5da Merge branch 'main' into deprecate-aifc
brettcannon ec2cf7f Merge branch 'main' into deprecate-aifc
brettcannon b4a659a Merge branch 'main' into deprecate-aifc
tiran ee8b268 Merge branch 'main' into deprecate-aifc
brettcannon File 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
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
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 |
|---|---|---|
| @@ -140,6 +140,10 @@ | ||
| __all__ = ["Error", "open"] | ||
| warnings._deprecated(__name__, remove=(3, 13)) | ||
| class Error(Exception): | ||
| pass | ||
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
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
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
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
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
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
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 |
|---|---|---|
| @@ -483,6 +483,27 @@ def __exit__(self, *exc_info): | ||
| self._module._showwarnmsg_impl = self._showwarnmsg_impl | ||
| _DEPRECATED_MSG = "{name!r} is deprecated and slated for removal in Python{remove}" | ||
| def _deprecated(name, message=_DEPRECATED_MSG, *, remove, _version=sys.version_info): | ||
| """Warn that *name* is deprecated or should be removed. | ||
| RuntimeError is raised if *remove* specifies a major/minor tuple older than | ||
| the current Python version or the same version but past the alpha. | ||
| The *message* argument is formatted with *name* and *remove* as a Python | ||
| version (e.g. "3.11"). | ||
| """ | ||
| remove_formatted = f"{remove[0]}.{remove[1]}" | ||
| if (_version[:2] > remove) or (_version[:2] == remove and _version[3] != "alpha"): | ||
| msg = f"{name!r} was slated for removal after Python{remove_formatted} alpha" | ||
tiran marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading. Please reload this page. | ||
| raise RuntimeError(msg) | ||
| else: | ||
| msg = message.format(name=name, remove=remove_formatted) | ||
| warn(msg, DeprecationWarning, stacklevel=3) | ||
| # Private utility function called by _PyErr_WarnUnawaitedCoroutine | ||
| def _warn_unawaited_coroutine(coro): | ||
| msg_lines = [ | ||
1 change: 1 addition & 0 deletions 1 Misc/NEWS.d/next/Library/2022-03-26-13-14-43.bpo-47061.QLxbC6.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 @@ | ||
| Deprecate the aifc module. |
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.
Uh oh!
There was an error while loading. Please reload this page.