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 [...]
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 [...]
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 [...]
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 [...]
Filed in Uncategorized
|
Also tagged
|
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 [...]
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.
[...]
Filed in Uncategorized
|
Also tagged
|
I just received my O’Reilly Safari-90-day-summerofcode-account!
Yay!
Filed in Uncategorized
|
Also tagged
|
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 [...]
Filed in Uncategorized
|
Also tagged
|
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 [...]
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 [...]