[New-bugs-announce] [issue11091] Bug with reimport in pkg_resources

Сергей Чупраков report at bugs.python.org
Tue Feb 1 18:41:09 CET 2011

New submission from Сергей Чупраков <sergeyzsg at gmail.com>:

import pkg_resources change path of already imported module
this break google appengine because It use "google.__file__" to determine sdk directory.

Ubuntu 10.10
~/lib/google_appengine$ python
Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56) 
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from appcfg import fix_sys_path
>>> fix_sys_path()
>>> import google
>>> google
<module 'google' from '/home/schuprakov/lib/google_appengine/google/__init__.pyc'>
>>> import pkg_resources
>>> google
<module 'google' from '/usr/lib/pymodules/python2.6/google/__init__.pyc'>

ls /usr/lib/pymodules/python2.6/google/
__init__.py  __init__.pyc  protobuf

messages: 127704
nosy: Сергей.Чупраков
priority: normal
severity: normal
status: open
title: Bug with reimport in pkg_resources
type: resource usage

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list