Skip to content

Commit 66d32a0

Browse files
author
Forest
committed
imaplib: use stacklevel=2 in warnings.warn()
1 parent f47de53 commit 66d32a0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/imaplib.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,8 @@ def file(self):
330330
import warnings
331331
warnings.warn(
332332
'IMAP4.file is unsupported, can cause errors, and may be removed.',
333-
RuntimeWarning)
333+
RuntimeWarning,
334+
stacklevel=2)
334335
return self._file
335336

336337

0 commit comments

Comments
 (0)