◐ Shell
clean mode source ↗

Message 381338 - Python tracker

> The reference leak was introduced in 86ea58149c3 / GH-13159 / bpo-36737. PR GH-20929 fixes it, too.

Usually, it's not that the subinterpreter work introduces new leak, but makes old leak suddenly visible.

The create_filter() leak was introduced way earlier:

commit 9b99747386b690007027c3be2a5d7cfe3d3634f5
Author: Nick Coghlan <ncoghlan@gmail.com>
Date:   Mon Jan 8 12:45:02 2018 +1000

    bpo-31975 (PEP 565): Show DeprecationWarning in __main__ (GH-4458)

It's a minor leak since the create_filter() function is called exactly 5 times at startup. It's a leak of 5 strong references, it's not a big deal :-)