[issue12282] build process adds CWD (null entry) to PYTHONPATH if PYTHONPATH is set in the build environment

R. David Murray report at bugs.python.org
Wed Jun 8 17:14:13 CEST 2011


R. David Murray <rdmurray at bitdance.com> added the comment:

It turns out that I had a stray abc.py file in my current working directory as the result of some previous tests of module-load-order rules.  That by itself wouldn't have triggered the problem, but in addition, I have PYTHONPATH set in my environment because I have the hg whitespace hook installed.  Apparently the build process turns a non-empty PYTHONPATH into a null entry in the final computed PYTHONPATH it uses when hg is called, and this results in anything located in the CWD being loaded.

I don't think this rises quite to the level of a security issue, since it applies only at build time, but it certainly seems like a bug.

----------
title: ABCMeta import error during build -> build process adds CWD (null entry) to PYTHONPATH if PYTHONPATH is set in the build environment
versions: +Python 2.7, Python 3.1, Python 3.2

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


More information about the Python-bugs-list mailing list