[Python-Dev] Failures in test_site.py - how to debug?

Chris Angelico rosuav at gmail.com
Fri Aug 19 23:00:10 EDT 2016


On Sat, Aug 20, 2016 at 12:55 PM, Random832 <random832 at fastmail.com> wrote:
>
> What about -S and putting "import site" explicitly in the test code? Or
> would that go back to importing everything on people who have packages
> installed?

I think so, yes.

> Really, there should be a "source-isolated" mode, which removes
> /usr/lib/whatever from the path in the same way that -I removes the
> user's stuff, but still runs cpython/Lib/site.py , and all tests (and
> for that matter stuff like frozen module prep) should be run in this
> mode.
>
> I'm not sure I see a downside to having such a mode be the *default*
> mode for "python detects it is being run from a source tree".

That sounds great, but I don't have the skills to implement that and
ensure that it's reliable.

ChrisA


More information about the Python-Dev mailing list