| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
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 xdg-open program is an alternative, but it's not portable. |
Sorry, something went wrong.
|
I updated the doc to mention PEP 594 for the rationale. I didn't mention PEP 594 in the deprecation message. |
Sorry, something went wrong.
|
The Steering Council decided to deprecate the mailcap module as part of PEP 594, so in Python 3.11: |
Sorry, something went wrong.
| 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?
Sorry, something went wrong.
|
For the others, the documentation changes was done separately (and also list on Doc/library/superseded.rst), so they could be backported to 3.9 and 3.10. 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? |
Sorry, something went wrong.
|
@hugovk: I updated my PR. Would you mind to review it again? |
Sorry, something went wrong.
|
|
||
| (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.
Sorry, something went wrong.
There was a problem hiding this comment.
I prefer to modify the backport but push all changes at once in the main branch.
Sorry, something went wrong.
| _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.
Sorry, something went wrong.
| 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.
Sorry, something went wrong.
There was a problem hiding this comment.
Thank you!
Sorry, something went wrong.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
No description provided.