mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
Issue #15204: Silence and check the 'U' mode deprecation warnings in tests.
Changed deprecation message in the fileinput module.
This commit is contained in:
parent
ed8c906127
commit
2480c2ed59
5 changed files with 33 additions and 13 deletions
|
@ -224,7 +224,7 @@ class FileInput:
|
|||
"'r', 'rU', 'U' and 'rb'")
|
||||
if 'U' in mode:
|
||||
import warnings
|
||||
warnings.warn("Use of 'U' mode is deprecated",
|
||||
warnings.warn("'U' mode is deprecated",
|
||||
DeprecationWarning, 2)
|
||||
self._mode = mode
|
||||
if openhook:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue