Merlijn van Deen <valhallasw@gmail.com> added the comment: First off, thank you for your response.
The existence of an import lock is deliberately omitted from the text, and the reader is supposed to abide by the restriction as written regardless of the motivation behind it.
The entire notion of an import lock is obsolete. Python 3.3 does not have that anymore.
" This warning is still valid but for a different reason " or " this warning is no longer valid in 3.3 "? Assuming the first (which is what I guess based on the fact the deadlock still occurs in 3.3), I think the text can still be improved; the current wording suggests to me a) it's OK to wait for a thread as long as you did not create it and b) it's OK to import something that waits for a thread as long as you do it from the main module - while both cases can still lead to a deadlock. so, leaving the implementation details out, this is my suggestion: "Firstly, an import should not have the side effect of waiting for a thread in any way. This can lead to a deadlock if that thread directly or indirectly attempts to import a module." ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue15097> _______________________________________