Skip to content

Conversation

@zooba
Copy link
Member

@zooba zooba commented Jun 28, 2019

@zooba zooba added type-bug An unexpected behavior, bug, or error OS-windows labels Jun 28, 2019
@zooba zooba requested a review from ned-deily June 28, 2019 18:00
@zooba zooba changed the title bpo-37369: Fix venv and test symlinking [3.7] bpo-37369: Fix venv and test symlinking Jun 28, 2019
@zooba
Copy link
Member Author

zooba commented Jun 28, 2019

@ned-deily As I worried, there are flow on effects. Because sys.executable is no longer a real file or a real symlink, some operations break down.

There has to be a trade-off between "can I use sys.executable later to execute Python" vs "can I open(sys.executable) or make a link to sys.executable", and I think the former should win. Hopefully this is narrow enough that it only impacts Store users, and we can give it as another reason you may need to switch to the regular installer.

@ned-deily
Copy link
Member

FWIW, I agree that the main purpose of sys.executable should be to facilitate executing another instance of the current Python so that sounds like the right tradeoff. Also, FWIW, in macOS framework builds, sys.executable points to the so-called stub launcher executable, not to the actual interpreter binary, and the path is often not within sys.prefix. (That's true for Python 3; in Python 2, that behavior was never changed and still causes problems here and there with tests and the like.) So there is some precedent for divergence here.

@zooba zooba merged commit ed4657b into python:3.7 Jun 28, 2019
@zooba zooba deleted the bpo-37369-venv-3.7 branch June 28, 2019 18:42
@zooba
Copy link
Member Author

zooba commented Jun 28, 2019

I'm watching https://dev.azure.com/Python/cpython/_build/results?buildId=46366&view=results before declaring this totally done - the CI build has additional tests in it that will cover these scenarios.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OS-windows skip news type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants