[New-bugs-announce] [issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

Marc Abramowitz report at bugs.python.org
Sat Jun 2 01:00:34 CEST 2012


New submission from Marc Abramowitz <msabramo at gmail.com>:

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 incompatible way in 3.3 -- take a look at the following:

[last: 0] marca at scml-marca:~/dev/git-repos/lexicon$ ../lexicon/.tox/py32/bin/python
Python 3.2.3 (v3.2.3:3d0686d90f55, Apr 10 2012, 11:25:50) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pkgutil import walk_packages
>>> list(walk_packages('/Users/marca/dev/git-repos/lexicon/.tox/py33/lib/python3.3/site-packages/pip-1.1-py3.3.egg/pip/vcs'))
[(<pkgutil.ImpImporter object at 0x1005bc710>, 'lexicon', True), (<pkgutil.ImpImporter object at 0x100649410>, 'lexicon.alias_dict', False), (<pkgutil.ImpImporter object at 0x100649410>, 'lexicon.attribute_dict', False), (<pkgutil.ImpImporter object at 0x1005bc710>, 'reg_settings', False), (<pkgutil.ImpImporter object at 0x1005bc710>, 'setup', False)]
>>> ^D

[last: 10] marca at scml-marca:~/dev/git-repos/lexicon$ ../lexicon/.tox/py33/bin/python
Python 3.3.0a3 (v3.3.0a3:0b53b70a40a0, May  1 2012, 11:39:35) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pkgutil import walk_packages
>>> list(walk_packages('/Users/marca/dev/git-repos/lexicon/.tox/py33/lib/python3.3/site-packages/pip-1.1-py3.3.egg/pip/vcs'))
[]

----------
components: Library (Lib)
messages: 162110
nosy: Marc.Abramowitz
priority: normal
severity: normal
status: open
title: pkgutil.walk_packages seems to not work properly on Python 3.3a
versions: Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14982>
_______________________________________


More information about the New-bugs-announce mailing list