pth file overrides pythonpath
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lazr.restfulclient (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
python-
import sys,types,os; p = os.path.
This has at least three consequences:
1- if you have a different lazr.restfulclient module earlier on your PYTHONPATH, for instance if you're trying to fix a bug in it, you still get the installed version:
PYTHONPATH=
<module 'lazr.restfulcl
This is inconsistent with other Python modules.
2- Bizarrely, lazr looks like a built-in module:
% PYTHONPATH=
<module 'lazr' (built-in)>
3- The lazr module will be loaded every time Python is started, whether it is wanted or not, which is a (perhaps small) waste of time:
% python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.modules['lazr']
<module 'lazr' (built-in)>
Is this really necessary just to make a namespace package?
Changed in lazr.restfulclient (Ubuntu): | |
importance: | Undecided → High |
status: | New → Triaged |
This also seems closely related to <http:// comments. gmane.org/ gmane.comp. version- control. bazaar- ng.general/ 72378>
/usr/ lib/python2. 6/dist- packages/ lazr/restfulcli ent/__init_ _.py:19: UserWarning: Module paste python2. 6/dist- packages is being added to sys.path
was already imported from None, but /usr/lib/
import pkg_resources