Skip to content

Commit f9b213e

Browse files
sirosenhugovk
andauthored
Apply batched suggestions from code review
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
1 parent 426bb6c commit f9b213e

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎Lib/mimetypes.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,10 @@ def guess_type(self, url, strict=True):
146146
url = p.path
147147
else:
148148
warnings._deprecated(
149-
"Passing a file path to guess_type() is deprecated and will be "
150-
"removed in a future version. Use guess_file_type() instead.",
149+
"mimetypes.guess_type() with a file path",
150+
"Passing a file path to guess_type() is deprecated "
151+
"and will be removed in Python {remove}. "
152+
"Use guess_file_type() instead.",
151153
remove=(3, 21),
152154
stacklevel=4,
153155
)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Deprecate passing a file path to :func:`mimetypes.guess_type`. Use :func:`mimetypes.guess_file_type` instead.
1+
Deprecate passing a file path to :func:`mimetypes.guess_type`. Use :func:`mimetypes.guess_file_type` instead. Patch by Stephen Rosen.

0 commit comments

Comments
 (0)