]> granicus.if.org Git - python/commit
bpo-33509: Fix _warnings for module_globals=None (GH-6833)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 15 May 2018 20:56:28 +0000 (13:56 -0700)
committerGitHub <noreply@github.com>
Tue, 15 May 2018 20:56:28 +0000 (13:56 -0700)
commit820219f7867f2bbfe0ac4d4f0d1ea1fdef7795a9
tree10b6a98fe790ca90dac1c8ecee359dd82930a41f
parent8717cfeb6b8bebdfe13df0e9268ddd252ab5ecad
bpo-33509: Fix _warnings for module_globals=None (GH-6833)

Don't crash on warnings.warn_explicit() if module_globals is not a dict.
(cherry picked from commit b056562860c227bad2e0ba7cd3130e115c007768)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
Lib/test/test_warnings/__init__.py
Misc/NEWS.d/next/Core and Builtins/2018-05-14-17-31-02.bpo-33509.pIUfTd.rst [new file with mode: 0644]
Python/_warnings.c