Issue 35936: Give modulefinder some much-needed updates. (original) (raw)

I've written a patch here that includes a few useful fixes. Namely:

With the exception of these bug fixes, I've been very careful to preserve the original behavior, and have not changed any part of the API. This patch also includes 2 new regression tests.

Alright, I've gotten all of the tests passing for the new importlib-only implementation. I broke these modifications out into a new private function, _find_module, to make it clear that this fix is a simple drop-in replacement for imp.find_module.

Let me know if there's anything I've missed or could improve. Otherwise, I feel my work here is done!