[Python-checkins] [python/cpython] bb323b: bpo-30891: Fix again importlib _find_and_load() (#...

GitHub noreply at github.com
Fri Jul 21 07:28:57 EDT 2017


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

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

  Log Message:
  -----------
  bpo-30891: Fix again importlib _find_and_load() (#2665) (#2801)

Use sys.modules.get() in the "with _ModuleLockManager(name):" block
to protect the dictionary key with the module lock and use an atomic
get to prevent race condition.

Remove also _bootstrap._POPULATE since it was unused
(_bootstrap_external now has its own _POPULATE object), add a new
_SENTINEL object instead.
(cherry picked from commit e72b1359f81d1dd42bd8a5c5cc2b3928b74f8023)




More information about the Python-checkins mailing list