bpo-30891: Fix importlib _find_and_load() race condition (#2646) (#2651)

* Rewrite importlib _get_module_lock(): it is now responsible to hold
  the imp lock directly.
* _find_and_load() now holds the module lock to check if name is in
  sys.modules to prevent a race condition
(cherry picked from commit 4f9a446f3f)
This commit is contained in:
Victor Stinner 2017-07-10 23:16:27 +02:00 committed by GitHub
parent 044e156426
commit fe6e686c27
3 changed files with 1551 additions and 1561 deletions

File diff suppressed because it is too large Load diff