On Thu, May 24, 2012 at 11:02 AM, Eric V. Smith firstname.lastname@example.org wrote:
On 5/23/2012 8:58 PM, PJ Eby wrote:
OTOH, that's finders, and I think we're dealing with loaders here. Splitting hairs, perhaps, but at least it's in a good cause. ;-)
I guess I could store the passed-in parent path, and use that if it can't be found through sys.modules.
I'm not sure I can conjure up code to test this.
I don't think there's a need to change anything from your current strategy, but we should be clear in the docs:
1. Finders should *not* assume their parent packages have been loaded (and should not load them implicitly) 2. Loaders *can* assume their parent packages have already been loaded and are present in sys.modules (and can complain if they're not there)