New submission from Seth Sims <seth.s...@gmail.com>:

_TemporaryFileWrapper does not proxy __next__ to the underlying file object. 
There was a discussion on the mailing list in 2016 mentioning this, however it 
seems it was dropped without a consensus. Biopython encountered this issue 
(referenced below) and we agree it violates our assumptions about how the 
NamedTemporaryFile should work. I think it would be fairly trivial to fix by 
just returning `self.file.readline()`

mailing list thread: 
https://mail.python.org/pipermail/python-list/2016-July/862590.html

biopython discussion: https://github.com/biopython/biopython/pull/3031

----------
components: Library (Lib)
messages: 373467
nosy: Seth Sims
priority: normal
severity: normal
status: open
title: NamedTemporaryFile is not its own iterator.
type: behavior
versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41270>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to