]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-29620: iterate over a copy of sys.modules (GH-4800)
authorkernc <kerncece@gmail.com>
Thu, 11 Jun 2020 18:03:29 +0000 (20:03 +0200)
committerGitHub <noreply@github.com>
Thu, 11 Jun 2020 18:03:29 +0000 (14:03 -0400)
commit46398fba4d66ad342cf2504ef947b5fb857423b2
tree307f5e4c871dff3f0b83b8e930b61fddaf362993
parent436b648910c27baf8164a6d46d746d36d8a93478
bpo-29620: iterate over a copy of sys.modules (GH-4800)

unittest.TestCase.assertWarns no longer raises a RuntimeException
when accessing a module's ``__warningregistry__`` causes importation of a new
module, or when a new module is imported in another thread.

Patch by Kernc.
Lib/unittest/case.py
Lib/unittest/test/test_case.py
Misc/NEWS.d/next/Library/2018-08-21-16-20-33.bpo-29620.xxx666.rst [new file with mode: 0644]