[New-bugs-announce] [issue36865] FileInput does not allow 'rt' mode, but all its existing delegates do

Nathaniel Gaertner report at bugs.python.org
Thu May 9 09:22:23 EDT 2019


New submission from Nathaniel Gaertner <natgaertner at gmail.com>:

While looking at https://bugs.python.org/issue5758 I noticed that 'rt' support had been added to gzip and bz2 in 3.3, but FileInput still limited its mode options to 'r', 'rb', 'rU', and 'U'. It seems like 'rt' should be just fine here as well, and would help clarify issue 5758, since 'r' defaults to 'rt' for open(...) but defaults to 'rb' for gzip and bz2.

I wrote up the code and modified the mode unit test to try every allowed mode. I'll attach a PR to this once I have it ready.

----------
components: Library (Lib)
messages: 341978
nosy: natgaertner
priority: normal
severity: normal
status: open
title: FileInput does not allow 'rt' mode, but all its existing delegates do
type: enhancement
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36865>
_______________________________________


More information about the New-bugs-announce mailing list