Skip to content

Tag Archives: summerofcode

Modules on Windows and last bits of Summer Of Code

I just commited the last lines to make mmap module compile as a shared library (DLL) on our beloved Windows platform.

I first tried porting my implementation of time module to Windows and it was a lot easier than I thought. Ok… easier… let’s go back a moment. I have to be fair to myself and [...]

bz2 module completed

I’ve finished porting the CPython’s bz2 module to ctypes plus PyPy and this was the last module in my SoC proposal

It doesn’t compile yet, for the same reason _ssl doesn’t compile either. PyPy’s rctypes has some limitations in structures and function pointers.

In those days I realized how nice is bzip2 library and how simulating [...]

SSL has come

OpenSSL is a damn beast but I managed to handle it through the ctypes code generator written by Thomas Heller. This code is based upon GCCXML tool. Using the code generator is really straightforward: rhymes@groove ~ % python2.4 h2xml.py ssl.h -o ssl.xml It produces an XML representation of the header to feed to xml2py.py command this way: rhymes@groove [...]

Two days in SSL

I think I’ve found the most complicated library ever. That library is really over-engineered. I spent a whole day trying to understand _ssl.c, wrapping ssl.h and the other headers I need with ctypes codegenerator (doing it manually is insane), writing 400+ lines of initialization code, dealing with the OpenSSL man pages and so on and I [...]

Don’t mess with strptime

mmap module is complete. We (I and I, I guess) still have a problem with special methods. Methods like __xyz__ are not supported by the PyPy’s extension compiler so I had to implement stuff like len(mmap_object) as mmap_object.get_len(). That’s definitely ugly and breaks the compatibility with CPython so keep attention. It also lacks support of slice() objects.

strptime() function [...]

Where I Am (part 2)

time module: – asctime() has been implemented working around the *args limitation – strftime() has been implemented – strptime() is there but it’s the one which breaks the compilation step.

mmap module: – mmap creation: ok. – close(): ok. [...]

Safari SoC account

I just received my O’Reilly Safari-90-day-summerofcode-account!

Yay!

Where I Am

A brief status update:

the time module is almost finished but:

asctime() is masked because of a problem in the extension compiler to handle *args. strftime() and strptime() are not implemented for the same reason.

the fcntl module is basically finished:

ioctl() does not support array.array() instances and buffer() instances but everything else is implemented.

the mmap module has been started [...]

Stuck in the compiler

I’m making progresses to feed the rctime module to the extension compiler. He doesn’t like that much tuples so fixing a couple of tupled line to lists decreased the number of translation errors. Now the translation goes fine but I’m stuck in the compiler process. ctypes doesn’t have a mechanism to explicitly tell that one [...]

PyPy Sprint Day 3

My last sprint day was good but I lost a lot of time around some limitations and a bug that’s actually there (anyway unit tests pass) but I’m fighting to win, so I’ll win

I had the chance to pair with Armin Rigo itself and I think that I learned a lot from him [...]