lzma implementation by arihant2math · Pull Request #5717 · RustPython/RustPython
Based on #5709 because of the zlib abstraction.
This turned out surprisingly effective, about 2/3s of the tests pass, which is enough for me at the moment. The main missing parts involve a bunch of unsafe things that xz2 doesn't really support (to my knowledge atleast).
As a side note I also abstracted out Compressor like Decompressor was abstracted
arihant2math
changed the title
Lzma implementation
lzma implementation
Would you be able to squash these commits down? Ideally into one for copying the files from cpython, and one for all the rest?
| elif comptype == "xz": | ||
| try: | ||
| import lzma | ||
| # TODO: RUSTPYTHON remove underscore |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this name changed to raise ImportError? What happens if it is lzma?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, if left as is everything breaks because lzma is expected to be unimportable.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xz seems to be not support. Added reason and avoided to use fake module name
oh no.. I thought #5728 and this one had shared work of the new compression module
@arihant2math What will be the best way? Is it worth to keep #5728?
if yes, the conflict need to be resolve.
if not, reverting it and merging this can be a way.