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 paul.moore
Recipients docs@python, eryksun, gaborjbernat, keller00, paul.moore, steve.dower, tim.golden, vinay.sajip, zach.ware
Date 2020-10-15.12:57:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1602766678.5.0.958961230644.issue42041@roundup.psfhosted.org>
In-reply-to
Content
Agreed, this is just "normal Windows behaviour". It's definitely surprising and non-obvious (I saw this issue and it never even occurred to me that this was what was happening) so I'd support documenting it somewhere. My instinct is that the subprocess documentation is the right place, but I suspect that in practice, people hitting this issue with a virtual environment won't spot anything we write there, so it'll end up just being a "well, we told you so" measure rather than helping users in a practical sense.

So I'd agree with Steve's comment - Mark, if you can suggest anywhere we could document this which you *would* have spotted when you encountered this issue, that would be great.

Hmm, maybe we could document in venv that the Python executable in a venv redirects to the base Python, so that the "application directory" for a script run from a venv is the base executable's directory, not the venv - with a link to the MS documentation that explains how this affects path searches? (IIRC, we've been hesitant to document the redirection as it's an "implementation detail", but this is clearly a case where it affects user-visible behaviour, so we can't really use that argument any more...)
History
Date User Action Args
2020-10-15 12:57:58paul.mooresetrecipients: + paul.moore, vinay.sajip, tim.golden, docs@python, zach.ware, eryksun, steve.dower, gaborjbernat, keller00
2020-10-15 12:57:58paul.mooresetmessageid: <1602766678.5.0.958961230644.issue42041@roundup.psfhosted.org>
2020-10-15 12:57:58paul.moorelinkissue42041 messages
2020-10-15 12:57:57paul.moorecreate