This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amaury.forgeotdarc
Recipients Christophe Simonis, Garen, amaury.forgeotdarc, arekm, devurandom, doko, eric.araujo, jreese, lars.gustaebel, leonov, loewis, nicdumz, nikratio, ockham-razor, pitrou, proyvind, rcoyner, thedjatclubrock, vstinner, ysj.ray
Date 2010-10-27.23:40:39
SpamBayes Score 3.8857806e-16
Marked as misclassified No
Message-id <1288222843.13.0.608899648083.issue6715@psf.upfronthosting.co.za>
In-reply-to
Content
As promised, here is a quick review of the module.
https://code.launchpad.net/~proyvind/pyliblzma/py3k looks ready for a new entry in the PyPI, but for inclusion in core python it needs some cleanup:

- I suppose that src/pyliblzma.c is the only interesting file. In CPython it will be named Modules/lzmamodule.c
- There are some calls to malloc(), calloc() and free() that are incorrect (there is even a call to free() on a PyObject*!); in any case, functions like PyMem_Malloc() are preferred.
- please don't use alloca (and it has another name on Windows)
- snprintf is not available everywhere; use PyOS_snprintf instead.
- The module does not compile on Windows: types like uint8_t don't exist,  __attribute__((unused)) is GCC-specific.
- Don't use PyBytesObject*; PyObject* is enough and avoids many casts.
- PyLong_FromLong(LZMA_FILTER_LZMA1) truncates the value on 32bit platforms
- You could use LZMA_VERSION_STRING to fill the version attribute.

Also, I did not find any documentation.
Otherwise the code follows CPython conventions and is easy to read. Good job!

3.2beta1 is scheduled for November 13, 2010, and no new feature will be accepted after. Do you think you can update it before the limit? otherwise the package could live in PyPI before it is shipped with Python.
History
Date User Action Args
2010-10-27 23:40:43amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, loewis, doko, arekm, lars.gustaebel, pitrou, vstinner, nicdumz, eric.araujo, Christophe Simonis, rcoyner, proyvind, nikratio, leonov, devurandom, Garen, ysj.ray, thedjatclubrock, ockham-razor, jreese
2010-10-27 23:40:43amaury.forgeotdarcsetmessageid: <1288222843.13.0.608899648083.issue6715@psf.upfronthosting.co.za>
2010-10-27 23:40:41amaury.forgeotdarclinkissue6715 messages
2010-10-27 23:40:39amaury.forgeotdarccreate