diff --git a/.circleci/config.yml b/.circleci/config.yml index 6b6a64662de..7b96f968293 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,8 +2,8 @@ version: 2.1 # How to test the Linux jobs: # - Install CircleCI local CLI: https://circleci.com/docs/2.0/local-cli/ -# - circleci config process .circleci/config.yml > gen.yml && circleci local execute -c gen.yml --job binary_linux_wheel_py3.7 -# - Replace binary_linux_wheel_py3.7 with the name of the job you want to test. +# - circleci config process .circleci/config.yml > gen.yml && circleci local execute -c gen.yml --job binary_linux_wheel_py3.8 +# - Replace binary_linux_wheel_py3.8 with the name of the job you want to test. # Job names are 'name:' key. executors: @@ -201,7 +201,7 @@ binary_common: &binary_common default: "" # Don't edit these python_version: - description: "Python version to build against (e.g., 3.7)" + description: "Python version to build against (e.g., 3.8)" type: string cu_version: description: "CUDA version to build against, in CU format (e.g., cpu or cu100)" @@ -258,7 +258,7 @@ smoke_test_common: &smoke_test_common jobs: circleci_consistency: docker: - - image: cimg/python:3.7 + - image: cimg/python:3.8 steps: - checkout - pip_install: @@ -271,7 +271,7 @@ jobs: lint_python_and_config: docker: - - image: cimg/python:3.7 + - image: cimg/python:3.8 steps: - checkout - pip_install: @@ -290,7 +290,7 @@ jobs: lint_c: docker: - - image: cimg/python:3.7 + - image: cimg/python:3.8 steps: - apt_install: args: libtinfo5 @@ -312,7 +312,7 @@ jobs: type_check_python: docker: - - image: cimg/python:3.7 + - image: cimg/python:3.8 steps: - checkout - install_torchvision: @@ -326,7 +326,7 @@ jobs: unittest_torchhub: docker: - - image: cimg/python:3.7 + - image: cimg/python:3.8 steps: - checkout - install_torchvision @@ -335,7 +335,7 @@ jobs: unittest_onnx: docker: - - image: cimg/python:3.7 + - image: cimg/python:3.8 steps: - checkout - install_torchvision @@ -347,7 +347,7 @@ jobs: unittest_extended: docker: - - image: cimg/python:3.7 + - image: cimg/python:3.8 resource_class: xlarge steps: - checkout @@ -594,7 +594,7 @@ jobs: description: "What whl subfolder to upload to, e.g., blank or cu100/ (trailing slash is important)" type: string docker: - - image: cimg/python:3.7 + - image: cimg/python:3.8 steps: - attach_workspace: at: ~/workspace @@ -1017,7 +1017,7 @@ jobs: build_docs: <<: *binary_common docker: - - image: cimg/python:3.7 + - image: cimg/python:3.8 resource_class: 2xlarge+ steps: - attach_workspace: @@ -1100,73 +1100,37 @@ workflows: only: /.*/ tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_linux_wheel_py3.7_cpu - python_version: '3.7' + name: binary_linux_wheel_py3.8_cpu + python_version: '3.8' wheel_docker_image: pytorch/manylinux-cpu - binary_linux_wheel: conda_docker_image: pytorch/conda-builder:cuda116 cu_version: cu116 - name: binary_linux_wheel_py3.7_cu116 - python_version: '3.7' + name: binary_linux_wheel_py3.8_cu116 + python_version: '3.8' wheel_docker_image: pytorch/manylinux-cuda116 - binary_linux_wheel: conda_docker_image: pytorch/conda-builder:cuda117 cu_version: cu117 - name: binary_linux_wheel_py3.7_cu117 - python_version: '3.7' + name: binary_linux_wheel_py3.8_cu117 + python_version: '3.8' wheel_docker_image: pytorch/manylinux-cuda117 - binary_linux_wheel: conda_docker_image: pytorch/conda-builder:cuda118 cu_version: cu118 - name: binary_linux_wheel_py3.7_cu118 - python_version: '3.7' + name: binary_linux_wheel_py3.8_cu118 + python_version: '3.8' wheel_docker_image: pytorch/manylinux-cuda118 - binary_linux_wheel: cu_version: rocm5.2 - name: binary_linux_wheel_py3.7_rocm5.2 - python_version: '3.7' + name: binary_linux_wheel_py3.8_rocm5.2 + python_version: '3.8' wheel_docker_image: pytorch/manylinux-rocm:5.2 - binary_linux_wheel: cu_version: rocm5.3 - name: binary_linux_wheel_py3.7_rocm5.3 - python_version: '3.7' + name: binary_linux_wheel_py3.8_rocm5.3 + python_version: '3.8' wheel_docker_image: pytorch/manylinux-rocm:5.3 - - binary_win_wheel: - cu_version: cpu - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_wheel_py3.7_cpu - python_version: '3.7' - - binary_win_wheel: - cu_version: cu116 - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_wheel_py3.7_cu116 - python_version: '3.7' - - binary_win_wheel: - cu_version: cu117 - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_wheel_py3.7_cu117 - python_version: '3.7' - - binary_win_wheel: - cu_version: cu118 - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_wheel_py3.7_cu118 - python_version: '3.7' - binary_win_wheel: cu_version: cpu filters: @@ -1265,42 +1229,6 @@ workflows: cu_version: cu118 name: binary_win_wheel_py3.10_cu118 python_version: '3.10' - - binary_win_conda: - cu_version: cpu - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_conda_py3.7_cpu - python_version: '3.7' - - binary_win_conda: - cu_version: cu116 - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_conda_py3.7_cu116 - python_version: '3.7' - - binary_win_conda: - cu_version: cu117 - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_conda_py3.7_cu117 - python_version: '3.7' - - binary_win_conda: - cu_version: cu118 - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_conda_py3.7_cu118 - python_version: '3.7' - binary_win_conda: cu_version: cpu filters: @@ -1407,9 +1335,9 @@ workflows: tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: build_docs - python_version: '3.7' + python_version: '3.8' requires: - - binary_linux_wheel_py3.7_cpu + - binary_linux_wheel_py3.8_cpu - upload_docs: context: org-member filters: @@ -1419,7 +1347,7 @@ workflows: tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: upload_docs - python_version: '3.7' + python_version: '3.8' requires: - build_docs - binary_ios_build: @@ -1441,15 +1369,6 @@ workflows: - unittest_torchhub - unittest_onnx - unittest_extended - - unittest_linux_gpu: - cu_version: cu116 - filters: - branches: - only: - - main - - nightly - name: unittest_linux_gpu_py3.7 - python_version: '3.7' - unittest_linux_gpu: cu_version: cu116 name: unittest_linux_gpu_py3.8 @@ -1472,10 +1391,6 @@ workflows: - nightly name: unittest_linux_gpu_py3.10 python_version: '3.10' - - unittest_windows_cpu: - cu_version: cpu - name: unittest_windows_cpu_py3.7 - python_version: '3.7' - unittest_windows_cpu: cu_version: cpu name: unittest_windows_cpu_py3.8 @@ -1488,15 +1403,6 @@ workflows: cu_version: cpu name: unittest_windows_cpu_py3.10 python_version: '3.10' - - unittest_windows_gpu: - cu_version: cu116 - filters: - branches: - only: - - main - - nightly - name: unittest_windows_gpu_py3.7 - python_version: '3.7' - unittest_windows_gpu: cu_version: cu116 name: unittest_windows_gpu_py3.8 @@ -1519,10 +1425,6 @@ workflows: - nightly name: unittest_windows_gpu_py3.10 python_version: '3.10' - - unittest_macos_cpu: - cu_version: cpu - name: unittest_macos_cpu_py3.7 - python_version: '3.7' - unittest_macos_cpu: cu_version: cpu name: unittest_macos_cpu_py3.8 @@ -1606,8 +1508,8 @@ workflows: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_wheel_py3.7_cpu - python_version: '3.7' + name: nightly_binary_linux_wheel_py3.8_cpu + python_version: '3.8' wheel_docker_image: pytorch/manylinux-cpu - binary_linux_wheel: conda_docker_image: pytorch/conda-builder:cuda116 @@ -1617,8 +1519,8 @@ workflows: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_wheel_py3.7_cu116 - python_version: '3.7' + name: nightly_binary_linux_wheel_py3.8_cu116 + python_version: '3.8' wheel_docker_image: pytorch/manylinux-cuda116 - binary_linux_wheel: conda_docker_image: pytorch/conda-builder:cuda117 @@ -1628,8 +1530,8 @@ workflows: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_wheel_py3.7_cu117 - python_version: '3.7' + name: nightly_binary_linux_wheel_py3.8_cu117 + python_version: '3.8' wheel_docker_image: pytorch/manylinux-cuda117 - binary_linux_wheel: conda_docker_image: pytorch/conda-builder:cuda118 @@ -1639,8 +1541,8 @@ workflows: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_wheel_py3.7_cu118 - python_version: '3.7' + name: nightly_binary_linux_wheel_py3.8_cu118 + python_version: '3.8' wheel_docker_image: pytorch/manylinux-cuda118 - binary_linux_wheel: cu_version: rocm5.2 @@ -1649,8 +1551,8 @@ workflows: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_wheel_py3.7_rocm5.2 - python_version: '3.7' + name: nightly_binary_linux_wheel_py3.8_rocm5.2 + python_version: '3.8' wheel_docker_image: pytorch/manylinux-rocm:5.2 - binary_linux_wheel: cu_version: rocm5.3 @@ -1659,89 +1561,9 @@ workflows: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_wheel_py3.7_rocm5.3 - python_version: '3.7' + name: nightly_binary_linux_wheel_py3.8_rocm5.3 + python_version: '3.8' wheel_docker_image: pytorch/manylinux-rocm:5.3 - - binary_win_wheel: - cu_version: cpu - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_wheel_py3.7_cpu - python_version: '3.7' - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_wheel_py3.7_cpu_upload - requires: - - nightly_binary_win_wheel_py3.7_cpu - subfolder: cpu/ - - binary_win_wheel: - cu_version: cu116 - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_wheel_py3.7_cu116 - python_version: '3.7' - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_wheel_py3.7_cu116_upload - requires: - - nightly_binary_win_wheel_py3.7_cu116 - subfolder: cu116/ - - binary_win_wheel: - cu_version: cu117 - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_wheel_py3.7_cu117 - python_version: '3.7' - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_wheel_py3.7_cu117_upload - requires: - - nightly_binary_win_wheel_py3.7_cu117 - subfolder: cu117/ - - binary_win_wheel: - cu_version: cu118 - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_wheel_py3.7_cu118 - python_version: '3.7' - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_wheel_py3.7_cu118_upload - requires: - - nightly_binary_win_wheel_py3.7_cu118 - subfolder: cu118/ - binary_win_wheel: cu_version: cpu filters: @@ -1982,82 +1804,6 @@ workflows: requires: - nightly_binary_win_wheel_py3.10_cu118 subfolder: cu118/ - - binary_win_conda: - cu_version: cpu - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_conda_py3.7_cpu - python_version: '3.7' - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_conda_py3.7_cpu_upload - requires: - - nightly_binary_win_conda_py3.7_cpu - - binary_win_conda: - cu_version: cu116 - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_conda_py3.7_cu116 - python_version: '3.7' - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_conda_py3.7_cu116_upload - requires: - - nightly_binary_win_conda_py3.7_cu116 - - binary_win_conda: - cu_version: cu117 - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_conda_py3.7_cu117 - python_version: '3.7' - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_conda_py3.7_cu117_upload - requires: - - nightly_binary_win_conda_py3.7_cu117 - - binary_win_conda: - cu_version: cu118 - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_conda_py3.7_cu118 - python_version: '3.7' - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_conda_py3.7_cu118_upload - requires: - - nightly_binary_win_conda_py3.7_cu118 - binary_win_conda: cu_version: cpu filters: diff --git a/.circleci/config.yml.in b/.circleci/config.yml.in index c3fe3fb6c03..a84a3fa649a 100644 --- a/.circleci/config.yml.in +++ b/.circleci/config.yml.in @@ -2,8 +2,8 @@ version: 2.1 # How to test the Linux jobs: # - Install CircleCI local CLI: https://circleci.com/docs/2.0/local-cli/ -# - circleci config process .circleci/config.yml > gen.yml && circleci local execute -c gen.yml --job binary_linux_wheel_py3.7 -# - Replace binary_linux_wheel_py3.7 with the name of the job you want to test. +# - circleci config process .circleci/config.yml > gen.yml && circleci local execute -c gen.yml --job binary_linux_wheel_py3.8 +# - Replace binary_linux_wheel_py3.8 with the name of the job you want to test. # Job names are 'name:' key. executors: @@ -201,7 +201,7 @@ binary_common: &binary_common default: "" # Don't edit these python_version: - description: "Python version to build against (e.g., 3.7)" + description: "Python version to build against (e.g., 3.8)" type: string cu_version: description: "CUDA version to build against, in CU format (e.g., cpu or cu100)" @@ -258,7 +258,7 @@ smoke_test_common: &smoke_test_common jobs: circleci_consistency: docker: - - image: cimg/python:3.7 + - image: cimg/python:3.8 steps: - checkout - pip_install: @@ -271,7 +271,7 @@ jobs: lint_python_and_config: docker: - - image: cimg/python:3.7 + - image: cimg/python:3.8 steps: - checkout - pip_install: @@ -290,7 +290,7 @@ jobs: lint_c: docker: - - image: cimg/python:3.7 + - image: cimg/python:3.8 steps: - apt_install: args: libtinfo5 @@ -312,7 +312,7 @@ jobs: type_check_python: docker: - - image: cimg/python:3.7 + - image: cimg/python:3.8 steps: - checkout - install_torchvision: @@ -326,7 +326,7 @@ jobs: unittest_torchhub: docker: - - image: cimg/python:3.7 + - image: cimg/python:3.8 steps: - checkout - install_torchvision @@ -335,7 +335,7 @@ jobs: unittest_onnx: docker: - - image: cimg/python:3.7 + - image: cimg/python:3.8 steps: - checkout - install_torchvision @@ -347,7 +347,7 @@ jobs: unittest_extended: docker: - - image: cimg/python:3.7 + - image: cimg/python:3.8 resource_class: xlarge steps: - checkout @@ -594,7 +594,7 @@ jobs: description: "What whl subfolder to upload to, e.g., blank or cu100/ (trailing slash is important)" type: string docker: - - image: cimg/python:3.7 + - image: cimg/python:3.8 steps: - attach_workspace: at: ~/workspace @@ -1017,7 +1017,7 @@ jobs: build_docs: <<: *binary_common docker: - - image: cimg/python:3.7 + - image: cimg/python:3.8 resource_class: 2xlarge+ steps: - attach_workspace: diff --git a/.circleci/regenerate.py b/.circleci/regenerate.py index 676ce2aebc4..2fee884ef1e 100755 --- a/.circleci/regenerate.py +++ b/.circleci/regenerate.py @@ -21,7 +21,7 @@ from jinja2 import select_autoescape -PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10"] +PYTHON_VERSIONS = ["3.8", "3.9", "3.10"] RC_PATTERN = r"/v[0-9]+(\.[0-9]+)*-rc[0-9]+/" @@ -55,16 +55,16 @@ def build_workflows(prefix="", filter_branch=None, upload=False, indentation=6, ): fb = "main" if not fb and ( - os_type == "linux" and cu_version == "cpu" and btype == "wheel" and python_version == "3.7" + os_type == "linux" and cu_version == "cpu" and btype == "wheel" and python_version == "3.8" ): # the fields must match the build_docs "requires" dependency fb = "/.*/" # Disable all Linux Wheels Workflows from CircleCI # since those will now be done through Nova. We'll keep - # around the py3.7 Linux Wheels build since the docs + # around the py3.8 Linux Wheels build since the docs # job depends on it. - if os_type == "linux" and btype == "wheel" and python_version != "3.7": + if os_type == "linux" and btype == "wheel" and python_version != "3.8": continue # Disable all Macos Wheels Workflows from CircleCI. @@ -98,7 +98,7 @@ def workflow_pair(btype, os_type, python_version, cu_version, unicode, prefix="" ) ) - # For the remaining py3.7 Linux Wheels job left around for the docs build, + # For the remaining py3.8 Linux Wheels job left around for the docs build, # we'll disable uploads. if os_type == "linux" and btype == "wheel": upload = False @@ -116,9 +116,9 @@ def workflow_pair(btype, os_type, python_version, cu_version, unicode, prefix="" def build_doc_job(filter_branch): job = { "name": "build_docs", - "python_version": "3.7", + "python_version": "3.8", "requires": [ - "binary_linux_wheel_py3.7_cpu", + "binary_linux_wheel_py3.8_cpu", ], } @@ -131,7 +131,7 @@ def upload_doc_job(filter_branch): job = { "name": "upload_docs", "context": "org-member", - "python_version": "3.7", + "python_version": "3.8", "requires": [ "build_docs", ], diff --git a/.circleci/unittest/ios/scripts/binary_ios_build.sh b/.circleci/unittest/ios/scripts/binary_ios_build.sh index e2ad7b0c55f..1f117481f2d 100755 --- a/.circleci/unittest/ios/scripts/binary_ios_build.sh +++ b/.circleci/unittest/ios/scripts/binary_ios_build.sh @@ -16,7 +16,7 @@ export PATH="~/anaconda/bin:${PATH}" source ~/anaconda/bin/activate # install dependencies -conda install numpy ninja pyyaml mkl mkl-include setuptools cmake cffi requests typing_extensions wget --yes +conda install numpy ninja pyyaml mkl mkl-include setuptools cmake cffi requests wget --yes conda install -c conda-forge valgrind --yes export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"} diff --git a/.github/workflows/prototype-tests-linux-gpu.yml b/.github/workflows/prototype-tests-linux-gpu.yml index fe1e46ab354..e52a07ea761 100644 --- a/.github/workflows/prototype-tests-linux-gpu.yml +++ b/.github/workflows/prototype-tests-linux-gpu.yml @@ -8,7 +8,6 @@ jobs: strategy: matrix: python-version: - - "3.7" - "3.8" - "3.9" - "3.10" diff --git a/.github/workflows/test-linux-cpu.yml b/.github/workflows/test-linux-cpu.yml index 234ad97f4d6..5dc7550d868 100644 --- a/.github/workflows/test-linux-cpu.yml +++ b/.github/workflows/test-linux-cpu.yml @@ -16,7 +16,7 @@ jobs: tests: strategy: matrix: - python_version: ["3.7", "3.8", "3.9", "3.10"] + python_version: ["3.8", "3.9", "3.10"] fail-fast: false uses: pytorch/test-infra/.github/workflows/linux_job.yml@main with: diff --git a/.github/workflows/tests-schedule.yml b/.github/workflows/tests-schedule.yml index 1e5a78207fe..5426fdc997a 100644 --- a/.github/workflows/tests-schedule.yml +++ b/.github/workflows/tests-schedule.yml @@ -18,7 +18,7 @@ jobs: - name: Set up python uses: actions/setup-python@v2 with: - python-version: 3.7 + python-version: 3.8 - name: Upgrade system packages run: python -m pip install --upgrade pip setuptools wheel diff --git a/README.rst b/README.rst index 0035df22b6c..615d96986ef 100644 --- a/README.rst +++ b/README.rst @@ -21,7 +21,7 @@ supported Python versions. +--------------------------+--------------------------+---------------------------------+ | ``torch`` | ``torchvision`` | ``python`` | +==========================+==========================+=================================+ -| ``main`` / ``nightly`` | ``main`` / ``nightly`` | ``>=3.7.2``, ``<=3.10`` | +| ``main`` / ``nightly`` | ``main`` / ``nightly`` | ``>=3.8``, ``<=3.10`` | +--------------------------+--------------------------+---------------------------------+ | ``1.13.0`` | ``0.14.0`` | ``>=3.7.2``, ``<=3.10`` | +--------------------------+--------------------------+---------------------------------+ diff --git a/packaging/pkg_helpers.bash b/packaging/pkg_helpers.bash index 5687d90feda..69f73391869 100644 --- a/packaging/pkg_helpers.bash +++ b/packaging/pkg_helpers.bash @@ -150,7 +150,7 @@ retry () { } # Inputs: -# PYTHON_VERSION (3.7, 3.8, 3.9) +# PYTHON_VERSION (3.8, 3.9, 3.10) # UNICODE_ABI (bool) # # Outputs: @@ -169,7 +169,6 @@ setup_wheel_python() { # Install native CentOS libJPEG, freetype and GnuTLS yum install -y libjpeg-turbo-devel freetype gnutls case "$PYTHON_VERSION" in - 3.7) python_abi=cp37-cp37m ;; 3.8) python_abi=cp38-cp38 ;; 3.9) python_abi=cp39-cp39 ;; 3.10) python_abi=cp310-cp310 ;; diff --git a/packaging/torchvision/conda_build_config.yaml b/packaging/torchvision/conda_build_config.yaml index 52b95952ddf..a7c25c6d534 100644 --- a/packaging/torchvision/conda_build_config.yaml +++ b/packaging/torchvision/conda_build_config.yaml @@ -7,7 +7,7 @@ c_compiler: cxx_compiler: - vs2017 # [win] python: - - 3.7 + - 3.8 # This differs from target_platform in that it determines what subdir the compiler # will target, not what subdir the compiler package will be itself. # For example, we need a win-64 vs2008_win-32 package, so that we compile win-32 diff --git a/packaging/vs2017/conda_build_config.yaml b/packaging/vs2017/conda_build_config.yaml index 2479ceb3e76..781814fd00e 100644 --- a/packaging/vs2017/conda_build_config.yaml +++ b/packaging/vs2017/conda_build_config.yaml @@ -5,7 +5,7 @@ c_compiler: cxx_compiler: - vs2017 # [win] python: - - 3.7 + - 3.8 # This differs from target_platform in that it determines what subdir the compiler # will target, not what subdir the compiler package will be itself. # For example, we need a win-64 vs2008_win-32 package, so that we compile win-32 diff --git a/packaging/vs2019/conda_build_config.yaml b/packaging/vs2019/conda_build_config.yaml index 7bd8de2ea5b..b4dc99341d0 100644 --- a/packaging/vs2019/conda_build_config.yaml +++ b/packaging/vs2019/conda_build_config.yaml @@ -5,7 +5,7 @@ c_compiler: cxx_compiler: - vs2019 # [win] python: - - 3.7 + - 3.8 # This differs from target_platform in that it determines what subdir the compiler # will target, not what subdir the compiler package will be itself. # For example, we need a win-64 vs2008_win-32 package, so that we compile win-32 diff --git a/pyproject.toml b/pyproject.toml index 8f0be4245bd..61e4a957fc5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ first_party_detection = false [tool.black] line-length = 120 -target-version = ["py37"] +target-version = ["py38"] [tool.ufmt] diff --git a/setup.py b/setup.py index 93ca4151d19..24b7a2edb94 100644 --- a/setup.py +++ b/setup.py @@ -58,7 +58,6 @@ def write_version_file(): pytorch_dep += "==" + os.getenv("PYTORCH_VERSION") requirements = [ - "typing_extensions", "numpy", "requests", pytorch_dep, @@ -546,7 +545,7 @@ def run(self): "scipy": ["scipy"], }, ext_modules=get_extensions(), - python_requires=">=3.7.2", + python_requires=">=3.8", cmdclass={ "build_ext": BuildExtension.with_options(no_python_abi_suffix=True), "clean": clean, diff --git a/torchvision/prototype/datasets/utils/_resource.py b/torchvision/prototype/datasets/utils/_resource.py index dc01c72de28..af4ede38dc0 100644 --- a/torchvision/prototype/datasets/utils/_resource.py +++ b/torchvision/prototype/datasets/utils/_resource.py @@ -2,7 +2,7 @@ import hashlib import itertools import pathlib -from typing import Any, Callable, IO, NoReturn, Optional, Sequence, Set, Tuple, Union +from typing import Any, Callable, IO, Literal, NoReturn, Optional, Sequence, Set, Tuple, Union from urllib.parse import urlparse from torchdata.datapipes.iter import ( @@ -23,7 +23,6 @@ download_url, extract_archive, ) -from typing_extensions import Literal class OnlineResource(abc.ABC): diff --git a/torchvision/prototype/transforms/_geometry.py b/torchvision/prototype/transforms/_geometry.py index a62fbf4263f..8282a5d4d5f 100644 --- a/torchvision/prototype/transforms/_geometry.py +++ b/torchvision/prototype/transforms/_geometry.py @@ -1,7 +1,7 @@ import math import numbers import warnings -from typing import Any, cast, Dict, List, Optional, Sequence, Tuple, Type, Union +from typing import Any, cast, Dict, List, Literal, Optional, Sequence, Tuple, Type, Union import PIL.Image import torch @@ -11,8 +11,6 @@ from torchvision.prototype.transforms import functional as F, InterpolationMode, Transform from torchvision.transforms.functional import _get_perspective_coeffs -from typing_extensions import Literal - from ._transform import _RandomApplyTransform from ._utils import ( _check_padding_arg, diff --git a/torchvision/prototype/transforms/_utils.py b/torchvision/prototype/transforms/_utils.py index cbf8992300e..b5ec05669e9 100644 --- a/torchvision/prototype/transforms/_utils.py +++ b/torchvision/prototype/transforms/_utils.py @@ -1,15 +1,13 @@ import functools import numbers from collections import defaultdict -from typing import Any, Dict, Sequence, Type, TypeVar, Union +from typing import Any, Dict, Literal, Sequence, Type, TypeVar, Union from torchvision.prototype import datapoints from torchvision.prototype.datapoints._datapoint import FillType, FillTypeJIT from torchvision.transforms.transforms import _check_sequence_input, _setup_angle, _setup_size # noqa: F401 -from typing_extensions import Literal - def _setup_float_or_seq(arg: Union[float, Sequence[float]], name: str, req_size: int = 2) -> Sequence[float]: if not isinstance(arg, (float, Sequence)): diff --git a/torchvision/transforms/functional_pil.py b/torchvision/transforms/functional_pil.py index 45c32782540..a75c46b4958 100644 --- a/torchvision/transforms/functional_pil.py +++ b/torchvision/transforms/functional_pil.py @@ -1,10 +1,9 @@ import numbers -from typing import Any, Dict, List, Optional, Sequence, Tuple, Union +from typing import Any, Dict, List, Literal, Optional, Sequence, Tuple, Union import numpy as np import torch from PIL import Image, ImageEnhance, ImageOps -from typing_extensions import Literal try: import accimage