]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-149720: Fix docs for `mimetypes.MimeType.add_type` method (#149731)
authorsobolevn <mail@sobolevn.me>
Wed, 13 May 2026 08:48:01 +0000 (11:48 +0300)
committerGitHub <noreply@github.com>
Wed, 13 May 2026 08:48:01 +0000 (11:48 +0300)
gh-149720: Fix docs for `mimetypes.MimeType.add_type` method`

Doc/library/mimetypes.rst

index eed9acb92e0c95f933823d1d3179be97e6fd0aee..5103eacde1dd5b5627f73bd9f0d12047fb5214c8 100644 (file)
@@ -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: