[issue39430] tarfile.open(mode="r") race condition when importing lzma
Ethan Furman
report at bugs.python.org
Fri Jan 24 13:06:10 EST 2020
Ethan Furman <ethan at stoneleaf.us> added the comment:
Brett:
------
> It's covered in the language reference where import semantics are
> explained. It isn't explicitly called out in higher-level docs that
> I'm aware of because it only really comes up in edge cases like
> importing in a thread which we actively discourage unless there's a
> compelling reason not to.
When was this change made? Assuming it is, in fact, a change. It seems like most of the stdlib could be called in a thread, so the practice of lazily importing a module wholesale might need to be audited and proactively fixed. Maybe that could be a newcomer's easy(ish) project?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39430>
_______________________________________
More information about the Python-bugs-list
mailing list