| Newsgroups |
gmane.comp.python.import |
| Message-ID |
<[email protected]> |
>> In any case, do note that returning something else than either a loader
>> or None already breaks the API, AFAICT. Existing code calling
>> find_module() will have to be adapted... Which is perhaps worse than
>> the perceived migration problem in PEP 382.
>
> 382 would have had the same problem.
No, it wouldn't. In PEP 382, find_module is left unmodified. Instead,
find_package_portion can optionally be implemented by finders.
So existing callers continue to work fine - they just won't find package
portions. Existing finders continue to work fine as long as they properly
give an AttributeError when someone tries to access the find_package_portion
method.
Regards,
Martin