From 5d62b63a766cf748a842b614d59e92fe2bfb91fc Mon Sep 17 00:00:00 2001 From: Nikita Shulga Date: Fri, 17 Oct 2025 16:15:21 -0700 Subject: [PATCH] [BE] Use Python-3.14 GE build (#165804) 3.14 reached general availability on Oct 7th 2025, so we can remove all pre-release workarounds Pull Request resolved: https://github.com/pytorch/pytorch/pull/165804 Approved by: https://github.com/yangw-dev, https://github.com/Skylion007, https://github.com/cyyever --- .ci/docker/common/install_cpython.sh | 4 ---- .github/templates/macos_binary_build_workflow.yml.j2 | 3 +-- ...ed-macos-arm64-binary-libtorch-release-nightly.yml | 1 - .../generated-macos-arm64-binary-wheel-nightly.yml | 11 ++--------- 4 files changed, 3 insertions(+), 16 deletions(-) diff --git a/.ci/docker/common/install_cpython.sh b/.ci/docker/common/install_cpython.sh index 692edd0b898f..c873c930097b 100755 --- a/.ci/docker/common/install_cpython.sh +++ b/.ci/docker/common/install_cpython.sh @@ -83,10 +83,6 @@ function build_cpython { py_suffix=${py_ver::-1} py_folder=$py_suffix fi - # Update to rc2 due to https://github.com/python/cpython/commit/c72699086fe4 - if [ "$py_suffix" == "3.14.0" ]; then - py_suffix="3.14.0rc2" - fi wget -q $PYTHON_DOWNLOAD_URL/$py_folder/Python-$py_suffix.tgz -O Python-$py_ver.tgz do_cpython_build $py_ver Python-$py_suffix diff --git a/.github/templates/macos_binary_build_workflow.yml.j2 b/.github/templates/macos_binary_build_workflow.yml.j2 index 7f307447c357..ad5dd74972d0 100644 --- a/.github/templates/macos_binary_build_workflow.yml.j2 +++ b/.github/templates/macos_binary_build_workflow.yml.j2 @@ -26,9 +26,8 @@ name: !{{ build_environment }} - name: Setup Python uses: actions/setup-python@v6 with: - # TODO: Removeme once 3.14 is out # .4 version is min minor for 3.10, and also no-gil version of 3.13 needs at least 3.13.3 - python-version: "!{{ (py_ver.strip('t') + '.4') if '3.14' not in py_ver else '3.14.0-rc.2' }}" + python-version: "!{{ py_ver.strip('t') + ('.4' if '3.14' not in py_ver else '.0') }}" freethreaded: !{{ "true" if py_ver.endswith('t') else "false" }} {%- endmacro %} diff --git a/.github/workflows/generated-macos-arm64-binary-libtorch-release-nightly.yml b/.github/workflows/generated-macos-arm64-binary-libtorch-release-nightly.yml index cd912650eb17..109e98cd9d91 100644 --- a/.github/workflows/generated-macos-arm64-binary-libtorch-release-nightly.yml +++ b/.github/workflows/generated-macos-arm64-binary-libtorch-release-nightly.yml @@ -63,7 +63,6 @@ jobs: - name: Setup Python uses: actions/setup-python@v6 with: - # TODO: Removeme once 3.14 is out # .4 version is min minor for 3.10, and also no-gil version of 3.13 needs at least 3.13.3 python-version: "3.10.4" freethreaded: false diff --git a/.github/workflows/generated-macos-arm64-binary-wheel-nightly.yml b/.github/workflows/generated-macos-arm64-binary-wheel-nightly.yml index 8522d2d36993..afe9330deb83 100644 --- a/.github/workflows/generated-macos-arm64-binary-wheel-nightly.yml +++ b/.github/workflows/generated-macos-arm64-binary-wheel-nightly.yml @@ -59,7 +59,6 @@ jobs: - name: Setup Python uses: actions/setup-python@v6 with: - # TODO: Removeme once 3.14 is out # .4 version is min minor for 3.10, and also no-gil version of 3.13 needs at least 3.13.3 python-version: "3.10.4" freethreaded: false @@ -169,7 +168,6 @@ jobs: - name: Setup Python uses: actions/setup-python@v6 with: - # TODO: Removeme once 3.14 is out # .4 version is min minor for 3.10, and also no-gil version of 3.13 needs at least 3.13.3 python-version: "3.11.4" freethreaded: false @@ -279,7 +277,6 @@ jobs: - name: Setup Python uses: actions/setup-python@v6 with: - # TODO: Removeme once 3.14 is out # .4 version is min minor for 3.10, and also no-gil version of 3.13 needs at least 3.13.3 python-version: "3.12.4" freethreaded: false @@ -389,7 +386,6 @@ jobs: - name: Setup Python uses: actions/setup-python@v6 with: - # TODO: Removeme once 3.14 is out # .4 version is min minor for 3.10, and also no-gil version of 3.13 needs at least 3.13.3 python-version: "3.13.4" freethreaded: false @@ -499,7 +495,6 @@ jobs: - name: Setup Python uses: actions/setup-python@v6 with: - # TODO: Removeme once 3.14 is out # .4 version is min minor for 3.10, and also no-gil version of 3.13 needs at least 3.13.3 python-version: "3.13.4" freethreaded: true @@ -609,9 +604,8 @@ jobs: - name: Setup Python uses: actions/setup-python@v6 with: - # TODO: Removeme once 3.14 is out # .4 version is min minor for 3.10, and also no-gil version of 3.13 needs at least 3.13.3 - python-version: "3.14.0-rc.2" + python-version: "3.14.0" freethreaded: false - name: Checkout PyTorch uses: actions/checkout@v4 @@ -719,9 +713,8 @@ jobs: - name: Setup Python uses: actions/setup-python@v6 with: - # TODO: Removeme once 3.14 is out # .4 version is min minor for 3.10, and also no-gil version of 3.13 needs at least 3.13.3 - python-version: "3.14.0-rc.2" + python-version: "3.14.0" freethreaded: true - name: Checkout PyTorch uses: actions/checkout@v4