[Python-checkins] [python/cpython] fe6e68: bpo-30891: Fix importlib _find_and_load() race con...

GitHub noreply at github.com
Mon Jul 10 17:16:28 EDT 2017


  Branch: refs/heads/3.6
  Home:   https://github.com/python/cpython
  Commit: fe6e686c27ce3a3ecdf03803cff7e230dee5530d
      https://github.com/python/cpython/commit/fe6e686c27ce3a3ecdf03803cff7e230dee5530d
  Author: Victor Stinner <victor.stinner at gmail.com>
  Date:   2017-07-10 (Mon, 10 Jul 2017)

  Changed paths:
    M Lib/importlib/_bootstrap.py
    M Python/import.c
    M Python/importlib.h

  Log Message:
  -----------
  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 4f9a446f3fb42f800e73cd9414dd1eccb3ca4fa7)




More information about the Python-checkins mailing list