Skip to content

Commit bb5c687

Browse files
authored
gh-111637: Clarify MIME type recognition behavior in mimetypes documentation (GH-129546)
1 parent 75b628a commit bb5c687

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Doc/library/mimetypes.rst

+5-3
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ the information :func:`init` sets up.
4747
The optional *strict* argument is a flag specifying whether the list of known MIME types
4848
is limited to only the official types `registered with IANA
4949
<https://www.iana.org/assignments/media-types/media-types.xhtml>`_.
50-
When *strict* is ``True`` (the default), only the IANA types are supported; when
51-
*strict* is ``False``, some additional non-standard but commonly used MIME types
52-
are also recognized.
50+
However, the behavior of this module also depends on the underlying operating
51+
system. Only file types recognized by the OS or explicitly registered with
52+
Python's internal database can be identified. When *strict* is ``True`` (the
53+
default), only the IANA types are supported; when *strict* is ``False``, some
54+
additional non-standard but commonly used MIME types are also recognized.
5355

5456
.. versionchanged:: 3.8
5557
Added support for *url* being a :term:`path-like object`.

0 commit comments

Comments
 (0)