classification
Title: C BufferedReader seek() is inconsistent with UnsupportedOperation for unseekable streams
Type: behavior Stage: resolved
Components: IO Versions: Python 3.2, Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: haypo, jcon, pitrou, python-dev
Priority: normal Keywords: patch

Created on 2011-10-01 22:32 by jcon, last changed 2011-10-04 10:39 by pitrou. This issue is now closed.

Files
File name Uploaded Description Edit
unseekable.patch jcon, 2011-10-01 22:32 fix + tests review
Messages (3)
msg144751 - (view) Author: John O'Connor (jcon) Date: 2011-10-01 22:32
The C implementation of BufferedReader.seek() does not throw an UnsupportedOperation exception when its underlying stream is unseekable IF the current buffer can accommodate the seek in memory. It probably saves a few cycles for the seekable streams but, I think currently, it is inconsistent with the _pyio implementation and documentation.
msg144868 - (view) Author: Roundup Robot (python-dev) Date: 2011-10-04 10:33
New changeset d287f0654349 by Antoine Pitrou in branch '3.2':
Issue #13087: BufferedReader.seek() now always raises UnsupportedOperation
http://hg.python.org/cpython/rev/d287f0654349

New changeset 0cf38407a3a2 by Antoine Pitrou in branch 'default':
Issue #13087: BufferedReader.seek() now always raises UnsupportedOperation
http://hg.python.org/cpython/rev/0cf38407a3a2
msg144870 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-10-04 10:39
Committed, thanks!
History
Date User Action Args
2011-10-04 10:39:17pitrousetstatus: open -> closed
resolution: fixed
messages: + msg144870

stage: resolved
2011-10-04 10:33:01python-devsetnosy: + python-dev
messages: + msg144868
2011-10-01 22:32:48jconcreate