Antoine Pitrou [EMAIL PROTECTED] added the comment:
Since nothing happened for almost one month here, perhaps it would be
better to merge Alexandre's changes as they are? We'll see quickly if
unexpected things happen :-)
It would also allow to progress on other issues, e.g. #2523.
Also, I
Brett Cannon [EMAIL PROTECTED] added the comment:
Alexandre, you have until the end of the week to commit it or someone else
will. =) I don't want this going in so close to the alphas, but it should
go in almost immediately afterwards.
__
Tracker [EMAIL
Antoine Pitrou [EMAIL PROTECTED] added the comment:
By the way, is someone already working on a C-accelerated TextIO?
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
__
___
Alexandre Vassalotti [EMAIL PROTECTED] added the comment:
Patch committed in r62778.
Antoine wrote:
Also, I stand by the suggestion I made about the resizing logic, but it
shouldn't be a showstopper either. We can improve that later.
I made your suggested change to the resizing logic. Thanks
Guido van Rossum [EMAIL PROTECTED] added the comment:
Do I need to look at this, or is the review going well without my
interference?
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
__
Alexandre Vassalotti [EMAIL PROTECTED] added the comment:
Hi Guido,
The patch changes a minor things to io.py to allow io.BytesIO to pass my
test suite, so you may want to check it out. Other than that, I think
the review is going fine.
__
Tracker [EMAIL
Christian Heimes [EMAIL PROTECTED] added the comment:
I'm going to review the patch later. How are we going to back port the
stuff to 2.6?
--
nosy: +tiran
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
__
Christian Heimes [EMAIL PROTECTED] added the comment:
Hey Alexandre!
The latest patch doesn't apply cleanly. Please provide a new patch.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
__
Alexandre Vassalotti [EMAIL PROTECTED] added the comment:
Here's an updated patch.
Added file: http://bugs.python.org/file10023/bytesio+misc-fixes-7.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
__
Alexandre Vassalotti [EMAIL PROTECTED] added the comment:
Oops, I forgot again to svn add the new files.
Added file: http://bugs.python.org/file10024/bytesio+misc-fixes-8.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
Changes by Alexandre Vassalotti [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file10023/bytesio+misc-fixes-7.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
__
Changes by Antoine Pitrou [EMAIL PROTECTED]:
--
type: - performance
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
__
___
Python-bugs-list mailing list
Antoine Pitrou [EMAIL PROTECTED] added the comment:
Alexandre, is it normal that the unit tests look much less complete in
your latest patch than they were in the previous one?
Also, they don't test the Python fallback implementation anymore.
__
Tracker [EMAIL
Alexandre Vassalotti [EMAIL PROTECTED] added the comment:
Oops, I forgot to include the unit tests, with svn add, when I made
the diff.
Added file: http://bugs.python.org/file9904/bytesio+misc-fixes-5.patch
__
Tracker [EMAIL PROTECTED]
Alexandre Vassalotti [EMAIL PROTECTED] added the comment:
There is a small bug in the last patch I posted. The unit tests assumed
(wrongly) that accelerator module for io.StringIO (i.e., _stringio) was
present.
Added file: http://bugs.python.org/file9905/bytesio+misc-fixes-6.patch
Antoine Pitrou [EMAIL PROTECTED] added the comment:
Ok I took a detailed look at _bytesio.c.
In write_bytes() there is the following resizing logic:
if (self-pos + len self-string_size) {
if (resize_buffer(self, self-pos + len) 0)
return -1;
}
Replacing
Antoine Pitrou [EMAIL PROTECTED] added the comment:
One last thing: you probably noticed it, but there is one test which
needs correcting in test_StringIO. It's due to the fact that calling
next() on a closed BytesIO object raises ValueError now rather than
StopIteration.
Alexandre Vassalotti [EMAIL PROTECTED] added the comment:
I think that check in write_bytes() is a guard to avoid resize_buffer()
from truncating the string stored in the buffer. However, I am not sure
if it is still necessary.
I don't know why help() doesn't work on BytesIO instances. But, the
Antoine Pitrou [EMAIL PROTECTED] added the comment:
Well, by construction self-buf_size should always be greater than
self-string_size, so I don't think there's any risk of truncating
anything here.
I tried the change, and the tests still ran fine.
__
Tracker
Antoine Pitrou [EMAIL PROTECTED] added the comment:
From a quick glance: I may be wrong, but it looks like in
bytesio_writelines(), you'll have some reference leaks if the `while`
loop exits early because bytesio_write() returns NULL; `item` and `it`
should be decred'ed before returning.
Changes by Alexandre Vassalotti [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file9084/_bytesio.c
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
__
___
Changes by Alexandre Vassalotti [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file9085/add-bytesio-setup.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
__
Changes by Alexandre Vassalotti [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file9086/swap-initstdio-initsite.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
__
Changes by Alexandre Vassalotti [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file9088/remove-old-stringio-test.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
__
Changes by Alexandre Vassalotti [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file9089/truncate-semantic-change.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
__
Changes by Alexandre Vassalotti [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file9090/io-misc-fixes.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
__
___
Alexandre Vassalotti [EMAIL PROTECTED] added the comment:
Yes, that was a leak. It should be fixed now.
Merci Antoine!
Added file: http://bugs.python.org/file9899/bytesio+misc-fixes-4.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
Georg Brandl [EMAIL PROTECTED] added the comment:
Bumping priority so that this gets reviewed before next release.
--
nosy: +georg.brandl
priority: normal - critical
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
Alexandre Vassalotti [EMAIL PROTECTED] added the comment:
Here is a patch against the latest trunk (r61578) that includes the
accelerator module of io.BytesIO with its test suite. The patch also
changes the behavior of the truncate method to imply a seek(). Please
review!
Added file:
Guido van Rossum added the comment:
Any chance of uploading a single patch that contains all these changes?
The profile tests often fail when io.py changes because they happen to
depend on golden output which includes line numbers of code in io.py
that happens to be traced during the test. I
Alexandre Vassalotti added the comment:
So, here's one big patch. I have updated the behavior of close(), so that
The profile tests often fail when io.py changes because they happen to
depend on golden output which includes line numbers of code in io.py
that happens to be traced during the
Alexandre Vassalotti added the comment:
[grrr, I eat my words]
So, here's one big patch. I have updated the behavior of close(), so that
... it matches the behavior of 2.x.
As a side-effect, this make __next__ raises a
ValueError, instead of StopIteration.
... when the file is closed.
Changes by Alexandre Vassalotti:
Removed file: http://bugs.python.org/file9096/bytesio+misc-fixes.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
__
___
Alexandre Vassalotti added the comment:
I got a patch that also fixes the profiler tests. That was easy after
all. :-)
Added file: http://bugs.python.org/file9099/bytesio+misc-fixes-2.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
New submission from Alexandre Vassalotti:
Finally, here is my C implementation of BytesIO. The code is well tested
and include the proper unit tests. The only remaining issues are:
- The behavior of the close() method.
- The failure of test_profile and test_cProfile.
Currently, I have no
Changes by Alexandre Vassalotti:
Added file: http://bugs.python.org/file9085/add-bytesio-setup.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
__
___
Python-bugs-list
Changes by Alexandre Vassalotti:
Added file: http://bugs.python.org/file9086/swap-initstdio-initsite.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
__
___
Changes by Alexandre Vassalotti:
Added file: http://bugs.python.org/file9087/test_memoryio.py
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
__
___
Python-bugs-list
Changes by Alexandre Vassalotti:
Added file: http://bugs.python.org/file9088/remove-old-stringio-test.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
__
___
Changes by Alexandre Vassalotti:
Added file: http://bugs.python.org/file9089/truncate-semantic-change.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
__
___
Changes by Alexandre Vassalotti:
--
nosy: +brett.cannon
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
__
___
Python-bugs-list mailing list
Unsubscribe:
41 matches
Mail list logo