Issue #15204: Silence and check the 'U' mode deprecation warnings in tests.

Changed deprecation message in the fileinput module.
This commit is contained in:
Serhiy Storchaka 2013-11-24 23:13:26 +02:00
parent ed8c906127
commit 2480c2ed59
5 changed files with 33 additions and 13 deletions

View file

@ -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: