-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-68966: Deprecate the mailcap module #91951
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,6 @@ on the internet. | |
|
||
email.rst | ||
json.rst | ||
mailcap.rst | ||
mailbox.rst | ||
mimetypes.rst | ||
base64.rst | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1061,6 +1061,7 @@ Deprecated | |
* :mod:`chunk` | ||
* :mod:`crypt` | ||
* :mod:`imghdr` | ||
* :mod:`mailcap` | ||
* :mod:`msilib` | ||
* :mod:`nis` | ||
* :mod:`nntplib` | ||
|
@@ -1070,7 +1071,8 @@ Deprecated | |
* :mod:`spwd` | ||
* :mod:`sunau` | ||
|
||
(Contributed by Brett Cannon in :issue:`47061`.) | ||
(Contributed by Brett Cannon in :issue:`47061` and Victor Stinner in | ||
:gh:`68966`.) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looking at the others, we should include these There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I prefer to modify the backport but push all changes at once in the main branch. |
||
|
||
|
||
Removed | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,12 @@ | |
__all__ = ["getcaps","findmatch"] | ||
|
||
|
||
_DEPRECATION_MSG = ('The {name} module is deprecated and will be removed in ' | ||
'Python {remove}. See the mimetypes module for an ' | ||
'alternative.') | ||
warnings._deprecated(__name__, _DEPRECATION_MSG, remove=(3, 13)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
|
||
def lineno_sort_key(entry): | ||
# Sort in ascending order, with unspecified entries at the end | ||
if 'lineno' in entry: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
The :mod:`mailcap` module is now deprecated and will be removed in Python 3.13. | ||
See :pep:`594` for the rationale and the :mod:`mimetypes` module for an | ||
alternative. Patch by Victor Stinner. |
Uh oh!
There was an error while loading. Please reload this page.