homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ned.deily
Recipients James.Kyle, ned.deily, ronaldoussoren
Date 2012年06月12日.01:50:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1339465837.82.0.402698679029.issue15048@psf.upfronthosting.co.za>
In-reply-to
Content
I have to admit that I'm not keen on this feature for the reasons James cited. And I think the example of the shared user site directory is not a good analogy. In that case, you, as a user, have more control over the presence and contents of the directory since it is located within your home directory. You would normally need administrator privilege to manipulate /Library/Python. And, in any case, it would be better if there *were* separate user site directories per Python instance, IMO. Yes, you can play with sys.path after the fact but that's not very friendly. It certainly can lead to confusion. An uncontrived example:
$ sudo easy_install-2.7 appscript
[...]
Installed /Library/Python/2.7/site-packages/appscript-1.0.0-py2.7-macosx-10.7-intel.egg
$ /usr/bin/python2.7 -c "import appscript"
$ /usr/local/bin/python2.7 -c "import appscript"
Traceback (most recent call last):
 File "<string>", line 1, in <module>
 File "build/bdist.macosx-10.7-intel/egg/appscript/__init__.py", line 8, in <module>
 File "build/bdist.macosx-10.7-intel/egg/aem/__init__.py", line 5, in <module>
 File "build/bdist.macosx-10.7-intel/egg/aem/ae.py", line 7, in <module>
 File "build/bdist.macosx-10.7-intel/egg/aem/ae.py", line 3, in __bootstrap__
ImportError: No module named pkg_resources
... because the non-system Python did not have Distribute or setuptools installed, whereas Apple supplies it with the system Python. It's not the only package to fail in a similar way. I expect there are other cases where differences in extension module builds could cause problems. To me, the feature seems to go against "explicit is better than implicit".
As far as I know, the only place where this behavior is documented is in the What's New documents for 2.7. I wouldn't object to removing it in 3.3.
History
Date User Action Args
2012年06月12日 01:50:38ned.deilysetrecipients: + ned.deily, ronaldoussoren, James.Kyle
2012年06月12日 01:50:37ned.deilysetmessageid: <1339465837.82.0.402698679029.issue15048@psf.upfronthosting.co.za>
2012年06月12日 01:50:37ned.deilylinkissue15048 messages
2012年06月12日 01:50:35ned.deilycreate

AltStyle によって変換されたページ (->オリジナル) /