classification
Title: The -t option has no effect in for uu command-line
Type: enhancement Stage: patch review
Components: Demos and Tools, Library (Lib) Versions: Python 3.4
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: serhiy.storchaka
Priority: normal Keywords: patch

Created on 2013-09-08 16:28 by serhiy.storchaka, last changed 2019-04-26 20:26 by BreamoreBoy.

Files
File name Uploaded Description Edit
uu_text_mode.patch serhiy.storchaka, 2013-09-08 16:28 review
Messages (2)
msg197279 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-09-08 16:28
The uu module can be run as command-line tool. In Python 2, "uu -t infile outfile" opens input file in text mode, i.e. convert '\r\n' to '\n' on Windows and '\r' to '\n' on Mac Classic, and "uu -d -t infile outfile" opens output file in text mode, i.e. convert '\n' to '\r\n' on Windows and '\n' to '\r' on Mac Classic. In Python 3 this option has no effect.

The proposed patch restores former behavior and extends it. Encoding with -t option now uses universal newlines for reading, and decoding with -t option now converts '\n' to os.linesep for writing. In additional text mode now works with standard input/output.

This change perhaps is too large for the fix of such  insignificant bug and that is why I propose it as a new feature.
msg225039 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-08-07 20:27
Could it be argued that this is a regression so the type should be behavior and not enhancement?
History
Date User Action Args
2019-04-26 20:26:08BreamoreBoysetnosy: - BreamoreBoy
2014-08-07 20:27:55BreamoreBoysetnosy: + BreamoreBoy
messages: + msg225039
2013-09-08 16:28:44serhiy.storchakacreate