[Python-3000] Weird truncate() behavior.

2007-12-26 Thread Alexandre Vassalotti
I have been working on lately on a small semantic to the truncate() method of file objects -- i.e., make file.truncate(pos) imply a seek to the given argument. I thought I had it all working, but I found out that one test was failing -- testTruncateOnWindows in test_file. Tried to fix it by myself,

[Python-3000] [OT] Mercurial [was: How to override io.BytesIO ...]

2007-12-26 Thread Stephen J. Turnbull
Brett Cannon writes: > It is nice. Once Mercurial hits version 1.0 I am going to look at > whether it is reasonable to move Python to hg or bzr to make it easier > for people to do development on their own machines with local checkins > instead of forcing people who can't create a branch to c

Re: [Python-3000] How to override io.BytesIO and io.StringIO with their optimized C version?

2007-12-26 Thread Brett Cannon
On Dec 26, 2007 2:40 PM, Christian Heimes <[EMAIL PROTECTED]> wrote: > Alexandre Vassalotti wrote: > > Well, I been working on branches since the beginning. Although, I now > > use Mercurial (which is lovely IMHO) to keep my changes (url: > > http://peadrop.com/alex-py3k/). > > Someday I need to pl

Re: [Python-3000] How to override io.BytesIO and io.StringIO with their optimized C version?

2007-12-26 Thread Christian Heimes
[EMAIL PROTECTED] wrote: > Assuming they aren't huge I don't see any real problem linking them into the > interpreter's binary image. A few other modules are handled that way (sys, > marshal, etc). Both modules look small to me. They are just about 18k of C code each and they contain lots of comm

Re: [Python-3000] How to override io.BytesIO and io.StringIO with their optimized C version?

2007-12-26 Thread skip
> "Alexaandre" == Alexandre Vassalotti <[EMAIL PROTECTED]> writes: >> How did you register the optimized versions? Did you add them to >> _PyImport_Inittab in Modules/config.c? Modules in _PyImport_Inittab >> are available before the io module is loaded. Alexaandre> How would

Re: [Python-3000] How to override io.BytesIO and io.StringIO with their optimized C version?

2007-12-26 Thread Christian Heimes
Alexandre Vassalotti wrote: > Well, I been working on branches since the beginning. Although, I now > use Mercurial (which is lovely IMHO) to keep my changes (url: > http://peadrop.com/alex-py3k/). Someday I need to play with Hg. It looks interesting and I've heard only good about it. > How would

Re: [Python-3000] How to override io.BytesIO and io.StringIO with their optimized C version?

2007-12-26 Thread Alexandre Vassalotti
On Dec 26, 2007 4:50 PM, Christian Heimes <[EMAIL PROTECTED]> wrote: > Alexandre Vassalotti wrote: > > I started to play again with the _bytesio and _stringio modules I > > created, during last summer. Right now, I am mostly porting my changes > > to the current trunk. If all goes well, the modules

Re: [Python-3000] How to override io.BytesIO and io.StringIO with their optimized C version?

2007-12-26 Thread Christian Heimes
Alexandre Vassalotti wrote: > I started to play again with the _bytesio and _stringio modules I > created, during last summer. Right now, I am mostly porting my changes > to the current trunk. If all goes well, the modules should be ready to > merged in the trunk by this week. (question: How should

[Python-3000] How to override io.BytesIO and io.StringIO with their optimized C version?

2007-12-26 Thread Alexandre Vassalotti
I started to play again with the _bytesio and _stringio modules I created, during last summer. Right now, I am mostly porting my changes to the current trunk. If all goes well, the modules should be ready to merged in the trunk by this week. (question: How should this be done? Should I just bundle