| --- a/Lib/fileinput.py Thu Jun 28 01:45:48 2012 +0200 |
| +++ b/Lib/fileinput.py Thu Jun 28 12:21:26 2012 +0300 |
| @@ -224,6 +224,9 @@ |
| if mode not in ('r', 'rU', 'U', 'rb'): |
| raise ValueError("FileInput opening mode must be one of " |
| "'r', 'rU', 'U' and 'rb'") |
| + if 'U' in mode: |
| + warnings.warn("Use of 'U' mode is deprecated", |
| + DeprecationWarning) |
| self._mode = mode |
| if openhook: |
| if inplace: |