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 should be ready to > > merged in the trunk by this week. (question: How should this be done? > > Should I just bundle a set of patches and put on the tracker?) > > Merry Christmas Alex! >
Thanks Christian, merry Christmas to you too! > You could also create a branch. I find a branch more convenient for > large changes like your io optimization. But I'm only a junior core > developer and the seniors or your dictator might think different. ;) > 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/). > > However, I found a little problem which I am not sure how to fix > > properly. Early during the interpreter initialization process, the > > _bytesio and _stringio modules seems to be unavailable for some > > unknown reason. And since io.py is imported before the modules become > > available, this causes io.py to always use the Python version of > > BytesIO and StringIO. So my question is, how should I override > > io.BytesIO and io.StringIO with their optimized C version? My first > > thought is to override the module in site.py, but I am not sure yet if > > this the right thing to do. > > 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. > How would that works? The modules in Module/config.c need to linked to the main binary, no? -- Alexandre _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com