Skip to content

Conversation

weddige
Copy link
Contributor

@weddige weddige commented Nov 4, 2021

Description

Fixes #11405 by using options.python_executable instead of sys.executable.

Test Plan

I tested the change manually with an internal project, that was affected by #11405.

@weddige
Copy link
Contributor Author

weddige commented Nov 4, 2021

I am not entirely sure, what the desired behavior for --no-site-packages is. I tend to the conclusion that --no-site-packages and --install-types are not compatible and the combination should be disallowed.

@emmatyping
Copy link
Member

I tend to the conclusion that --no-site-packages and --install-types are not compatible and the combination should be disallowed.

Yes, I would agree. Could you have mypy give an error and fail fast in this case please?

@weddige
Copy link
Contributor Author

weddige commented Nov 5, 2021

Yes, I would agree. Could you have mypy give an error and fail fast in this case please?

I added a check for that.

@emmatyping
Copy link
Member

Ok, I think this looks good, would you be able to add a few tests please?

@JelleZijlstra JelleZijlstra merged commit 902df03 into python:master Nov 27, 2021
tushar-deepsource pushed a commit to DeepSourceCorp/mypy that referenced this pull request Jan 20, 2022
Fixes python#11405 by using `options.python_executable` instead of `sys.executable`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--install-types does not work with --python-executable
4 participants