Jason R. Coombs <jar...@jaraco.com> added the comment:
In [setuptools 1453](https://github.com/pypa/setuptools/issues/1453), this issue hit the project hard. Tox 3.2 changed the default invocation of pip from the script-based invocation to the runpy based implementation (python -m pip), which causes pip to be unable to uninstall the setuptools in the environment. This use case also reveals that the heuristic of "retain '' in sys.path if the module being executed is in a subdirectory of a current directory" wouldn't address the issue, as `.tox/python/lib/python3.7/site-packages/pip/__main__.py` is in a subdirectory of the current directory, but one would still expect '' not to be in sys.path in this case. But basing on __main__.__spec__, that would probably do what is expected. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31874> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com