From b199ce3a50c7684affabb3c820a12b924bcb8e2b Mon Sep 17 00:00:00 2001 From: Plamen Dimitrov Date: Tue, 7 May 2024 13:58:40 +0800 Subject: [PATCH] Drop python versions before 3.10 for security and type hint reasons There are security implications with python version 3.7 and even later ones and there is new type hint annotation functionality only available on versions after Python 3.10 while the last release will remain compatible with all previous versions for a while. --- .github/workflows/ci.yml | 3 +-- packaging/pip_requirements.txt | 8 +++----- packaging/pip_requirements_minimal.txt | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83adb229..a4dd94df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: strategy: matrix: - python-version: [3.7, 3.8, 3.9, 3.10.8, 3.11, 3.12] + python-version: [3.10.8, 3.11, 3.12] install_variant: ["pip"] include: - python-version: 3.10.8 @@ -74,7 +74,6 @@ jobs: sleep 3 - name: Run current semi-isolation semi-integration tests (to be separated in the future) run: | - if [[ ${{ matrix.python-version }} == '3.9' ]]; then export DISABLE_AUTOPY=1; fi if [[ ${{ matrix.python-version }} == '3.10.8' ]]; then export DISABLE_AUTOPY=1; fi if [[ ${{ matrix.python-version }} == '3.11' ]]; then export DISABLE_AUTOPY=1; fi if [[ ${{ matrix.python-version }} == '3.12' ]]; then export DISABLE_AUTOPY=1; fi diff --git a/packaging/pip_requirements.txt b/packaging/pip_requirements.txt index 38411a52..34685669 100644 --- a/packaging/pip_requirements.txt +++ b/packaging/pip_requirements.txt @@ -1,5 +1,5 @@ # minimal -Pillow==9.3.0; python_version >= '3.7' and python_version < '3.12' +Pillow==9.3.0; python_version < '3.12' Pillow==10.3.0; python_version >= '3.12' # backends @@ -8,10 +8,8 @@ autopy==4.0.0; python_version <= '3.8' and platform_python_implementation != "Py pytesseract==0.3.4; sys_platform != 'win32' tesserocr==2.5.1; sys_platform != 'win32' opencv-contrib-python==4.5.5.62; platform_python_implementation != "PyPy" -torch==1.13.0; python_version == '3.7' -torchvision==0.14.0; python_version == '3.7' -torch==2.2.0; python_version != '3.7' and 'generic' not in platform_release and platform_python_implementation != "PyPy" -torchvision==0.17.0 ; python_version != '3.7' and 'generic' not in platform_release and platform_python_implementation != "PyPy" +torch==2.2.0; 'generic' not in platform_release and platform_python_implementation != "PyPy" +torchvision==0.17.0 ; 'generic' not in platform_release and platform_python_implementation != "PyPy" vncdotool==0.12.0; sys_platform != 'win32' and platform_python_implementation != "PyPy" pyautogui==0.9.53; platform_python_implementation != "PyPy" # NOTE: These decared version of Pillow has issues with the latest Pyscreeze 0.1.30 thus there is a restrain on Pyscreeze installation diff --git a/packaging/pip_requirements_minimal.txt b/packaging/pip_requirements_minimal.txt index 75850e45..22dea521 100644 --- a/packaging/pip_requirements_minimal.txt +++ b/packaging/pip_requirements_minimal.txt @@ -1,3 +1,3 @@ # minimal -Pillow==9.3.0; python_version >= '3.7' and python_version < '3.12' +Pillow==9.3.0; python_version < '3.12' Pillow==10.3.0; python_version >= '3.12'