[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-24 Thread Maciej Gol
Maciej Gol added the comment: This is a HUGE eye opener! Didn't know of that 'import' vs 'from x import y' difference. Thanks a lot! Is it documented somewhere ? pt., 24 sty 2020, 15:08 użytkownik Serhiy Storchaka napisał: > > Serhiy Storchaka added the comment: > > It

[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-24 Thread Maciej Gol
Maciej Gol added the comment: By the way, thanks a lot for the fix <3 -- ___ Python tracker <https://bugs.python.org/issue39430> ___ ___ Python-bugs-list mai

[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-24 Thread Maciej Gol
Maciej Gol added the comment: > PR 18161 fixes race condition by using "from ... import ..." > which waits until the module be completely initialized if the specified > names are not set. Correct me if I'm wrong, but I think the behavior of 'import lzma' in this case

[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-23 Thread Maciej Gol
Maciej Gol added the comment: Uploading fixed file (the former had a typo) -- Added file: https://bugs.python.org/file48861/test.py ___ Python tracker <https://bugs.python.org/issue39

[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-23 Thread Maciej Gol
Change by Maciej Gol : Removed file: https://bugs.python.org/file48860/test.py ___ Python tracker <https://bugs.python.org/issue39430> ___ ___ Python-bugs-list mailin

[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-23 Thread Maciej Gol
New submission from Maciej Gol : Hey guys, We have a component that archives and unarchives multiple files in separate threads that started to misbehave recently. We have noticed a bunch of `AttributeError: module 'lzma' has no attribute 'LZMAFile'` errors, which are unexpected because our