-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
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 1 commit
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 |
|---|---|---|
|
|
@@ -985,6 +985,11 @@ Deprecated | |
| be able to parse Python 3.10 or newer. See the :pep:`617` (New PEG parser for | ||
| CPython). (Contributed by Victor Stinner in :issue:`40360`.) | ||
|
|
||
| * 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. | ||
| (Contributed by Victor Stinner in :gh:`68966`.) | ||
|
|
||
| * Undocumented modules ``sre_compile``, ``sre_constants`` and ``sre_parse`` | ||
| are now deprecated. | ||
| (Contributed by Serhiy Storchaka in :issue:`47152`.) | ||
|
|
||
| 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)) | ||
|
Member
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 |
|---|---|---|
| @@ -1,10 +1,17 @@ | ||
| import mailcap | ||
| import os | ||
| import copy | ||
| import os | ||
| import sys | ||
| import test.support | ||
| from test.support import os_helper | ||
| import unittest | ||
| import sys | ||
| import warnings | ||
| from test.support import os_helper | ||
|
|
||
|
|
||
| with warnings.catch_warnings(): | ||
| # mailcap is deprecated | ||
| warnings.simplefilter('ignore', DeprecationWarning) | ||
| import mailcap | ||
|
||
|
|
||
|
|
||
| # Location of mailcap file | ||
| MAILCAPFILE = test.support.findfile("mailcap.txt") | ||
|
|
||
| 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.