◐ Shell
clean mode source ↗

Message 75269 - Python tracker

Looking at Python/import.c:find_module, fixing this will require
changing the setting of __path__ for frozen packages and how frozen
modules are found. The former will require changing
PyImport_ImportFrozenModule() to use a list instead of a string for the
packages.

To make the change work for find frozen modules, find_module() will need
to change. Basically the special-casing for 'path' around frozen module
just needs to go. This will lead to a slight performance penalty as all
imports will require checking for an equivalent frozen module, but since
it is a strcmp in a loop it should not be too bad.

The performance cost can go away if some strapping young lad happens to
re-implement import in such a way that the frozen module parts can
easily be left out. =)

Setting as a release blocker for now in case Barry is willing to let
this go into 3.0rc4.