From 80de0273c0caf8bae19787bb00255eb3fb2a2d0c Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 26 Apr 2022 22:43:50 +0200 Subject: gh-68966: Deprecate the mailcap module (#91951) --- Lib/mailcap.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Lib/mailcap.py') diff --git a/Lib/mailcap.py b/Lib/mailcap.py index ae416a8e9f..856b6a5547 100644 --- a/Lib/mailcap.py +++ b/Lib/mailcap.py @@ -6,6 +6,12 @@ import warnings __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)) + + def lineno_sort_key(entry): # Sort in ascending order, with unspecified entries at the end if 'lineno' in entry: -- cgit v1.2.1