[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-05-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset f26721ab3476 by Ned Deily in branch 'default': Issue #14660: Install namespace_pkgs test directories and files. http://hg.python.org/cpython/rev/f26721ab3476 -- ___ Python tracker

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-05-24 Thread Eric V. Smith
Eric V. Smith added the comment: I'm closing this issue. I'll open new issues as needed. -- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed ___ Python tracker

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-05-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 702009f3c0b1 by Eric V. Smith in branch 'default': issue 14660: Implement PEP 420, namespace packages. http://hg.python.org/cpython/rev/702009f3c0b1 -- nosy: +python-dev ___ Python tracker

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-04-30 Thread Eric V. Smith
Eric V. Smith added the comment: I've modified zipimport to support namespace packages, and checked it in to the feature branch. This completes all of the functionality I think needs to be added. Next up is adding tests. -- stage: -> test needed _

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-04-25 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-04-25 Thread Brett Cannon
Brett Cannon added the comment: The joys of trying to shoehorn into an existing API. I mean short of adding a new sys.namespace_loader instead of an explicit keyword argument to FileFinder I can't think of a better solution. -- ___ Python tracker

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-04-25 Thread Eric V. Smith
Eric V. Smith added the comment: Ah. I didn't realize that reload called load_module. I'll back out the change I just made, then. My point was that the original call to load_module isn't made through the normal "a finder returned me a loader, so I'll call it" code path. It's always made thro

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-04-25 Thread Brett Cannon
Brett Cannon added the comment: What do you mean the loader is only needed to set __loader__? You need the loader to create the module (or find it in sys.modules to reload), and set all the attributes properly. If you do this then reloading namespace modules will become a special case compare

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-04-25 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +Yury.Selivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-04-25 Thread Eric V. Smith
Eric V. Smith added the comment: I'd really prefer something like: return load_ns_module(fullname, namespace_path) The point being that load_module() as defined in PEP 302 will never be called on NamespaceLoader. The loader only needs to exist to set module.__loader__, and load_module() wo

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-04-24 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-04-24 Thread Brett Cannon
Brett Cannon added the comment: Yeah, having to pass in the name to load_module is silly. I'm seriously considering making it optional for some loaders when the name was passed in to the constructor. One thing I would like to see is that PathFinder take a new, keyword-only argument of 'names

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-04-24 Thread Eric V. Smith
Eric V. Smith added the comment: I created the NamespaceLoader in the feature branch. It has a load_module, but it's only ever called by the code in PathFinder.load_module: loader = NamespaceLoader(namespace_path) return loader.load_module(fullname) namespace_p

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-04-24 Thread Eric V. Smith
Eric V. Smith added the comment: Right, that's a typo. I meant load_module(). I'm currently working on implementing the loader for namespace modules, so my comment about the loader is premature. -- ___ Python tracker

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-04-24 Thread Brett Cannon
Brett Cannon added the comment: Loaders are not meant to have a find_module method; that is purely for finders which can be distinct objects. So having a namespace loader is expected and there is no expectation that it have a find_module method (actually almost all of the loaders in importlib

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-04-24 Thread Eric V. Smith
New submission from Eric V. Smith : I have created a branch features/pep-420 where I'll be developing a proof of concept implementation of PEP 420. I've checked in a basic version, but it has these issues: - We need to decide how finders communicate that they've found part of a namespace packa