From 5e0f103d86be13356cf5575bae537d750fe1ee94 Mon Sep 17 00:00:00 2001 From: Kristinita Date: Thu, 3 Apr 2025 20:35:52 +0300 Subject: [PATCH 1/9] gh-132054 Add `application/yaml` to `mimetypes` --- Lib/mimetypes.py | 2 ++ Lib/test/test_mimetypes.py | 2 ++ .../next/Library/2025-04-03-20-28-54.gh-issue-132054.c1nlOx.rst | 1 + 3 files changed, 5 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2025-04-03-20-28-54.gh-issue-132054.c1nlOx.rst diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py index 6b94fe3c4df756..2c56c5469fb1c5 100644 --- a/Lib/mimetypes.py +++ b/Lib/mimetypes.py @@ -544,6 +544,8 @@ def _default_mime_types(): '.rdf' : 'application/xml', '.wsdl' : 'application/xml', '.xpdl' : 'application/xml', + '.yaml' : 'application/yaml', + '.yml' : 'application/yaml', '.zip' : 'application/zip', '.3gp' : 'audio/3gpp', '.3gpp' : 'audio/3gpp', diff --git a/Lib/test/test_mimetypes.py b/Lib/test/test_mimetypes.py index b5d1f50099e16a..d9f3398cc2021d 100644 --- a/Lib/test/test_mimetypes.py +++ b/Lib/test/test_mimetypes.py @@ -244,6 +244,8 @@ def check_extensions(): ("application/x-texinfo", ".texi"), ("application/x-troff", ".roff"), ("application/xml", ".xsl"), + ("application/yaml", ".yaml"), + ("application/yaml", ".yml"), ("audio/flac", ".flac"), ("audio/matroska", ".mka"), ("audio/mp4", ".m4a"), diff --git a/Misc/NEWS.d/next/Library/2025-04-03-20-28-54.gh-issue-132054.c1nlOx.rst b/Misc/NEWS.d/next/Library/2025-04-03-20-28-54.gh-issue-132054.c1nlOx.rst new file mode 100644 index 00000000000000..6407623ad8c3eb --- /dev/null +++ b/Misc/NEWS.d/next/Library/2025-04-03-20-28-54.gh-issue-132054.c1nlOx.rst @@ -0,0 +1 @@ +Mime type ``application/yaml`` is now supported by :mod:`mimetypes`. From 1031592c4a578fd998528e139e5fc66feb871b2d Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Date: Thu, 3 Apr 2025 18:51:45 +0100 Subject: [PATCH 2/9] Update NEWS fragment --- .../Library/2025-04-03-20-28-54.gh-issue-132054.c1nlOx.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Library/2025-04-03-20-28-54.gh-issue-132054.c1nlOx.rst b/Misc/NEWS.d/next/Library/2025-04-03-20-28-54.gh-issue-132054.c1nlOx.rst index 6407623ad8c3eb..31612ff54f9130 100644 --- a/Misc/NEWS.d/next/Library/2025-04-03-20-28-54.gh-issue-132054.c1nlOx.rst +++ b/Misc/NEWS.d/next/Library/2025-04-03-20-28-54.gh-issue-132054.c1nlOx.rst @@ -1 +1,2 @@ -Mime type ``application/yaml`` is now supported by :mod:`mimetypes`. +The ``application/yaml`` mime type (:rfc:`9512`) is now supported +by :mod:`mimetypes`. From a528d603aabdea0469c87e2428b261eb7030d30e Mon Sep 17 00:00:00 2001 From: Kristinita Date: Thu, 3 Apr 2025 21:17:27 +0300 Subject: [PATCH 3/9] fix(error): remove .yml from the list of preferred extensions https://github.com/python/cpython/actions/runs/14249517987/job/39938739555?pr=132056#step:11:655 --- Doc/library/annotationlib.rst | 28 ++++++++++++++++++---------- Doc/library/typing.rst | 12 ++---------- Lib/test/test_mimetypes.py | 1 - Lib/test/test_perf_profiler.py | 5 +++-- Lib/test/test_typing.py | 15 +-------------- Lib/typing.py | 7 ++----- PCbuild/get_externals.bat | 2 +- PCbuild/python.props | 2 +- 8 files changed, 28 insertions(+), 44 deletions(-) diff --git a/Doc/library/annotationlib.rst b/Doc/library/annotationlib.rst index dcaff3d7fdbec5..ab9393e8cd8ab7 100644 --- a/Doc/library/annotationlib.rst +++ b/Doc/library/annotationlib.rst @@ -172,15 +172,31 @@ Classes :class:`~ForwardRef`. The string may not be exactly equivalent to the original source. - .. method:: evaluate(*, globals=None, locals=None, type_params=None, owner=None) + .. method:: evaluate(*, owner=None, globals=None, locals=None, type_params=None) Evaluate the forward reference, returning its value. This may throw an exception, such as :exc:`NameError`, if the forward - reference refers to names that do not exist. The arguments to this + reference refers to a name that cannot be resolved. The arguments to this method can be used to provide bindings for names that would otherwise be undefined. + The *owner* parameter provides the preferred mechanism for passing scope + information to this method. The owner of a :class:`~ForwardRef` is the + object that contains the annotation from which the :class:`~ForwardRef` + derives, such as a module object, type object, or function object. + + The *globals*, *locals*, and *type_params* parameters provide a more precise + mechanism for influencing the names that are available when the :class:`~ForwardRef` + is evaluated. *globals* and *locals* are passed to :func:`eval`, representing + the global and local namespaces in which the name is evaluated. + The *type_params* parameter is relevant for objects created using the native + syntax for :ref:`generic classes ` and :ref:`functions `. + It is a tuple of :ref:`type parameters ` that are in scope + while the forward reference is being evaluated. For example, if evaluating a + :class:`~ForwardRef` retrieved from an annotation found in the class namespace + of a generic class ``C``, *type_params* should be set to ``C.__type_params__``. + :class:`~ForwardRef` instances returned by :func:`get_annotations` retain references to information about the scope they originated from, so calling this method with no further arguments may be sufficient to @@ -188,14 +204,6 @@ Classes means may not have any information about their scope, so passing arguments to this method may be necessary to evaluate them successfully. - *globals* and *locals* are passed to :func:`eval`, representing - the global and local namespaces in which the name is evaluated. - *type_params*, if given, must be a tuple of - :ref:`type parameters ` that are in scope while the forward - reference is being evaluated. *owner* is the object that owns the - annotation from which the forward reference derives, usually a function, - class, or module. - .. important:: Once a :class:`~ForwardRef` instance has been evaluated, it caches diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index 99394b01a3d9ce..d5870498fa35b9 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -3466,16 +3466,8 @@ Introspection helpers * Supports the :attr:`~annotationlib.Format.FORWARDREF` and :attr:`~annotationlib.Format.STRING` formats. - *forward_ref* must be an instance of :class:`~annotationlib.ForwardRef`. - *owner*, if given, should be the object that holds the annotations that - the forward reference derived from, such as a module, class object, or function. - It is used to infer the namespaces to use for looking up names. - *globals* and *locals* can also be explicitly given to provide - the global and local namespaces. - *type_params* is a tuple of :ref:`type parameters ` that - are in scope when evaluating the forward reference. - This parameter must be provided (though it may be an empty tuple) if *owner* - is not given and the forward reference does not already have an owner set. + See the documentation for :meth:`annotationlib.ForwardRef.evaluate` for + the meaning of the *owner*, *globals*, *locals*, and *type_params* parameters. *format* specifies the format of the annotation and is a member of the :class:`annotationlib.Format` enum. diff --git a/Lib/test/test_mimetypes.py b/Lib/test/test_mimetypes.py index d9f3398cc2021d..cd66686c53841b 100644 --- a/Lib/test/test_mimetypes.py +++ b/Lib/test/test_mimetypes.py @@ -245,7 +245,6 @@ def check_extensions(): ("application/x-troff", ".roff"), ("application/xml", ".xsl"), ("application/yaml", ".yaml"), - ("application/yaml", ".yml"), ("audio/flac", ".flac"), ("audio/matroska", ".mka"), ("audio/mp4", ".m4a"), diff --git a/Lib/test/test_perf_profiler.py b/Lib/test/test_perf_profiler.py index 43e5a7e114b317..1922d8e0bab216 100644 --- a/Lib/test/test_perf_profiler.py +++ b/Lib/test/test_perf_profiler.py @@ -493,7 +493,8 @@ def compile_trampolines_for_all_functions(): def _is_perf_version_at_least(major, minor): # The output of perf --version looks like "perf version 6.7-3" but - # it can also be perf version "perf version 5.15.143" + # it can also be perf version "perf version 5.15.143", or even include + # a commit hash in the version string, like "6.12.9.g242e6068fd5c" try: output = subprocess.check_output(["perf", "--version"], text=True) except (subprocess.CalledProcessError, FileNotFoundError): @@ -501,7 +502,7 @@ def _is_perf_version_at_least(major, minor): version = output.split()[2] version = version.split("-")[0] version = version.split(".") - version = tuple(map(int, version)) + version = tuple(map(int, version[:2])) return version >= (major, minor) diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index 2c0297313cb4ab..97d3a927160b8f 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -7311,20 +7311,7 @@ def test_evaluate_forward_ref(self): def test_evaluate_forward_ref_no_type_params(self): ref = ForwardRef('int') - with self.assertWarnsRegex( - DeprecationWarning, - ( - "Failing to pass a value to the 'type_params' parameter " - "of 'typing.evaluate_forward_ref' is deprecated, " - "as it leads to incorrect behaviour" - ), - ): - typing.evaluate_forward_ref(ref) - - # No warnings when `type_params` is passed: - with warnings.catch_warnings(record=True) as w: - typing.evaluate_forward_ref(ref, type_params=()) - self.assertEqual(w, []) + self.assertIs(typing.evaluate_forward_ref(ref), int) class CollectionsAbcTests(BaseTestCase): diff --git a/Lib/typing.py b/Lib/typing.py index f7528258f43453..707c05d504065c 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -943,7 +943,7 @@ def evaluate_forward_ref( owner=None, globals=None, locals=None, - type_params=_sentinel, + type_params=None, format=annotationlib.Format.VALUE, _recursive_guard=frozenset(), ): @@ -963,15 +963,12 @@ def evaluate_forward_ref( infer the namespaces to use for looking up names. *globals* and *locals* can also be explicitly given to provide the global and local namespaces. *type_params* is a tuple of type parameters that are in scope when - evaluating the forward reference. This parameter must be provided (though + evaluating the forward reference. This parameter should be provided (though it may be an empty tuple) if *owner* is not given and the forward reference does not already have an owner set. *format* specifies the format of the annotation and is a member of the annotationlib.Format enum. """ - if type_params is _sentinel: - _deprecation_warning_for_no_type_params_passed("typing.evaluate_forward_ref") - type_params = () if format == annotationlib.Format.STRING: return forward_ref.__forward_arg__ if forward_ref.__forward_arg__ in _recursive_guard: diff --git a/PCbuild/get_externals.bat b/PCbuild/get_externals.bat index 51a76866e840e3..b28ce9caeb3f13 100644 --- a/PCbuild/get_externals.bat +++ b/PCbuild/get_externals.bat @@ -77,7 +77,7 @@ echo.Fetching external binaries... set binaries= if NOT "%IncludeLibffi%"=="false" set binaries=%binaries% libffi-3.4.4 -if NOT "%IncludeSSL%"=="false" set binaries=%binaries% openssl-bin-3.0.16.1 +if NOT "%IncludeSSL%"=="false" set binaries=%binaries% openssl-bin-3.0.16.2 if NOT "%IncludeTkinter%"=="false" set binaries=%binaries% tcltk-8.6.15.0 if NOT "%IncludeSSLSrc%"=="false" set binaries=%binaries% nasm-2.11.06 diff --git a/PCbuild/python.props b/PCbuild/python.props index 514576ce14f47e..7cb9ad8e65b56e 100644 --- a/PCbuild/python.props +++ b/PCbuild/python.props @@ -82,7 +82,7 @@ $(libffiOutDir)include $(ExternalsDir)\mpdecimal-4.0.0\ $(ExternalsDir)openssl-3.0.16\ - $(ExternalsDir)openssl-bin-3.0.16.1\$(ArchName)\ + $(ExternalsDir)openssl-bin-3.0.16.2\$(ArchName)\ $(opensslOutDir)include $(ExternalsDir)\nasm-2.11.06\ $(ExternalsDir)\zlib-1.3.1\ From 6d29f258b6a4d0ad5066c9c932b1b87b8a62d807 Mon Sep 17 00:00:00 2001 From: Kristinita Date: Thu, 3 Apr 2025 23:19:24 +0300 Subject: [PATCH 4/9] =?UTF-8?q?fix(git):=20undo=20extra=20changes=20from?= =?UTF-8?q?=20the=20last=20push=20use=20=E2=80=9Cgit=20restore=E2=80=9D=20?= =?UTF-8?q?command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/python/cpython/pull/132056#issuecomment-2776805064 Signed-off-by: Kristinita --- Doc/library/annotationlib.rst | 28 ++++++++++------------------ Doc/library/typing.rst | 12 ++++++++++-- Lib/test/test_perf_profiler.py | 5 ++--- Lib/test/test_typing.py | 15 ++++++++++++++- Lib/typing.py | 7 +++++-- PCbuild/get_externals.bat | 2 +- PCbuild/python.props | 2 +- 7 files changed, 43 insertions(+), 28 deletions(-) diff --git a/Doc/library/annotationlib.rst b/Doc/library/annotationlib.rst index ab9393e8cd8ab7..dcaff3d7fdbec5 100644 --- a/Doc/library/annotationlib.rst +++ b/Doc/library/annotationlib.rst @@ -172,31 +172,15 @@ Classes :class:`~ForwardRef`. The string may not be exactly equivalent to the original source. - .. method:: evaluate(*, owner=None, globals=None, locals=None, type_params=None) + .. method:: evaluate(*, globals=None, locals=None, type_params=None, owner=None) Evaluate the forward reference, returning its value. This may throw an exception, such as :exc:`NameError`, if the forward - reference refers to a name that cannot be resolved. The arguments to this + reference refers to names that do not exist. The arguments to this method can be used to provide bindings for names that would otherwise be undefined. - The *owner* parameter provides the preferred mechanism for passing scope - information to this method. The owner of a :class:`~ForwardRef` is the - object that contains the annotation from which the :class:`~ForwardRef` - derives, such as a module object, type object, or function object. - - The *globals*, *locals*, and *type_params* parameters provide a more precise - mechanism for influencing the names that are available when the :class:`~ForwardRef` - is evaluated. *globals* and *locals* are passed to :func:`eval`, representing - the global and local namespaces in which the name is evaluated. - The *type_params* parameter is relevant for objects created using the native - syntax for :ref:`generic classes ` and :ref:`functions `. - It is a tuple of :ref:`type parameters ` that are in scope - while the forward reference is being evaluated. For example, if evaluating a - :class:`~ForwardRef` retrieved from an annotation found in the class namespace - of a generic class ``C``, *type_params* should be set to ``C.__type_params__``. - :class:`~ForwardRef` instances returned by :func:`get_annotations` retain references to information about the scope they originated from, so calling this method with no further arguments may be sufficient to @@ -204,6 +188,14 @@ Classes means may not have any information about their scope, so passing arguments to this method may be necessary to evaluate them successfully. + *globals* and *locals* are passed to :func:`eval`, representing + the global and local namespaces in which the name is evaluated. + *type_params*, if given, must be a tuple of + :ref:`type parameters ` that are in scope while the forward + reference is being evaluated. *owner* is the object that owns the + annotation from which the forward reference derives, usually a function, + class, or module. + .. important:: Once a :class:`~ForwardRef` instance has been evaluated, it caches diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index d5870498fa35b9..99394b01a3d9ce 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -3466,8 +3466,16 @@ Introspection helpers * Supports the :attr:`~annotationlib.Format.FORWARDREF` and :attr:`~annotationlib.Format.STRING` formats. - See the documentation for :meth:`annotationlib.ForwardRef.evaluate` for - the meaning of the *owner*, *globals*, *locals*, and *type_params* parameters. + *forward_ref* must be an instance of :class:`~annotationlib.ForwardRef`. + *owner*, if given, should be the object that holds the annotations that + the forward reference derived from, such as a module, class object, or function. + It is used to infer the namespaces to use for looking up names. + *globals* and *locals* can also be explicitly given to provide + the global and local namespaces. + *type_params* is a tuple of :ref:`type parameters ` that + are in scope when evaluating the forward reference. + This parameter must be provided (though it may be an empty tuple) if *owner* + is not given and the forward reference does not already have an owner set. *format* specifies the format of the annotation and is a member of the :class:`annotationlib.Format` enum. diff --git a/Lib/test/test_perf_profiler.py b/Lib/test/test_perf_profiler.py index 1922d8e0bab216..43e5a7e114b317 100644 --- a/Lib/test/test_perf_profiler.py +++ b/Lib/test/test_perf_profiler.py @@ -493,8 +493,7 @@ def compile_trampolines_for_all_functions(): def _is_perf_version_at_least(major, minor): # The output of perf --version looks like "perf version 6.7-3" but - # it can also be perf version "perf version 5.15.143", or even include - # a commit hash in the version string, like "6.12.9.g242e6068fd5c" + # it can also be perf version "perf version 5.15.143" try: output = subprocess.check_output(["perf", "--version"], text=True) except (subprocess.CalledProcessError, FileNotFoundError): @@ -502,7 +501,7 @@ def _is_perf_version_at_least(major, minor): version = output.split()[2] version = version.split("-")[0] version = version.split(".") - version = tuple(map(int, version[:2])) + version = tuple(map(int, version)) return version >= (major, minor) diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index 97d3a927160b8f..2c0297313cb4ab 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -7311,7 +7311,20 @@ def test_evaluate_forward_ref(self): def test_evaluate_forward_ref_no_type_params(self): ref = ForwardRef('int') - self.assertIs(typing.evaluate_forward_ref(ref), int) + with self.assertWarnsRegex( + DeprecationWarning, + ( + "Failing to pass a value to the 'type_params' parameter " + "of 'typing.evaluate_forward_ref' is deprecated, " + "as it leads to incorrect behaviour" + ), + ): + typing.evaluate_forward_ref(ref) + + # No warnings when `type_params` is passed: + with warnings.catch_warnings(record=True) as w: + typing.evaluate_forward_ref(ref, type_params=()) + self.assertEqual(w, []) class CollectionsAbcTests(BaseTestCase): diff --git a/Lib/typing.py b/Lib/typing.py index 707c05d504065c..f7528258f43453 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -943,7 +943,7 @@ def evaluate_forward_ref( owner=None, globals=None, locals=None, - type_params=None, + type_params=_sentinel, format=annotationlib.Format.VALUE, _recursive_guard=frozenset(), ): @@ -963,12 +963,15 @@ def evaluate_forward_ref( infer the namespaces to use for looking up names. *globals* and *locals* can also be explicitly given to provide the global and local namespaces. *type_params* is a tuple of type parameters that are in scope when - evaluating the forward reference. This parameter should be provided (though + evaluating the forward reference. This parameter must be provided (though it may be an empty tuple) if *owner* is not given and the forward reference does not already have an owner set. *format* specifies the format of the annotation and is a member of the annotationlib.Format enum. """ + if type_params is _sentinel: + _deprecation_warning_for_no_type_params_passed("typing.evaluate_forward_ref") + type_params = () if format == annotationlib.Format.STRING: return forward_ref.__forward_arg__ if forward_ref.__forward_arg__ in _recursive_guard: diff --git a/PCbuild/get_externals.bat b/PCbuild/get_externals.bat index b28ce9caeb3f13..51a76866e840e3 100644 --- a/PCbuild/get_externals.bat +++ b/PCbuild/get_externals.bat @@ -77,7 +77,7 @@ echo.Fetching external binaries... set binaries= if NOT "%IncludeLibffi%"=="false" set binaries=%binaries% libffi-3.4.4 -if NOT "%IncludeSSL%"=="false" set binaries=%binaries% openssl-bin-3.0.16.2 +if NOT "%IncludeSSL%"=="false" set binaries=%binaries% openssl-bin-3.0.16.1 if NOT "%IncludeTkinter%"=="false" set binaries=%binaries% tcltk-8.6.15.0 if NOT "%IncludeSSLSrc%"=="false" set binaries=%binaries% nasm-2.11.06 diff --git a/PCbuild/python.props b/PCbuild/python.props index 7cb9ad8e65b56e..514576ce14f47e 100644 --- a/PCbuild/python.props +++ b/PCbuild/python.props @@ -82,7 +82,7 @@ $(libffiOutDir)include $(ExternalsDir)\mpdecimal-4.0.0\ $(ExternalsDir)openssl-3.0.16\ - $(ExternalsDir)openssl-bin-3.0.16.2\$(ArchName)\ + $(ExternalsDir)openssl-bin-3.0.16.1\$(ArchName)\ $(opensslOutDir)include $(ExternalsDir)\nasm-2.11.06\ $(ExternalsDir)\zlib-1.3.1\ From 3b3bd87ec74e74fb473998c78bfcebb78ac3ab09 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sun, 20 Apr 2025 14:58:17 +0300 Subject: [PATCH 5/9] Test guess_file_type with types with multiple extensions --- Lib/test/test_mimetypes.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Lib/test/test_mimetypes.py b/Lib/test/test_mimetypes.py index cd66686c53841b..39610e5b798876 100644 --- a/Lib/test/test_mimetypes.py +++ b/Lib/test/test_mimetypes.py @@ -287,6 +287,27 @@ def check_extensions(): mimetypes.init() check_extensions() + def test_guess_file_type(self): + def check_file_type(): + for mime_type, ext in ( + ("application/yaml", ".yaml"), + ("application/yaml", ".yml"), + ("audio/mpeg", ".mp2"), + ("audio/mpeg", ".mp3"), + ("video/mpeg", ".m1v"), + ("video/mpeg", ".mpa"), + ("video/mpeg", ".mpe"), + ("video/mpeg", ".mpeg"), + ("video/mpeg", ".mpg"), + ): + with self.subTest(mime_type=mime_type, ext=ext): + result, _ = mimetypes.guess_file_type(f"filename{ext}") + self.assertEqual(result, mime_type) + + check_file_type() + mimetypes.init() + check_file_type() + def test_init_stability(self): mimetypes.init() From bb8b661f1d073a448445fa4a2bc441b71ddb99cd Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sun, 20 Apr 2025 15:23:12 +0300 Subject: [PATCH 6/9] Omit ambiguous .mpa (audio/mpeg on Windows) --- Lib/test/test_mimetypes.py | 1 - 1 file changed, 1 deletion(-) diff --git a/Lib/test/test_mimetypes.py b/Lib/test/test_mimetypes.py index 39610e5b798876..26a32c56761074 100644 --- a/Lib/test/test_mimetypes.py +++ b/Lib/test/test_mimetypes.py @@ -295,7 +295,6 @@ def check_file_type(): ("audio/mpeg", ".mp2"), ("audio/mpeg", ".mp3"), ("video/mpeg", ".m1v"), - ("video/mpeg", ".mpa"), ("video/mpeg", ".mpe"), ("video/mpeg", ".mpeg"), ("video/mpeg", ".mpg"), From c8a4f73f5d144bca1724e4b0a99cb0ed0bd11c05 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sun, 20 Apr 2025 15:23:26 +0300 Subject: [PATCH 7/9] Add What's New entry --- Doc/whatsnew/3.14.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index a561d3b3383fc5..f0c9d3ee51bbb2 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -829,6 +829,9 @@ mimetypes (Contributed by Hugo van Kemenade in :gh:`129965`.) +* Add :rfc:`9512` ``application/yaml`` for YAML files (``.yaml`` and ``.yml``). + (Contributed by Kristinita in :gh:`132056`.) + multiprocessing --------------- From c5a6f68c63e5d1d18045a33d9ebdfdf87d258fee Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sun, 20 Apr 2025 15:24:28 +0300 Subject: [PATCH 8/9] Update What's New entry --- Doc/whatsnew/3.14.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index f0c9d3ee51bbb2..16d162e6303751 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -829,8 +829,8 @@ mimetypes (Contributed by Hugo van Kemenade in :gh:`129965`.) -* Add :rfc:`9512` ``application/yaml`` for YAML files (``.yaml`` and ``.yml``). - (Contributed by Kristinita in :gh:`132056`.) +* Add :rfc:`9512` ``application/yaml`` MIME type for YAML files (``.yaml`` + and ``.yml``). (Contributed by Kristinita in :gh:`132056`.) multiprocessing From 3bf23ce4753d875c3f02e81d31072a34fa9d3619 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sun, 20 Apr 2025 17:08:38 +0300 Subject: [PATCH 9/9] Update credit --- Doc/whatsnew/3.14.rst | 3 ++- .../Library/2025-04-03-20-28-54.gh-issue-132054.c1nlOx.rst | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 16d162e6303751..9b56ed3ab9928d 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -830,7 +830,8 @@ mimetypes (Contributed by Hugo van Kemenade in :gh:`129965`.) * Add :rfc:`9512` ``application/yaml`` MIME type for YAML files (``.yaml`` - and ``.yml``). (Contributed by Kristinita in :gh:`132056`.) + and ``.yml``). (Contributed by Sasha "Nelie" Chernykh and Hugo van Kemenade + in :gh:`132056`.) multiprocessing diff --git a/Misc/NEWS.d/next/Library/2025-04-03-20-28-54.gh-issue-132054.c1nlOx.rst b/Misc/NEWS.d/next/Library/2025-04-03-20-28-54.gh-issue-132054.c1nlOx.rst index 31612ff54f9130..b9602c0b2ca1c6 100644 --- a/Misc/NEWS.d/next/Library/2025-04-03-20-28-54.gh-issue-132054.c1nlOx.rst +++ b/Misc/NEWS.d/next/Library/2025-04-03-20-28-54.gh-issue-132054.c1nlOx.rst @@ -1,2 +1,2 @@ The ``application/yaml`` mime type (:rfc:`9512`) is now supported -by :mod:`mimetypes`. +by :mod:`mimetypes`. Patch by Sasha "Nelie" Chernykh and Hugo van Kemenade.