[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-07-08 Thread Chris Jerdonek
Chris Jerdonek added the comment: FYI, I created issue 15299 and issue 15297 which also relate to pkgutil.walk_packages() not working correctly in Python 3.3 -- even with the caveat added by Brett. These two issues are in pkgutil.walk_packages()'s code path when passed path=None. --

[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-07-07 Thread Chris Jerdonek
Chris Jerdonek added the comment: I created issue 15288 to improve the documentation around this. -- ___ Python tracker ___ ___ Pytho

[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-07-07 Thread Chris Jerdonek
Chris Jerdonek added the comment: Thanks a lot, Eric. I'm going to create a new issue to clarify the note a bit, if that's okay. At minimum, I feel like enough information should be given to let one run the examples given. By the way, your comment, "While you can use pkgutil.ImpImporter as

[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-07-07 Thread Eric Snow
Eric Snow added the comment: Importers are a PEP 302 API. In the context of pkgutil, they are path hooks (see http://www.python.org/dev/peps/pep-0302/#id24), aka path importers. A path hook is a callable that takes a path and returns a finder. Path hooks are stored in sys.path_hooks and th

[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-07-07 Thread Chris Jerdonek
Chris Jerdonek added the comment: As someone who isn't an expert on Python's import mechanisms, I'm confused by this comment at the end of pkgutil.walk_packages(): "Note: Only works for importers which define a iter_modules() method, which is non-standard but implemented by classes defined in

[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-06-15 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-06-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset b92fa1c5a96b by Brett Cannon in branch 'default': Closes issue #14982: Document that pkgutil's walk_packages() and http://hg.python.org/cpython/rev/b92fa1c5a96b -- nosy: +python-dev ___ Python tracker <

[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-06-06 Thread Brett Cannon
Brett Cannon added the comment: Yes, the docs should get updated and I will do that before Python 3.3 goes out the door. -- assignee: -> brett.cannon ___ Python tracker ___ __

[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-06-06 Thread Paul Nasrat
Paul Nasrat added the comment: We've taken a simpler approach avoiding walk_packages in pip which we'll release for 3.3. I'd say if pkgutil doesn't work correctly with importers & loaders outside of it we probably should make that very explicit in the docs, and potentially consider deprecatin

[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-06-03 Thread Brett Cannon
Brett Cannon added the comment: I should mention that Guido and others on python-dev mentioned coming up with an API for finders/loaders that allowed for file-like API and possibly being able to iterate over available modules when importlib's bootstrapping landed (sorry, don't have a link for

[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-06-02 Thread Chris Jerdonek
Chris Jerdonek added the comment: See also issue 14787 re: walk_packages(), which also affects versions before 3.3. -- nosy: +cjerdonek ___ Python tracker ___ _

[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-06-02 Thread Paul Nasrat
Paul Nasrat added the comment: Ok so it seems I can't just use sys.meta_path in pip to work with ImpImporter due to according to the pydoc: Note that ImpImporter does not currently support being used by placement on sys.meta_path. I guess I can write a custom importer in pip for handling the

[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-06-02 Thread Brett Cannon
Brett Cannon added the comment: Basically pkgutil kind of handles importers properly, kind of doesn't. So if a module defined a __loader__ it will use it, but all the rest of its code assumes it uses only the loaders defined in pkgutil. The problem here is that pkgutil.walk_packages() ends up

[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-06-02 Thread Ronan Lamy
Changes by Ronan Lamy : -- nosy: +Ronan.Lamy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-06-01 Thread Marc Abramowitz
Marc Abramowitz added the comment: [last: 0] marca@scml-marca:~/dev/git-repos/pip$ python3.3 Python 3.3.0a4 (v3.3.0a4:7c51388a3aa7, May 30 2012, 16:58:42) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from pip im

[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-06-01 Thread Paul Nasrat
Paul Nasrat added the comment: I was pretty tired when debugging last night and just quickly looked at hg logs, so that may be misattributed. I'll try come up with a clearer reproducer. -- ___ Python tracker ___

[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-06-01 Thread Marc Abramowitz
Marc Abramowitz added the comment: Here's the pip issue: https://github.com/pypa/pip/issues/556 -- ___ Python tracker ___ ___ Python-

[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-06-01 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-06-01 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think this is related to PEP 420. Adding Brett. -- nosy: +brett.cannon, eric.smith ___ Python tracker ___ __

[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-06-01 Thread Paul Nasrat
Paul Nasrat added the comment: I stepped through in pdb (Pdb) p i <_frozen_importlib.FileFinder object at 0x101066090> (Pdb) iter_importer_modules(i, prefix) [] (Pdb) p hasattr(importer, 'iter_modules') False 2.7 uses [] (Pdb) pp dir(myimp) ['__doc__', '__init__', '__module__', 'find_module'

[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-06-01 Thread Marc Abramowitz
New submission from Marc Abramowitz : I noticed that pip wasn't working properly on Python 3.3a - notably, it wasn't able to load any of its own VCS modules -- it does this by using pkgutil.walk_packages I think the problem is that the behavior of pkgutil.walk_packages changed in some incompa