Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Address review comments.
  • Loading branch information
serhiy-storchaka committed Mar 26, 2024
commit bd205f64f9fcbcdcdf425f1c7bf04157ef918218
6 changes: 3 additions & 3 deletions Doc/library/mimetypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ the information :func:`init` sets up.
.. versionchanged:: 3.8
Added support for *url* being a :term:`path-like object`.

.. versionchanged:: 3.13
Passing a file path instead of URL is deprecated.
.. deprecated:: 3.13
Passing a file path instead of URL is :term:`soft deprecated`.
Use :func:`guess_file_type` for this.


Expand Down Expand Up @@ -253,7 +253,7 @@ than one MIME-type database; it provides an interface similar to the one of the
the object.


.. method:: MimeTypes.guess_type(url, strict=True)
.. method:: MimeTypes.guess_file_type(path, *, strict=True)

Similar to the :func:`guess_file_type` function, using the tables stored
as part of the object.
Expand Down
4 changes: 2 additions & 2 deletions Doc/whatsnew/3.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ mimetypes
---------

* Add the :func:`~mimetypes.guess_file_type` function which works with file path.
Passing file path instead of URL in :func:`~mimetypes.guess_type` is deprecated.
Passing file path instead of URL in :func:`~mimetypes.guess_type` is :term:`soft deprecated`.
(Contributed by Serhiy Storchaka in :gh:`66543`.)

mmap
Expand Down Expand Up @@ -892,7 +892,7 @@ Deprecated
and was only useful for Jython support.
(Contributed by Nikita Sobolev in :gh:`116349`.)

* Passing file path instead of URL in :func:`~mimetypes.guess_type` is deprecated.
* Passing file path instead of URL in :func:`~mimetypes.guess_type` is :term:`soft deprecated`.
Use :func:`~mimetypes.guess_file_type` instead.
(Contributed by Serhiy Storchaka in :gh:`66543`.)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Add the :func:`mimetypes.guess_file_type` function which works with file
path. Passing file path instead of URL in :func:`~mimetypes.guess_type` is
deprecated.
:term:`soft deprecated`.