[issue34729] bz2/lzma: Compressor/decompressor crash if __init__ is not called

2018-09-18 Thread Berker Peksag
Berker Peksag added the comment: We can definitely make the title of that issue more descriptive. Feel free to change it -- IIRC, you don't need additional permissions to change the title of an issue. Thanks! -- ___ Python tracker

[issue34729] bz2/lzma: Compressor/decompressor crash if __init__ is not called

2018-09-18 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Reclosing (browser cache problem). -- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue34729] bz2/lzma: Compressor/decompressor crash if __init__ is not called

2018-09-18 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: I somehow failed to notice #23224 when I searched the tracker. You're right, it's the same, and, moreover, PR 7822 fixes problem with both compressors and decompressors (though it includes tests only for the latter for some reason). I think that this

[issue34729] bz2/lzma: Compressor/decompressor crash if __init__ is not called

2018-09-18 Thread Berker Peksag
Berker Peksag added the comment: I think we usually went with option 1 when we fixed similar issues in the past. See also issue 23224 for the same problem in *Decompressor classes of lzma and bz2 modules. It looks like the attached PR to that issue went with option 2: PR 7822. Perhaps we

[issue34729] bz2/lzma: Compressor/decompressor crash if __init__ is not called

2018-09-18 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : The compressor/decompressor classes from bz2 and lzma modules rely on __init__() for initialization, but it is not guaranteed to be called. Method calls on an uninitialized object crash: >>> from bz2 import BZ2Compressor as C >>> c = C.__new__(C) >>>