This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ocean-city
Recipients ocean-city, zmedico
Date 2009-02-27.10:04:48
SpamBayes Score 1.4840553e-05
Marked as misclassified No
Message-id <1235729091.23.0.51301859708.issue5380@psf.upfronthosting.co.za>
In-reply-to
Content
This OSError(5) happens when we tries to read from pty after data runs out.
So simple_test_2.py fails with same error even if we don't use io module.

Modules/posixmodule.c (posix_read) simply calls read(2) once, but io module

    while avail < n:
        chunk = self.raw.read(wanted)
        if chunk in empty_values:
            nodata_val = chunk
            break
        avail += len(chunk)
        chunks.append(chunk)

chunk is shorter than wanted (data runs out), but not empty, so io
module's read tries to read again => error happens.

I said this is io module's bug, but now I'm not sure.
History
Date User Action Args
2009-02-27 10:04:51ocean-citysetrecipients: + ocean-city, zmedico
2009-02-27 10:04:51ocean-citysetmessageid: <1235729091.23.0.51301859708.issue5380@psf.upfronthosting.co.za>
2009-02-27 10:04:49ocean-citylinkissue5380 messages
2009-02-27 10:04:48ocean-citycreate