]> granicus.if.org Git - python/commit
bpo-27535: Fix memory leak with warnings ignore (#4489)
authorVictor Stinner <victor.stinner@gmail.com>
Mon, 27 Nov 2017 15:57:07 +0000 (16:57 +0100)
committerGitHub <noreply@github.com>
Mon, 27 Nov 2017 15:57:07 +0000 (16:57 +0100)
commitc9758784eb321fb9771e0bc7205b296e4d658045
tree1436050bd6f4c967283112fd0fa7b6ffe96af2b0
parent21c7730761e2a768e33b89b063a095d007dcfd2c
bpo-27535: Fix memory leak with warnings ignore (#4489)

The warnings module doesn't leak memory anymore in the hidden
warnings registry for the "ignore" action of warnings filters.

The warn_explicit() function doesn't add the warning key to the
registry anymore for the "ignore" action.
Lib/test/test_warnings/__init__.py
Lib/warnings.py
Misc/NEWS.d/next/Library/2017-11-21-16-05-35.bpo-27535.JLhcNz.rst [new file with mode: 0644]
Python/_warnings.c