◐ Shell
clean mode source ↗

Message 317309 - Python tracker

that's not going to affect http://pytracemalloc.readthedocs.io/api.html#get_traced_memory.  There is no filter for that :)

as to your sum that's exactly what my original callstack lists:
21 memory blocks: 4.7 KiB

this means 21 blocks were not released, and in this case leaked because nothing should be held onto after the first iteration (creating the initial connector in the connection pool.  In the head object case that's going to be a new connector per iteration, however the old one should go away.