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 loewis
Recipients Christophe Simonis, Garen, amaury.forgeotdarc, arekm, devurandom, doko, eric.araujo, georg.brandl, jreese, lars.gustaebel, leonov, loewis, nicdumz, nikratio, ockham-razor, pitrou, proyvind, rcoyner, thedjatclubrock, vstinner, ysj.ray
Date 2010-10-31.21:35:56
SpamBayes Score 2.81492e-11
Marked as misclassified No
Message-id <4CCDE13B.4010807@v.loewis.de>
In-reply-to <1288558654.91.0.332401754229.issue6715@psf.upfronthosting.co.za>
Content
> LZMAFile, LZMACompressor & LZMADecompressor are all inspired by and
> written to be as similar to bz2's for easier use & maintenance. I
> must admit that I haven't really put much thought into alternate ways
> to implement them beyond monkey see, monkey do.. ;)

My concern really is with LZMAFile only. It uses stdio, and it really
shouldn't - we are trying to drop stdio in Python, as it's causing too
many problems. LZMACompressor/Decompressor may be fine.

> LZMAOptions is a bit awkwardly written, but it doesn't serve
> documentation purposes only, it also exposes these values for max,
> min etc. to python (ie. as used by it's regression tests) and are
> also used when processing various compression options passed.
> 
> IMO it does serve a useful purpose, but certainly wouldn't hurt from
> being rewritten in some better way...

If you are willing to do that, here is what I propose: rename the module
to _lzma, drop options and lzmafile from _lzma. Then write lzma.py,
which re-introduces this Options class in pure Python, as well as
reintroduces LZMAFile, wrapping io.FileIO. The various constants that
go into options should be exposed from _lzma using
PyModule_AddIntConstant (except perhaps for the ones that you define
yourself, such as LZMA_BEST_SPEED)

That assumes, of course, that there is a need to provide backwards
compatibility. I would personally be fine with *just* having the LZMA
symbolic constants exposed, leaving it to the user to determine which
constant serves which purpose (e.g. guessing what LZMA_DICT_SIZE_MIN
and LZMA_DICT_SIZE_MAX do when there is a dict_size keyword parameter
isn't too hard). But then, having the various options explained
in a consistent manner may be useful enough to preserve the Options
class.
History
Date User Action Args
2010-10-31 21:35:59loewissetrecipients: + loewis, georg.brandl, doko, amaury.forgeotdarc, arekm, lars.gustaebel, pitrou, vstinner, nicdumz, eric.araujo, Christophe Simonis, rcoyner, proyvind, nikratio, leonov, devurandom, Garen, ysj.ray, thedjatclubrock, ockham-razor, jreese
2010-10-31 21:35:56loewislinkissue6715 messages
2010-10-31 21:35:56loewiscreate