[3.6] bpo-27535: Fix memory leak with warnings ignore (GH-4489) by miss-islington · Pull Request #4587 · python/cpython

@vstinner @miss-islington

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

@ghost ghost mentioned this pull request

Sep 12, 2022