From: sobolevn Date: Wed, 13 May 2026 08:48:01 +0000 (+0300) Subject: gh-149720: Fix docs for `mimetypes.MimeType.add_type` method (#149731) X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=31d1a7216ce27342788917cfc1e60a1debe0d530;p=thirdparty%2FPython%2Fcpython.git gh-149720: Fix docs for `mimetypes.MimeType.add_type` method (#149731) gh-149720: Fix docs for `mimetypes.MimeType.add_type` method` --- diff --git a/Doc/library/mimetypes.rst b/Doc/library/mimetypes.rst index eed9acb92e0c..5103eacde1dd 100644 --- a/Doc/library/mimetypes.rst +++ b/Doc/library/mimetypes.rst @@ -315,9 +315,11 @@ than one MIME-type database; it provides an interface similar to the one of the When *strict* is ``True`` (the default), the mapping will be added to the official MIME types, otherwise to the non-standard ones. - .. deprecated-removed:: 3.14 3.16 - Invalid, undotted extensions will raise a - :exc:`ValueError` in Python 3.16. + .. deprecated:: 3.14 + *ext* values that do not start with ``'.'`` are deprecated. + + .. versionchanged:: next + *ext* now must start with ``'.'``. Otherwise :exc:`ValueError` is raised. .. _mimetypes-cli: