-
-
Notifications
You must be signed in to change notification settings - Fork 631
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix MyPy with Python 2-only third-party requirements (#10820)
Closes #10819. Turns out that when using `--pex-path` with PEX, it will expect for every requirement to have a wheel that is compatible with the current interpreter, unless you set `PEX_IGNORE_ERRORS`. This means that it is naively not safe to resolve requirements with Python 2, but run MyPy with Python 3.5+. Likewise, it is not safe to resolve requirements with Python 3.6 but run MyPy with Python 3.7. Instead, we generally use the same interpreter constraints for the requirements when creating the tool pex. However, if the requirements have any Python 2 code—or the user set `--mypy-interpreter-constraints`—then we will let the two sets diverge, and we'll set `PEX_IGNORE_ERRORS`.
- Loading branch information
1 parent
9aec06f
commit f8a0b0f
Showing
2 changed files
with
90 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters