Uh oh!
There was an error while loading. Please reload this page.
gh-68966: Deprecate the mailcap module - #91951
Conversation
vstinner
commented
Apr 26, 2022
mimetypes is not a replacement, but provide a "similar" feature. mailcap opens a file with an application, whereas mimetypes gets the MIME type of a file. On Linux, the |
vstinner
commented
Apr 26, 2022
I updated the doc to mention PEP 594 for the rationale. I didn't mention PEP 594 in the deprecation message. |
vstinner
commented
Apr 26, 2022
The Steering Council decided to deprecate the mailcap module as part of PEP 594, so in Python 3.11: |
| 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 |
There was a problem hiding this comment.
Maybe list this with the other two PEP 594 ones below?
hugovk
commented
Apr 26, 2022
For the others, the documentation changes was done separately (and also list on For example, see #31891 and #31984. The SC also wanted to leave out the targeted removal date in docs (but not warnings): #31891 (comment) Please could you split the PR? |
vstinner
commented
Apr 26, 2022
@hugovk: I updated my PR. Would you mind to review it again? |
Uh oh!
There was an error while loading. Please reload this page.
| (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.
Looking at the others, we should include these 3.11.rst changes in the 2nd PR that'll do the code warnings, because we don't want to backport this bit.
There was a problem hiding this comment.
I prefer to modify the backport but push all changes at once in the main branch.
| _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.
Let's include this in a 2nd, non-backport PR.
| with warnings.catch_warnings(): | ||
| # mailcap is deprecated | ||
| warnings.simplefilter('ignore', DeprecationWarning) | ||
| import mailcap |
There was a problem hiding this comment.
Also changes to this file for the 2nd PR.
Uh oh!
There was an error while loading. Please reload this page.
No description provided.