]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-29620: iterate over a copy of sys.modules (GH-4800) (GH-20817)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 11 Jun 2020 18:34:42 +0000 (11:34 -0700)
committerGitHub <noreply@github.com>
Thu, 11 Jun 2020 18:34:42 +0000 (14:34 -0400)
commitf881c869753fb2b1b7aef353416893190251c539
treef3fa819f05fb4bc2cae6132c121c56a81610ccdf
parent049039832da3d02592d680cebf71ab8a665a6564
bpo-29620: iterate over a copy of sys.modules (GH-4800) (GH-20817)

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.
(cherry picked from commit 46398fba4d66ad342cf2504ef947b5fb857423b2)

Co-authored-by: kernc <kerncece@gmail.com>
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]