I ran a quick benchmark on Python 3.6: current code (3.6 branch, ref) => PR 4587 (patch):
vstinner@apu$ python3 -m perf compare_to ref.json patch.json
Mean +- std dev: [ref] 597 ns +- 10 ns -> [patch] 830 ns +- 15 ns: 1.39x slower (+39%)
I don't want to backport an optimization to a stable branch, so I prefer to not backport the warnings change on the ignore action to Python 3.6. I rejected my PR 4587.
The bug was fixed in master. I don't want to backport the change to 2.7 nor 3.6, so I close the issue.