Repository navigation
Conversation
Follow-up to pytorch#202271. The package metadata and README now say Python 3.11 or later, but cmake/Dependencies.cmake still lets a 3.10 interpreter through. Builds that skip the requires-python check (python setup.py develop, pip install --ignore-requires-python, calling CMake directly) rely on this guard, so a 3.10 build got past configure and failed much later. Make the guard 3.11, with the matching message.
This PR needs a
|
PR Status: Approved 🚀Please fix all CI failures and trigger merge by commenting "@pytorchbot merge". ✅ AUTOMATED REVIEW - Ready for human review:
Findings (1): Reviewed commit: 🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/202290
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit d320b4a with merge base afabe7b ( 🟡 GREEN LIGHT - PR requires human review:
reason: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
There was a problem hiding this comment.
Automated review of d320b4a: nothing blocking; ready for human review.
The PR raises the Python version floor in cmake/Dependencies.cmake from 3.10 to 3.11, so builds that skip pip's requires-python check stop at configure time; the change is correct, and the one problem is the claim that it can land before # 202271. Recommendation: Approve, on the condition that it merges after # 202271 (or together with it).
⚪ 1 non-blocking finding
pytorch/cmake/Dependencies.cmake
Line 877 in d320b4a
Merge order with # 202271. The description says the two PRs "can land in either order", but at this PR's HEAD the other packaging metadata still advertises 3.10: pyproject.toml:381 has requires-python = ">=3.10", pyproject.toml:468 still lists the Programming Language :: Python :: 3.10 classifier, and README.md:165 says "Python 3.10 or later". If this PR merges first, main is inconsistent in the opposite direction to the one this PR fixes: pip install . on 3.10 passes the requires-python check, then fails at CMake configure with "Python < 3.11 is no longer supported", while the README and classifiers still say 3.10 is supported. Either land this strictly after # 202271, as a stack, or fold the pyproject.toml and README changes into this PR so the floor moves atomically. (Related, for # 202271: the # TODO: Remove Python-3.10 specific suppressions comment at pyproject.toml:602 becomes actionable once the floor moves.)
This review is AI-generated and advisory. Each new automated review replaces the previous one.
|
@pytorchbot merge -f "all is clear, lets merge" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Follow-up to pytorch#202271, from its [review comment](pytorch#202271 (comment)). ## Summary Raise the Python floor that CMake enforces from 3.10 to 3.11, so CMake agrees with `pyproject.toml` and the README after pytorch#202271. `cmake/Dependencies.cmake`: ```cmake if(${Python_VERSION} VERSION_LESS 3.11) message(FATAL_ERROR "Found Python libraries version ${Python_VERSION}. Python < 3.11 is no longer supported by PyTorch.") endif() ``` ## Why pytorch#202271 sets `requires-python = ">=3.11"` and the README prerequisite to "Python 3.11 or later". `pip install .` on 3.10 is then stopped by `requires-python`, but builds that skip that check (`python setup.py develop`, `pip install --ignore-requires-python`, calling CMake directly) rely on this guard. With the floor still at 3.10 those builds get past configure and fail much later, or produce an unsupported build, instead of stopping with a clear message. No CI job builds PyTorch from source on Python 3.10: the only remaining `3.10` string in `.github/workflows` is a description comment, and the binary matrix starts at 3.11. It is the only 3.10 floor I found in `cmake/`, `CMakeLists.txt`, `setup.py`, `tools/` or `torch/__init__.py`. ## Testing Ran the same `if`/`message` block with `cmake -P` (CMake 4.4.4) and `Python_VERSION` set to three values: `3.10.12` stops with the new message and exit 1; `3.11.0` and `3.15.1` are accepted. I did not run a full PyTorch configure. Independent of pytorch#202271 (a different file), so the two can land in either order. `release/2.15` has the same guard; this PR does not change that branch. Pull Request resolved: pytorch#202290 Approved by: https://github.com/huydhn
Follow-up to #202271, from its review comment.
Summary
Raise the Python floor that CMake enforces from 3.10 to 3.11, so CMake agrees with
pyproject.tomland the README after #202271.cmake/Dependencies.cmake:Why
#202271 sets
requires-python = ">=3.11"and the README prerequisite to "Python 3.11 or later".pip install .on 3.10 is then stopped byrequires-python, but builds that skip that check (python setup.py develop,pip install --ignore-requires-python, calling CMake directly) rely on this guard. With the floor still at 3.10 those builds get past configure and fail much later, or produce an unsupported build, instead of stopping with a clear message.No CI job builds PyTorch from source on Python 3.10: the only remaining
3.10string in.github/workflowsis a description comment, and the binary matrix starts at 3.11. It is the only 3.10 floor I found incmake/,CMakeLists.txt,setup.py,tools/ortorch/__init__.py.Testing
Ran the same
if/messageblock withcmake -P(CMake 4.4.4) andPython_VERSIONset to three values:3.10.12stops with the new message and exit 1;3.11.0and3.15.1are accepted. I did not run a full PyTorch configure.Independent of #202271 (a different file), so the two can land in either order.
release/2.15has the same guard; this PR does not change that branch.