[issue23224] LZMADecompressor object is only initialized in __init__

2018-06-21 Thread STINNER Victor
STINNER Victor added the comment: Calling directly __new__() is very unusual, so I'm not surprised that you found bugs. Calling __init__() twice is also an unusal practice. I concur with Serhiy: implementing new instead of init should prevent such bug. I recall that some objects decided inst

[issue23224] LZMADecompressor object is only initialized in __init__

2018-06-20 Thread Zackery Spytz
Change by Zackery Spytz : -- nosy: +ZackerySpytz versions: +Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue23224] LZMADecompressor object is only initialized in __init__

2018-06-20 Thread Zackery Spytz
Change by Zackery Spytz : -- pull_requests: +7430 stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mai

[issue23224] LZMADecompressor object is only initialized in __init__

2017-10-23 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +Oren Milman versions: -Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue23224] LZMADecompressor object is only initialized in __init__

2016-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is not the only issue. Calling __init__ multiple times causes leaking locks, bz2/lzma internal buffers, etc. It looks to me that the most straightforward way is using __new__ instead of __init__. -- versions: +Python 3.6, Python 3.7 -Python 3.4

[issue23224] LZMADecompressor object is only initialized in __init__

2016-12-01 Thread Aaron Hill
Aaron Hill added the comment: I've upload a patch which should address the issue in both the lzma and bz2 modules. -- keywords: +patch nosy: +Aaron1011 Added file: http://bugs.python.org/file45730/fix-lzma-bz2-segfaults.patch ___ Python tracker

[issue23224] LZMADecompressor object is only initialized in __init__

2015-02-21 Thread Martin Panter
Martin Panter added the comment: Similar situation in the bzip module: >>> BZ2Decompressor.__new__(BZ2Decompressor).decompress(bytes()) Segmentation fault (core dumped) -- ___ Python tracker __

[issue23224] LZMADecompressor object is only initialized in __init__

2015-01-12 Thread Martin Panter
Martin Panter added the comment: A patch for this might conflict with the LZMA patch for Issue 15955, so it would be simplest to wait for that issue to be resolved first -- ___ Python tracker _

[issue23224] LZMADecompressor object is only initialized in __init__

2015-01-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +nadeem.vawda, serhiy.storchaka stage: -> needs patch versions: +Python 3.5 ___ Python tracker ___ ___

[issue23224] LZMADecompressor object is only initialized in __init__

2015-01-11 Thread Martin Panter
New submission from Martin Panter: Noticed in a patch review around LZMModules/_lzmamodule.c:1055 that the C-level LZMADecompressor object is being initialized in an __init__() method. It crashes if you create the object with __new__() and never call __init__(): >>> from lzma import LZMADecomp