-
Notifications
You must be signed in to change notification settings - Fork 608
Add requires-python = ">=3.10"
to pyproject.toml
#4131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/4131
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ✅ You can merge normally! (2 Unrelated Failures)As of commit c910ea0 with merge base 998fc08 ( BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
UNSTABLE - The following job failed but was likely due to flakiness present on trunk and has been marked as unstable:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@dbort has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
requires-python = ">=3.10,<3.12"
to pyproject.tomlrequires-python = ">=3.10,<3.13"
to pyproject.toml
@dbort has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
requires-python = ">=3.10,<3.13"
to pyproject.tomlrequires-python = ">=3.10"
to pyproject.toml
@dbort has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
We only support python 3.10/3.11/3.12 right now, so make that explicit. The last time I tried to do this, the linter tried to force us to use new-in-3.10 syntax. I was able to avoid that this time by telling the `black` formatter to use a larger range of python versions. Also modify setup.py to be 3.8 and 3.13 compatible so that it can run and complain about the version mismatch instead of just failing to run. Then, to save users some time, check the version in install_requirements.sh before doing any real work. And `cd` to the script's directory before starting so that users can invoke it like `/path/to/executorch/install_requirements.sh`. Test Plan: Built wheels in CI by adding the `ciflow/binaries/all` label. Linted all python files: ``` find . -type f -name "*.py" | grep -vE 'third-party|cmake-out|pip-out' > /tmp/f lintrunner --paths-cmd='cat /tmp/f' ``` Also created a conda environment with python 3.8 and ran `install_requirements.sh` (without the fail-fast check). It used to fail on syntax errors, but now it fails because the version can't be satisfied. To test the fail-fast logic, ran install_requirements.sh in 3.8 and 3.10 conda environments, and saw that it failed/passed as expected. To test the failure cases, made some local modifications and saw that it continued to build the wheel after printing a warning: - Remove/rename pyproject.toml - Remove the `requires-python` line from pyproject.toml - Modify the `requires-python` line to contain an invalid range - Import a missing module in the `python_is_compatible()` code To test the new `cd` logic: ``` cd build ../install_requirements.sh # This worked ```
@dbort has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Fixes #3570 |
Summary: We only support python 3.10/3.11/3.12 right now, so make that explicit. The last time I tried to do this, the linter tried to force us to use new-in-3.10 syntax. I was able to avoid that this time by telling the `black` formatter to use a larger range of python versions. Also modify setup.py to be 3.8 and 3.13 compatible so that it can run and complain about the version mismatch instead of just failing to run. Then, to save users some time, check the version in install_requirements.sh before doing any real work. And `cd` to the script's directory before starting so that users can invoke it like `/path/to/executorch/install_requirements.sh`. Pull Request resolved: pytorch#4131 Test Plan: Built wheels in CI by adding the `ciflow/binaries/all` label. Linted all python files: ``` find . -type f -name "*.py" | grep -vE 'third-party|cmake-out|pip-out' > /tmp/f lintrunner --paths-cmd='cat /tmp/f' ``` Also created a conda environment with python 3.8 and ran `install_requirements.sh` (without the fail-fast check). It used to fail on syntax errors, but now it fails because the version can't be satisfied. To test the fail-fast logic, ran install_requirements.sh in 3.8 and 3.10 conda environments, and saw that it failed/passed as expected. To test the failure cases, made some local modifications and saw that it continued to build the wheel after printing a warning: - Remove/rename pyproject.toml - Remove the `requires-python` line from pyproject.toml - Modify the `requires-python` line to contain an invalid range - Import a missing module in the `python_is_compatible()` code To test the new `cd` logic: ``` cd build ../install_requirements.sh # This worked ``` Reviewed By: mergennachin Differential Revision: D59291599 Pulled By: dbort fbshipit-source-id: 5bfc97346180b65ad8719753c4126af025a41ae0
We only support python 3.10/3.11/3.12 right now, so make that explicit.
The last time I tried to do this, the linter tried to force us to use
new-in-3.10 syntax. I was able to avoid that this time by telling the
black
formatter to use a larger range of python versions.Also modify setup.py to be 3.8 and 3.13 compatible so that it can run
and complain about the version mismatch instead of just failing to run.
Then, to save users some time, check the version in
install_requirements.sh before doing any real work.
And
cd
to the script's directory before starting so that users caninvoke it like
/path/to/executorch/install_requirements.sh
.Test Plan:
Built wheels in CI by adding the
ciflow/binaries/all
label.Linted all python files:
Also created a conda environment with python 3.8 and ran
install_requirements.sh
(without the fail-fast check). It used tofail on syntax errors, but now it fails because the version can't be
satisfied.
To test the fail-fast logic, ran install_requirements.sh in 3.8 and 3.10
conda environments, and saw that it failed/passed as expected.
To test the failure cases, made some local modifications and saw that it
continued to build the wheel after printing a warning:
requires-python
line from pyproject.tomlrequires-python
line to contain an invalid rangepython_is_compatible()
codeTo test the new
cd
logic: