> OK, I think I might have a solution, and it is really stupid. I will
> run the unit test suite to see if it really fixes everything.
Here's keeping my fingers crossed.
I do note that the new code still leaks the encoding string which is
malloc'ed in PyTokenizer_FindEncoding but never freed by
call_find_module.
BTW, the test_inspect failure I saw was shallow; I'd renamed the
parent directory and the failure was due to the wrong filename being
baked into the .pyc file. The other 5 failures are all related to the
issue you are chasing here.