summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/mock.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-07-21 11:28:55 (GMT)
committerGitHub <noreply@github.com>2017-07-21 11:28:55 (GMT)
commitbb323b261d0f41ad6998d3a16c41b29b3bb8e982 (patch)
tree244cd6bd19cd4dc938c2037ed38f66f6b7275f59 /Lib/unittest/mock.py
parentdf5837b5a916aac645087ae02c44e88ff77024ef (diff)
downloadcpython-bb323b261d0f41ad6998d3a16c41b29b3bb8e982.zip
cpython-bb323b261d0f41ad6998d3a16c41b29b3bb8e982.tar.gz
cpython-bb323b261d0f41ad6998d3a16c41b29b3bb8e982.tar.bz2
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)
Diffstat (limited to 'Lib/unittest/mock.py')
0 files changed, 0 insertions, 0 deletions