Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 5330af45f777 by Antoine Pitrou in branch '3.2':
Issue #12213: Fix a buffering bug with interleaved reads and writes that
http://hg.python.org/cpython/rev/5330af45f777
New changeset d7f6391954cf by Antoine Pitrou in
STINNER Victor victor.stin...@haypocalc.com added the comment:
You should not use BufferedRWPair with the same underlying stream (that's the
whole point of BufferedRWPair).
It might be documented. Something like Warning: don't use the same
stream as reader and writer, or the BufferedRWPair
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset cf2010e9f941 by Antoine Pitrou in branch '2.7':
Issue #12213: Fix a buffering bug with interleaved reads and writes that
http://hg.python.org/cpython/rev/cf2010e9f941
--
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
title: BufferedRandom, BufferedRWPair: issues with interlaced read-write -
BufferedRandom, BufferedRWPair: issues with interlaced read-write
___
Python tracker
Antoine Pitrou pit...@free.fr added the comment:
I think your expectations for BufferedRWPair are wrong. You should not use
BufferedRWPair with the same underlying stream (that's the whole point of
BufferedRWPair).
--
___
Python tracker
Antoine Pitrou pit...@free.fr added the comment:
Here is a patch.
--
stage: - patch review
Added file: http://bugs.python.org/file22950/bufrandom.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12213
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12213
___
Changes by Antoine Pitrou pit...@free.fr:
--
priority: normal - critical
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12213
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
My patch tries to fix interlaced read-write by always calling flush(),
Why do you need to call flush()? Can't you read from the buffer?
Hum, my patch does not always call flush of the reader and the writer. On read,
it flushs
Changes by Santoso Wijaya santoso.wij...@gmail.com:
--
nosy: +santa4nt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12213
___
___
Antoine Pitrou pit...@free.fr added the comment:
My patch tries to fix interlaced read-write by always calling flush(),
Why do you need to call flush()? Can't you read from the buffer?
--
___
Python tracker rep...@bugs.python.org
Changes by STINNER Victor victor.stin...@haypocalc.com:
--
title: BufferedRandom: write(); read() gives different result using io and
_pyio - BufferedRandom, BufferedRWPair: issues with interlaced read-write
___
Python tracker rep...@bugs.python.org
STINNER Victor victor.stin...@haypocalc.com added the comment:
io_interlaced_read_write.patch:
- add interlaced read/write tests for BufferedRandom and BufferedRWPair
- _pyio: move undo readahead code into BufferedReader.flush()
- io: BufferedRandom.flush() doesn't undo readahead if the write
STINNER Victor victor.stin...@haypocalc.com added the comment:
See also issue #12215: TextIOWrapper has also issues on interlaced read-write.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12213
Changes by STINNER Victor victor.stin...@haypocalc.com:
--
versions: +Python 2.7, Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12213
___
15 matches
Mail list logo