New submission from Guido van Rossum: imp.lock_held() returns True if *any* thread is currently importing something. I'd like to have an API that can tell whether the *current* thread has the import lock. The implementation keeps track of this, but doesn't make the info available.
Use case: print a warning/error if a network call is made during import. ---------- components: Library (Lib) messages: 232792 nosy: gvanrossum priority: normal severity: normal stage: needs patch status: open title: Add a way to determine if the current thread has the import lock type: enhancement versions: Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23068> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com