From 6b634768306b4017ead2202edb68f3b4eaf93d3c Mon Sep 17 00:00:00 2001 From: donBarbos Date: Sat, 1 Feb 2025 16:18:07 +0400 Subject: [PATCH 1/6] Clarified when file extension guessing works --- Doc/library/mimetypes.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Doc/library/mimetypes.rst b/Doc/library/mimetypes.rst index 8ad4850584a7e1..1057e616f55bcc 100644 --- a/Doc/library/mimetypes.rst +++ b/Doc/library/mimetypes.rst @@ -47,9 +47,11 @@ the information :func:`init` sets up. The optional *strict* argument is a flag specifying whether the list of known MIME types is limited to only the official types `registered with IANA `_. - When *strict* is ``True`` (the default), only the IANA types are supported; when - *strict* is ``False``, some additional non-standard but commonly used MIME types - are also recognized. + However, the behavior of this module also depends on the underlying operating + system. Only file types recognized by the OS or explicitly registered with + Python’s internal database can be identified. When *strict* is ``True`` (the + default), only the IANA types are supported; when *strict* is ``False``, some + additional non-standard but commonly used MIME types are also recognized. .. versionchanged:: 3.8 Added support for *url* being a :term:`path-like object`. From 2cfa7fecdca5bc76af514a08dd2ba6e22a752fbc Mon Sep 17 00:00:00 2001 From: donBarbos Date: Mon, 3 Feb 2025 09:53:21 +0000 Subject: [PATCH 2/6] Update mimetypes.rst Co-authored-by: Steve Dower --- Doc/library/mimetypes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/mimetypes.rst b/Doc/library/mimetypes.rst index 1057e616f55bcc..514e773359a9aa 100644 --- a/Doc/library/mimetypes.rst +++ b/Doc/library/mimetypes.rst @@ -49,7 +49,7 @@ the information :func:`init` sets up. `_. However, the behavior of this module also depends on the underlying operating system. Only file types recognized by the OS or explicitly registered with - Python’s internal database can be identified. When *strict* is ``True`` (the + Python's internal database can be identified. When *strict* is ``True`` (the default), only the IANA types are supported; when *strict* is ``False``, some additional non-standard but commonly used MIME types are also recognized. From d84149d402899169034064d0e309811303591c2e Mon Sep 17 00:00:00 2001 From: donBarbos Date: Mon, 3 Feb 2025 09:54:11 +0000 Subject: [PATCH 3/6] Update Doc/library/mimetypes.rst Co-authored-by: Steve Dower From 925a9d632d8430217b3980cf5c79a845c7bbd285 Mon Sep 17 00:00:00 2001 From: donBarbos Date: Mon, 3 Feb 2025 09:54:33 +0000 Subject: [PATCH 4/6] Update Doc/library/mimetypes.rst Co-authored-by: Steve Dower From 1b5f0c3d791a571dc3abb1a32ac092f722e68223 Mon Sep 17 00:00:00 2001 From: donBarbos Date: Mon, 3 Feb 2025 09:55:10 +0000 Subject: [PATCH 5/6] Update Doc/library/mimetypes.rst Co-authored-by: Steve Dower From 95525636b988cb7880f0e27fdde4624a57b79cd5 Mon Sep 17 00:00:00 2001 From: donBarbos Date: Mon, 3 Feb 2025 09:55:31 +0000 Subject: [PATCH 6/6] Update Doc/library/mimetypes.rst Co-authored-by: Steve Dower