[New-bugs-announce] [issue34371] File reading gets stuck if you read at eof on macos

Sverrir Berg report at bugs.python.org
Fri Aug 10 07:43:14 EDT 2018


New submission from Sverrir Berg <sab at keilir.com>:

Reading a file that is at eof causes the file reading to halt indefinitely.
1) open() a file and read() everything from it.
2) call read() a second time - reading nothing (this causes the issue).
3) append to the file (using another file handle or manually).
4) try to read it again - read() always returns nothing.

Attached is a a test causing this - works correctly on Ubuntu 2.7.12/3.5.2, macos 3.7.0, macos PyPy 5.10.0 but fails on macos 2.7.10/2.7.15(brew)

I assume the expected behaviour is the same as on the other versions where you can continue to read from the file when it has been appended to?

----------
components: IO
files: readwrite.py
messages: 323365
nosy: sverrirab
priority: normal
severity: normal
status: open
title: File reading gets stuck if you read at eof on macos
type: behavior
versions: Python 2.7
Added file: https://bugs.python.org/file47739/readwrite.py

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


More information about the New-bugs-announce mailing list