From 83e7dabcd911f8a6ee14d1e8108222c6f1ff21f8 Mon Sep 17 00:00:00 2001 From: Avasam Date: Sun, 6 Oct 2024 23:43:50 -0400 Subject: [PATCH 01/23] Bump versions --- .github/workflows/lint-and-build.yml | 9 ++++++--- scripts/requirements.txt | 19 ++++++++++--------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/lint-and-build.yml b/.github/workflows/lint-and-build.yml index 414cc845..0ca3caff 100644 --- a/.github/workflows/lint-and-build.yml +++ b/.github/workflows/lint-and-build.yml @@ -46,7 +46,7 @@ jobs: # Ruff is version and platform sensible matrix: os: [windows-latest, ubuntu-22.04] - python-version: ["3.11", "3.12"] + python-version: ["3.11", "3.12", "3.13"] steps: - name: Checkout ${{ github.repository }}/${{ github.ref }} uses: actions/checkout@v4 @@ -66,7 +66,7 @@ jobs: # Pyright is version and platform sensible matrix: os: [windows-latest, ubuntu-22.04] - python-version: ["3.11", "3.12"] + python-version: ["3.11", "3.12", "3.13"] steps: - name: Checkout ${{ github.repository }}/${{ github.ref }} uses: actions/checkout@v4 @@ -99,7 +99,10 @@ jobs: # Only the Python version we plan on shipping matters. matrix: os: [windows-latest, ubuntu-22.04] - python-version: ["3.11", "3.12"] + python-version: ["3.12", "3.13"] + include: + - os: ubuntu-22.04 + python-version: "3.11" # I had some Qt Wayland issues on 3.12 for ubuntu-22.04 iirc. TODO: test it steps: - name: Checkout ${{ github.repository }}/${{ github.ref }} uses: actions/checkout@v4 diff --git a/scripts/requirements.txt b/scripts/requirements.txt index 1e9ba49a..e4e66a33 100644 --- a/scripts/requirements.txt +++ b/scripts/requirements.txt @@ -5,32 +5,33 @@ # Dependencies: git+https://github.com/boppreh/keyboard.git#egg=keyboard # Fix install on macos and linux-ci https://github.com/boppreh/keyboard/pull/568 Levenshtein>=0.25 -# Some modules used by OpenCV are not compiled for Numpy 2 yet on Linux. Error happens on import at runtime -numpy>=1.26,<2.0 # Python 3.12 support -opencv-python-headless>=4.9.0.80 # Typing fixes +numpy>=2.1 # Python 3.13 support +opencv-python-headless>=4.10 # NumPy 2 support packaging -psutil>=5.9.6 # Python 3.12 fixes +psutil>=6.0.0 # Python 3.13 support # PyAutoGUI # See install.ps1 PyWinCtl>=0.0.42 # py.typed # When needed, dev builds can be found at https://download.qt.io/snapshots/ci/pyside/dev?C=M;O=D -PySide6-Essentials>=6.6.0 # Python 3.12 support -scipy>=1.11.2 # Python 3.12 support +PySide6-Essentials>=6.6.0 ; python_version <= '3.12' # Python 3.12 support +https://download.qt.io/snapshots/ci/pyside/dev/c512b506b565578770c671b11afb78427ca8d012/pyside6/PySide6_Essentials-6.8.0a1.dev1727870855-cp39-abi3-win_amd64.whl ; python_version >= '3.13' +https://download.qt.io/snapshots/ci/pyside/dev/c512b506b565578770c671b11afb78427ca8d012/pyside6/shiboken6-6.8.0a1.dev1727870855-cp39-abi3-win_amd64.whl ; python_version >= '3.13' +scipy>=1.14.1 # Python 3.13 support tomli-w typing-extensions>=4.4.0 # @override decorator support # # Build and compile resources -pyinstaller>=5.13 # Python 3.12 support +pyinstaller>=6.10.0 # Python 3.13 support # # https://peps.python.org/pep-0508/#environment-markers # # Windows-only dependencies: comtypes<1.4.5 ; sys_platform == 'win32' # https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/807 pygrabber>=0.2 ; sys_platform == 'win32' # Completed types -pywin32>=301 ; sys_platform == 'win32' +pywin32>=307 ; sys_platform == 'win32' # Python 3.13 support winsdk>=1.0.0b10 ; sys_platform == 'win32' # Python 3.12 support # D3DShot # See install.ps1 # # Linux-only dependencies PyScreeze ; sys_platform == 'linux' -pillow ; sys_platform == 'linux' # Necessary for PyScreeze. For unknown reasons it's not pulled in on CI +pillow>=11.0 ; sys_platform == 'linux' # Python 3.13 support # Necessary for PyScreeze. For unknown reasons it's not pulled in on CI python-xlib ; sys_platform == 'linux' From d107efc78b7c519c40cd541a533f86656d8535a8 Mon Sep 17 00:00:00 2001 From: Avasam Date: Mon, 7 Oct 2024 00:07:51 -0400 Subject: [PATCH 02/23] Migrate from winsdk to PyWinRT --- scripts/requirements.txt | 14 +++++++++++--- src/capture_method/WindowsGraphicsCaptureMethod.py | 12 ++++++------ src/region_selection.py | 6 +++--- src/utils.py | 4 ++-- 4 files changed, 22 insertions(+), 14 deletions(-) diff --git a/scripts/requirements.txt b/scripts/requirements.txt index e4e66a33..6aacb7e5 100644 --- a/scripts/requirements.txt +++ b/scripts/requirements.txt @@ -13,8 +13,8 @@ psutil>=6.0.0 # Python 3.13 support PyWinCtl>=0.0.42 # py.typed # When needed, dev builds can be found at https://download.qt.io/snapshots/ci/pyside/dev?C=M;O=D PySide6-Essentials>=6.6.0 ; python_version <= '3.12' # Python 3.12 support -https://download.qt.io/snapshots/ci/pyside/dev/c512b506b565578770c671b11afb78427ca8d012/pyside6/PySide6_Essentials-6.8.0a1.dev1727870855-cp39-abi3-win_amd64.whl ; python_version >= '3.13' -https://download.qt.io/snapshots/ci/pyside/dev/c512b506b565578770c671b11afb78427ca8d012/pyside6/shiboken6-6.8.0a1.dev1727870855-cp39-abi3-win_amd64.whl ; python_version >= '3.13' +# https://download.qt.io/snapshots/ci/pyside/dev/c512b506b565578770c671b11afb78427ca8d012/pyside6/PySide6_Essentials-6.8.0a1.dev1727870855-cp39-abi3-win_amd64.whl ; python_version >= '3.13' +# https://download.qt.io/snapshots/ci/pyside/dev/c512b506b565578770c671b11afb78427ca8d012/pyside6/shiboken6-6.8.0a1.dev1727870855-cp39-abi3-win_amd64.whl ; python_version >= '3.13' scipy>=1.14.1 # Python 3.13 support tomli-w typing-extensions>=4.4.0 # @override decorator support @@ -28,7 +28,15 @@ pyinstaller>=6.10.0 # Python 3.13 support comtypes<1.4.5 ; sys_platform == 'win32' # https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/807 pygrabber>=0.2 ; sys_platform == 'win32' # Completed types pywin32>=307 ; sys_platform == 'win32' # Python 3.13 support -winsdk>=1.0.0b10 ; sys_platform == 'win32' # Python 3.12 support +winrt-Windows.AI.MachineLearning>=2.2.0 ; sys_platform == 'win32' # Python 3.13 support +winrt-Windows.Foundation>=2.2.0 ; sys_platform == 'win32' # Python 3.13 support +winrt-Windows.Graphics.Capture>=2.2.0 ; sys_platform == 'win32' # Python 3.13 support +winrt-Windows.Graphics.Capture.Interop>=2.2.0 ; sys_platform == 'win32' # Python 3.13 support +winrt-Windows.Graphics.DirectX>=2.2.0 ; sys_platform == 'win32' # Python 3.13 support +winrt-Windows.Graphics.DirectX.Direct3D11>=2.2.0 ; sys_platform == 'win32' # Python 3.13 support +winrt-Windows.Graphics.Imaging>=2.2.0 ; sys_platform == 'win32' # Python 3.13 support +winrt-Windows.Graphics>=2.2.0 ; sys_platform == 'win32' # Python 3.13 support +winrt-Windows.Media.Capture>=2.2.0 ; sys_platform == 'win32' # Python 3.13 support # D3DShot # See install.ps1 # # Linux-only dependencies diff --git a/src/capture_method/WindowsGraphicsCaptureMethod.py b/src/capture_method/WindowsGraphicsCaptureMethod.py index dd632b66..d599c2e6 100644 --- a/src/capture_method/WindowsGraphicsCaptureMethod.py +++ b/src/capture_method/WindowsGraphicsCaptureMethod.py @@ -9,12 +9,12 @@ import win32gui from cv2.typing import MatLike from typing_extensions import override -from winsdk.windows.graphics import SizeInt32 -from winsdk.windows.graphics.capture import Direct3D11CaptureFramePool, GraphicsCaptureSession -from winsdk.windows.graphics.capture.interop import create_for_window -from winsdk.windows.graphics.directx import DirectXPixelFormat -from winsdk.windows.graphics.directx.direct3d11 import IDirect3DSurface -from winsdk.windows.graphics.imaging import BitmapBufferAccessMode, SoftwareBitmap +from winrt.windows.graphics import SizeInt32 +from winrt.windows.graphics.capture import Direct3D11CaptureFramePool, GraphicsCaptureSession +from winrt.windows.graphics.capture.interop import create_for_window +from winrt.windows.graphics.directx import DirectXPixelFormat +from winrt.windows.graphics.directx.direct3d11 import IDirect3DSurface +from winrt.windows.graphics.imaging import BitmapBufferAccessMode, SoftwareBitmap from capture_method.CaptureMethodBase import CaptureMethodBase from utils import ( diff --git a/src/region_selection.py b/src/region_selection.py index cbed6298..c8f92c8e 100644 --- a/src/region_selection.py +++ b/src/region_selection.py @@ -32,9 +32,9 @@ SM_XVIRTUALSCREEN, SM_YVIRTUALSCREEN, ) - from winsdk._winrt import initialize_with_window # noqa: PLC2701 - from winsdk.windows.foundation import AsyncStatus, IAsyncOperation - from winsdk.windows.graphics.capture import GraphicsCaptureItem, GraphicsCapturePicker + from winrt._winrt import initialize_with_window # noqa: PLC2701 + from winrt.windows.foundation import AsyncStatus, IAsyncOperation + from winrt.windows.graphics.capture import GraphicsCaptureItem, GraphicsCapturePicker if sys.platform == "linux": from Xlib.display import Display diff --git a/src/utils.py b/src/utils.py index de56f021..f82018a3 100644 --- a/src/utils.py +++ b/src/utils.py @@ -25,8 +25,8 @@ import win32gui import win32ui from pygrabber.dshow_graph import FilterGraph - from winsdk.windows.ai.machinelearning import LearningModelDevice, LearningModelDeviceKind - from winsdk.windows.media.capture import MediaCapture + from winrt.windows.ai.machinelearning import LearningModelDevice, LearningModelDeviceKind + from winrt.windows.media.capture import MediaCapture STARTUPINFO: TypeAlias = subprocess.STARTUPINFO else: From ec5fc622798f238cadc6ea966fe76dd743c6f1dc Mon Sep 17 00:00:00 2001 From: Avasam Date: Mon, 7 Oct 2024 01:07:40 -0400 Subject: [PATCH 03/23] move hack --- scripts/install.ps1 | 9 ++++++--- scripts/requirements.txt | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/install.ps1 b/scripts/install.ps1 index 9144f38e..e5a6109e 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -45,12 +45,15 @@ If ($IsLinux) { # https://bugreports.qt.io/browse/PYSIDE-2616?focusedId=777285&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-777285 &"$python" -m pip uninstall shiboken6 -y &"$python" -m pip install -r "$PSScriptRoot/requirements$dev.txt" --upgrade +# Temporary hack to test install for Python 3.13 +&"$python" -m pip install ` + "https://download.qt.io/snapshots/ci/pyside/dev/c512b506b565578770c671b11afb78427ca8d012/pyside6/PySide6_Essentials-6.8.0a1.dev1727870855-cp39-abi3-win_amd64.whl ; python_version >= '3.13'" ` + "https://download.qt.io/snapshots/ci/pyside/dev/c512b506b565578770c671b11afb78427ca8d012/pyside6/shiboken6-6.8.0a1.dev1727870855-cp39-abi3-win_amd64.whl ; python_version >= '3.13'" ` + --ignore-requires-python # These libraries install extra requirements we don't want # Open suggestion for support in requirements files: https://github.com/pypa/pip/issues/9948 & https://github.com/pypa/pip/pull/10837 # PyAutoGUI: We only use it for hotkeys -# D3DShot: Will install Pillow, which we don't use on Windows. -# Even then, PyPI with Pillow>=7.2.0 will install 0.1.3 instead of 0.1.5 -&"$python" -m pip install PyAutoGUI "D3DShot>=0.1.5 ; sys_platform == 'win32'" --no-deps --upgrade +&"$python" -m pip install PyAutoGUI --no-deps --upgrade # Uninstall optional dependencies if PyAutoGUI or D3DShot was installed outside this script # PyScreeze -> pyscreenshot -> mss deps call SetProcessDpiAwareness, used to be installed on Windows diff --git a/scripts/requirements.txt b/scripts/requirements.txt index 6aacb7e5..8cc5c704 100644 --- a/scripts/requirements.txt +++ b/scripts/requirements.txt @@ -26,6 +26,7 @@ pyinstaller>=6.10.0 # Python 3.13 support # # Windows-only dependencies: comtypes<1.4.5 ; sys_platform == 'win32' # https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/807 +git+https://github.com/Avasam/typed-D3DShot.git@typed-D3DShot ; sys_platform == 'win32' pygrabber>=0.2 ; sys_platform == 'win32' # Completed types pywin32>=307 ; sys_platform == 'win32' # Python 3.13 support winrt-Windows.AI.MachineLearning>=2.2.0 ; sys_platform == 'win32' # Python 3.13 support From de78265691cb32d8c81f2232af77886d8f96f38e Mon Sep 17 00:00:00 2001 From: Avasam Date: Mon, 7 Oct 2024 01:09:37 -0400 Subject: [PATCH 04/23] -dev --- .github/workflows/lint-and-build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint-and-build.yml b/.github/workflows/lint-and-build.yml index 0ca3caff..dc178942 100644 --- a/.github/workflows/lint-and-build.yml +++ b/.github/workflows/lint-and-build.yml @@ -46,7 +46,7 @@ jobs: # Ruff is version and platform sensible matrix: os: [windows-latest, ubuntu-22.04] - python-version: ["3.11", "3.12", "3.13"] + python-version: ["3.11", "3.12", "3.13-dev"] steps: - name: Checkout ${{ github.repository }}/${{ github.ref }} uses: actions/checkout@v4 @@ -66,7 +66,7 @@ jobs: # Pyright is version and platform sensible matrix: os: [windows-latest, ubuntu-22.04] - python-version: ["3.11", "3.12", "3.13"] + python-version: ["3.11", "3.12", "3.13-dev"] steps: - name: Checkout ${{ github.repository }}/${{ github.ref }} uses: actions/checkout@v4 @@ -99,7 +99,7 @@ jobs: # Only the Python version we plan on shipping matters. matrix: os: [windows-latest, ubuntu-22.04] - python-version: ["3.12", "3.13"] + python-version: ["3.12", "3.13-dev"] include: - os: ubuntu-22.04 python-version: "3.11" # I had some Qt Wayland issues on 3.12 for ubuntu-22.04 iirc. TODO: test it From aa4b3992975e05bc850a6c0655fc32dd0f951ee3 Mon Sep 17 00:00:00 2001 From: Avasam Date: Mon, 7 Oct 2024 16:05:05 -0400 Subject: [PATCH 05/23] Temp disable comtypes code paths for Python 3.13 https://github.com/enthought/comtypes/issues/618 --- .vscode/launch.json | 6 +++--- mypy.ini | 1 + scripts/install.ps1 | 3 ++- scripts/requirements-dev.txt | 1 - src/capture_method/__init__.py | 15 ++++++++++----- src/utils.py | 7 +++++-- 6 files changed, 21 insertions(+), 12 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 957b8d50..270f80e1 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -6,7 +6,7 @@ "configurations": [ { "name": "Python: AutoSplit (debug non-user code)", - "type": "python", + "type": "debugpy", "request": "launch", "preLaunchTask": "Compile resources", "program": "src/AutoSplit.py", @@ -15,7 +15,7 @@ }, { "name": "Python: AutoSplit", - "type": "python", + "type": "debugpy", "request": "launch", "preLaunchTask": "Compile resources", "program": "src/AutoSplit.py", @@ -24,7 +24,7 @@ }, { "name": "Python: AutoSplit --auto-controlled", - "type": "python", + "type": "debugpy", "request": "launch", "preLaunchTask": "Compile resources", "program": "src/AutoSplit.py", diff --git a/mypy.ini b/mypy.ini index 346c90b6..bb2aaa18 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1,6 +1,7 @@ ; We don't run mypy in the CI. This is just to help anyone who would like to use it manually. ; Namely, the mypy_primer tool. [mypy] +python_version = 3.11 show_column_numbers = true mypy_path = $MYPY_CONFIG_FILE_DIR/typings implicit_reexport = true diff --git a/scripts/install.ps1 b/scripts/install.ps1 index e5a6109e..58d90e01 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -43,7 +43,8 @@ If ($IsLinux) { &"$python" -m pip install wheel pip setuptools --upgrade # Upgrading QT to 6.6.2 w/o first uninstalling shiboken6 can lead to issues # https://bugreports.qt.io/browse/PYSIDE-2616?focusedId=777285&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-777285 -&"$python" -m pip uninstall shiboken6 -y +# Updating from D3DShot to typed-D3DShot w/o uninstalling can cause issues (keep until version bump on PyPI) +&"$python" -m pip uninstall shiboken6 d3dshot types-D3DShot -y &"$python" -m pip install -r "$PSScriptRoot/requirements$dev.txt" --upgrade # Temporary hack to test install for Python 3.13 &"$python" -m pip install ` diff --git a/scripts/requirements-dev.txt b/scripts/requirements-dev.txt index 526ebb85..913108e0 100644 --- a/scripts/requirements-dev.txt +++ b/scripts/requirements-dev.txt @@ -15,7 +15,6 @@ ruff>=0.6.8 # Pre-commit fix # Must match .pre-commit-config.yaml # # Types -types-D3DShot ; sys_platform == 'win32' types-keyboard types-psutil types-PyAutoGUI diff --git a/src/capture_method/__init__.py b/src/capture_method/__init__.py index 6d25cda1..007e8ee4 100644 --- a/src/capture_method/__init__.py +++ b/src/capture_method/__init__.py @@ -21,15 +21,16 @@ if sys.platform == "win32": from _ctypes import COMError # noqa: PLC2701 # comtypes is untyped - from pygrabber.dshow_graph import FilterGraph - from capture_method.BitBltCaptureMethod import BitBltCaptureMethod - from capture_method.DesktopDuplicationCaptureMethod import DesktopDuplicationCaptureMethod from capture_method.ForceFullContentRenderingCaptureMethod import ( ForceFullContentRenderingCaptureMethod, ) from capture_method.WindowsGraphicsCaptureMethod import WindowsGraphicsCaptureMethod + if sys.version_info < (3, 13): + # https://github.com/enthought/comtypes/issues/618 + from capture_method.DesktopDuplicationCaptureMethod import DesktopDuplicationCaptureMethod + if sys.platform == "linux": import pyscreeze from PIL import UnidentifiedImageError, features @@ -137,7 +138,8 @@ def get(self, key: CaptureMethodEnum, default: object = None, /): import d3dshot d3dshot.create(capture_output="numpy") - except (ModuleNotFoundError, COMError): + except (ModuleNotFoundError, COMError, NameError): + # NameError: https://github.com/enthought/comtypes/issues/618 pass else: CAPTURE_METHODS[CaptureMethodEnum.DESKTOP_DUPLICATION] = DesktopDuplicationCaptureMethod @@ -182,7 +184,10 @@ class CameraInfo: def get_input_devices(): - if sys.platform == "win32": + if sys.platform == "win32" and sys.version_info < (3, 13): + # https://github.com/enthought/comtypes/issues/618 + from pygrabber.dshow_graph import FilterGraph # noqa: PLC0415 + return FilterGraph().get_input_devices() cameras: list[str] = [] diff --git a/src/utils.py b/src/utils.py index f82018a3..9e11f03a 100644 --- a/src/utils.py +++ b/src/utils.py @@ -24,7 +24,6 @@ import win32gui import win32ui - from pygrabber.dshow_graph import FilterGraph from winrt.windows.ai.machinelearning import LearningModelDevice, LearningModelDeviceKind from winrt.windows.media.capture import MediaCapture @@ -159,8 +158,12 @@ def get_window_bounds(hwnd: int) -> tuple[int, int, int, int]: # Note: maybe reorganize capture_method module to have # different helper modules and a methods submodule def get_input_device_resolution(index: int) -> tuple[int, int] | None: - if sys.platform != "win32": + if sys.platform != "win32" or sys.version_info >= (3, 13): return (0, 0) + + # https://github.com/enthought/comtypes/issues/618 + from pygrabber.dshow_graph import FilterGraph # noqa: PLC0415 + filter_graph = FilterGraph() try: filter_graph.add_video_input_device(index) From 725566250ac4a7af81eea8ed14e387225d6c92b5 Mon Sep 17 00:00:00 2001 From: Avasam Date: Mon, 7 Oct 2024 20:06:24 -0400 Subject: [PATCH 06/23] Running commands w/ Ruff --- .gitignore | 1 + pyproject.toml | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 0a6ae97f..197f7a39 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ env/ build/ dist/ *.prof +*.lock # Generated **/gen/*.py !**/gen/*.pyi diff --git a/pyproject.toml b/pyproject.toml index ef243b38..f4d1d23d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,7 @@ +[project] +name = "AutoSplit" +version = "0" + # https://github.com/microsoft/pyright/blob/main/docs/configuration.md#sample-pyprojecttoml-file [tool.pyright] typeCheckingMode = "strict" From f2060245f79d8522428de9593751fa3c6945926b Mon Sep 17 00:00:00 2001 From: Avasam Date: Mon, 7 Oct 2024 20:16:30 -0400 Subject: [PATCH 07/23] pillow from github --- scripts/requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/requirements.txt b/scripts/requirements.txt index 8cc5c704..f81f54e7 100644 --- a/scripts/requirements.txt +++ b/scripts/requirements.txt @@ -42,5 +42,6 @@ winrt-Windows.Media.Capture>=2.2.0 ; sys_platform == 'win32' # Python 3.13 supp # # Linux-only dependencies PyScreeze ; sys_platform == 'linux' -pillow>=11.0 ; sys_platform == 'linux' # Python 3.13 support # Necessary for PyScreeze. For unknown reasons it's not pulled in on CI +# pillow>=11.0 ; sys_platform == 'linux' # Python 3.13 support # Necessary for PyScreeze. For unknown reasons it's not pulled in on CI +git+https://github.com/python-pillow/Pillow.git ; sys_platform == 'linux' python-xlib ; sys_platform == 'linux' From f66ff5272d4ccc7b57a3572d0d0f599681e1524c Mon Sep 17 00:00:00 2001 From: Avasam Date: Tue, 15 Oct 2024 17:45:05 -0400 Subject: [PATCH 08/23] Bump pillow, use non-dev 3.13 --- .github/workflows/lint-and-build.yml | 6 +++--- scripts/requirements.txt | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lint-and-build.yml b/.github/workflows/lint-and-build.yml index dc178942..0ca3caff 100644 --- a/.github/workflows/lint-and-build.yml +++ b/.github/workflows/lint-and-build.yml @@ -46,7 +46,7 @@ jobs: # Ruff is version and platform sensible matrix: os: [windows-latest, ubuntu-22.04] - python-version: ["3.11", "3.12", "3.13-dev"] + python-version: ["3.11", "3.12", "3.13"] steps: - name: Checkout ${{ github.repository }}/${{ github.ref }} uses: actions/checkout@v4 @@ -66,7 +66,7 @@ jobs: # Pyright is version and platform sensible matrix: os: [windows-latest, ubuntu-22.04] - python-version: ["3.11", "3.12", "3.13-dev"] + python-version: ["3.11", "3.12", "3.13"] steps: - name: Checkout ${{ github.repository }}/${{ github.ref }} uses: actions/checkout@v4 @@ -99,7 +99,7 @@ jobs: # Only the Python version we plan on shipping matters. matrix: os: [windows-latest, ubuntu-22.04] - python-version: ["3.12", "3.13-dev"] + python-version: ["3.12", "3.13"] include: - os: ubuntu-22.04 python-version: "3.11" # I had some Qt Wayland issues on 3.12 for ubuntu-22.04 iirc. TODO: test it diff --git a/scripts/requirements.txt b/scripts/requirements.txt index 8bfd3327..5ee2066f 100644 --- a/scripts/requirements.txt +++ b/scripts/requirements.txt @@ -42,6 +42,5 @@ typed-D3DShot[numpy]>=1.0.1 ; sys_platform == 'win32' # # Linux-only dependencies PyScreeze ; sys_platform == 'linux' -# pillow>=11.0 ; sys_platform == 'linux' # Python 3.13 support # Necessary for PyScreeze. For unknown reasons it's not pulled in on CI -git+https://github.com/python-pillow/Pillow.git ; sys_platform == 'linux' +pillow>=11.0 ; sys_platform == 'linux' # Python 3.13 support # Necessary for PyScreeze. For unknown reasons it's not pulled in on CI python-xlib ; sys_platform == 'linux' From bf596385b19f5abe9168e5cde6243491df633303 Mon Sep 17 00:00:00 2001 From: Avasam Date: Wed, 16 Oct 2024 01:18:35 -0400 Subject: [PATCH 09/23] typed-D3DShot --- pyproject.toml | 2 +- scripts/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f4d1d23d..00a8c6f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "AutoSplit" -version = "0" +dynamic = ["version"] # https://github.com/microsoft/pyright/blob/main/docs/configuration.md#sample-pyprojecttoml-file [tool.pyright] diff --git a/scripts/requirements.txt b/scripts/requirements.txt index 5ee2066f..5c862258 100644 --- a/scripts/requirements.txt +++ b/scripts/requirements.txt @@ -26,7 +26,7 @@ pyinstaller>=6.10.0 # Python 3.13 support # # Windows-only dependencies: comtypes<1.4.5 ; sys_platform == 'win32' # https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/807 -git+https://github.com/Avasam/typed-D3DShot.git@typed-D3DShot ; sys_platform == 'win32' +typed-D3DShot >= 1.0.1; sys_platform == 'win32' pygrabber>=0.2 ; sys_platform == 'win32' # Completed types pywin32>=307 ; sys_platform == 'win32' # Python 3.13 support winrt-Windows.AI.MachineLearning>=2.2.0 ; sys_platform == 'win32' # Python 3.13 support From be9acdd1331ea5071281518a3beba95c24cd2a17 Mon Sep 17 00:00:00 2001 From: Avasam Date: Wed, 16 Oct 2024 01:18:59 -0400 Subject: [PATCH 10/23] Update scripts/requirements.txt --- scripts/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/requirements.txt b/scripts/requirements.txt index 5c862258..870ee416 100644 --- a/scripts/requirements.txt +++ b/scripts/requirements.txt @@ -26,7 +26,7 @@ pyinstaller>=6.10.0 # Python 3.13 support # # Windows-only dependencies: comtypes<1.4.5 ; sys_platform == 'win32' # https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/807 -typed-D3DShot >= 1.0.1; sys_platform == 'win32' +typed-D3DShot[numpy] >= 1.0.1; sys_platform == 'win32' pygrabber>=0.2 ; sys_platform == 'win32' # Completed types pywin32>=307 ; sys_platform == 'win32' # Python 3.13 support winrt-Windows.AI.MachineLearning>=2.2.0 ; sys_platform == 'win32' # Python 3.13 support From 3c0c512771e2787f69801dbef233a2a6ac2b3b4a Mon Sep 17 00:00:00 2001 From: Avasam Date: Wed, 16 Oct 2024 13:42:13 -0400 Subject: [PATCH 11/23] Update comtypes thanks to new pyinstaller-hooks-contrib release --- scripts/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/requirements.txt b/scripts/requirements.txt index 870ee416..38e3e2ba 100644 --- a/scripts/requirements.txt +++ b/scripts/requirements.txt @@ -25,7 +25,7 @@ pyinstaller>=6.10.0 # Python 3.13 support # https://peps.python.org/pep-0508/#environment-markers # # Windows-only dependencies: -comtypes<1.4.5 ; sys_platform == 'win32' # https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/807 +comtypes>=1.4.5 ; sys_platform == 'win32' # Support added in pyinstaller-hooks-contrib 2024.9 typed-D3DShot[numpy] >= 1.0.1; sys_platform == 'win32' pygrabber>=0.2 ; sys_platform == 'win32' # Completed types pywin32>=307 ; sys_platform == 'win32' # Python 3.13 support From aa644a3b8fb07bbee814881b30c974737e9c08ce Mon Sep 17 00:00:00 2001 From: Avasam Date: Wed, 16 Oct 2024 13:44:22 -0400 Subject: [PATCH 12/23] comtypes isn't even a direct dependency... --- scripts/requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/requirements.txt b/scripts/requirements.txt index 38e3e2ba..886e4bf7 100644 --- a/scripts/requirements.txt +++ b/scripts/requirements.txt @@ -25,7 +25,6 @@ pyinstaller>=6.10.0 # Python 3.13 support # https://peps.python.org/pep-0508/#environment-markers # # Windows-only dependencies: -comtypes>=1.4.5 ; sys_platform == 'win32' # Support added in pyinstaller-hooks-contrib 2024.9 typed-D3DShot[numpy] >= 1.0.1; sys_platform == 'win32' pygrabber>=0.2 ; sys_platform == 'win32' # Completed types pywin32>=307 ; sys_platform == 'win32' # Python 3.13 support From 11378023e2f8ac1b3782cd047e5ded5f5b0ea29b Mon Sep 17 00:00:00 2001 From: Avasam Date: Thu, 17 Oct 2024 11:09:35 -0400 Subject: [PATCH 13/23] Update scripts/requirements.txt --- scripts/requirements.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/requirements.txt b/scripts/requirements.txt index 886e4bf7..59fd0da6 100644 --- a/scripts/requirements.txt +++ b/scripts/requirements.txt @@ -12,9 +12,8 @@ psutil>=6.0.0 # Python 3.13 support # PyAutoGUI # See install.ps1 PyWinCtl>=0.0.42 # py.typed # When needed, dev builds can be found at https://download.qt.io/snapshots/ci/pyside/dev?C=M;O=D -PySide6-Essentials>=6.6.0 ; python_version <= '3.12' # Python 3.12 support -# https://download.qt.io/snapshots/ci/pyside/dev/c512b506b565578770c671b11afb78427ca8d012/pyside6/PySide6_Essentials-6.8.0a1.dev1727870855-cp39-abi3-win_amd64.whl ; python_version >= '3.13' -# https://download.qt.io/snapshots/ci/pyside/dev/c512b506b565578770c671b11afb78427ca8d012/pyside6/shiboken6-6.8.0a1.dev1727870855-cp39-abi3-win_amd64.whl ; python_version >= '3.13' +PySide6-Essentials>=6.8.0.1 # Python 3.13 support +shiboken6>=6.8.0.1 # Help stay in sync with PySide6, especially for dev builds and re-installs scipy>=1.14.1 # Python 3.13 support tomli-w>=1.1.0 # Typing fixes typing-extensions>=4.4.0 # @override decorator support From 9ada46fb0634c7f908883b53994872e8352cec3d Mon Sep 17 00:00:00 2001 From: Avasam Date: Thu, 17 Oct 2024 11:15:04 -0400 Subject: [PATCH 14/23] Apply suggestions from code review --- scripts/install.ps1 | 4 ++-- scripts/requirements.txt | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/install.ps1 b/scripts/install.ps1 index 58d90e01..3fb39051 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -48,8 +48,8 @@ If ($IsLinux) { &"$python" -m pip install -r "$PSScriptRoot/requirements$dev.txt" --upgrade # Temporary hack to test install for Python 3.13 &"$python" -m pip install ` - "https://download.qt.io/snapshots/ci/pyside/dev/c512b506b565578770c671b11afb78427ca8d012/pyside6/PySide6_Essentials-6.8.0a1.dev1727870855-cp39-abi3-win_amd64.whl ; python_version >= '3.13'" ` - "https://download.qt.io/snapshots/ci/pyside/dev/c512b506b565578770c671b11afb78427ca8d012/pyside6/shiboken6-6.8.0a1.dev1727870855-cp39-abi3-win_amd64.whl ; python_version >= '3.13'" ` + PySide6-Essentials>=6.8.0.1 ; python_version >= '3.13'" ` + shiboken6>=6.8.0.1 ; python_version >= '3.13'" ` --ignore-requires-python # These libraries install extra requirements we don't want # Open suggestion for support in requirements files: https://github.com/pypa/pip/issues/9948 & https://github.com/pypa/pip/pull/10837 diff --git a/scripts/requirements.txt b/scripts/requirements.txt index 59fd0da6..c52dfdf9 100644 --- a/scripts/requirements.txt +++ b/scripts/requirements.txt @@ -12,8 +12,7 @@ psutil>=6.0.0 # Python 3.13 support # PyAutoGUI # See install.ps1 PyWinCtl>=0.0.42 # py.typed # When needed, dev builds can be found at https://download.qt.io/snapshots/ci/pyside/dev?C=M;O=D -PySide6-Essentials>=6.8.0.1 # Python 3.13 support -shiboken6>=6.8.0.1 # Help stay in sync with PySide6, especially for dev builds and re-installs +PySide6-Essentials>=6.8.0.1 ; python_version <= '3.12' # Python 3.13 support scipy>=1.14.1 # Python 3.13 support tomli-w>=1.1.0 # Typing fixes typing-extensions>=4.4.0 # @override decorator support From 57f8e8c6aa58eea0903c326c2f88e5c4c5a1bdb4 Mon Sep 17 00:00:00 2001 From: Avasam Date: Thu, 17 Oct 2024 11:25:01 -0400 Subject: [PATCH 15/23] Update scripts/install.ps1 --- scripts/install.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install.ps1 b/scripts/install.ps1 index 3fb39051..a6ab3e1c 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -48,8 +48,8 @@ If ($IsLinux) { &"$python" -m pip install -r "$PSScriptRoot/requirements$dev.txt" --upgrade # Temporary hack to test install for Python 3.13 &"$python" -m pip install ` - PySide6-Essentials>=6.8.0.1 ; python_version >= '3.13'" ` - shiboken6>=6.8.0.1 ; python_version >= '3.13'" ` + "PySide6-Essentials>=6.8.0.1 ; python_version >= '3.13'" ` + "shiboken6>=6.8.0.1 ; python_version >= '3.13'" ` --ignore-requires-python # These libraries install extra requirements we don't want # Open suggestion for support in requirements files: https://github.com/pypa/pip/issues/9948 & https://github.com/pypa/pip/pull/10837 From 7eaac33eccc3a44715c98a9121190a493b584fab Mon Sep 17 00:00:00 2001 From: Avasam Date: Sun, 20 Oct 2024 14:23:52 -0400 Subject: [PATCH 16/23] Bump comtypes --- scripts/requirements.txt | 5 ++++- src/capture_method/__init__.py | 12 ++++-------- src/utils.py | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/scripts/requirements.txt b/scripts/requirements.txt index c52dfdf9..0e7be656 100644 --- a/scripts/requirements.txt +++ b/scripts/requirements.txt @@ -16,13 +16,16 @@ PySide6-Essentials>=6.8.0.1 ; python_version <= '3.12' # Python 3.13 support scipy>=1.14.1 # Python 3.13 support tomli-w>=1.1.0 # Typing fixes typing-extensions>=4.4.0 # @override decorator support + # # Build and compile resources pyinstaller>=6.10.0 # Python 3.13 support + # # https://peps.python.org/pep-0508/#environment-markers # # Windows-only dependencies: +git+https://github.com/enthought/comtypes#egg=comtypes # Python 3.13 support # We don't use directly, just remove once 1.4.8 releases typed-D3DShot[numpy] >= 1.0.1; sys_platform == 'win32' pygrabber>=0.2 ; sys_platform == 'win32' # Completed types pywin32>=307 ; sys_platform == 'win32' # Python 3.13 support @@ -35,7 +38,7 @@ winrt-Windows.Graphics.DirectX.Direct3D11>=2.2.0 ; sys_platform == 'win32' # Py winrt-Windows.Graphics.Imaging>=2.2.0 ; sys_platform == 'win32' # Python 3.13 support winrt-Windows.Graphics>=2.2.0 ; sys_platform == 'win32' # Python 3.13 support winrt-Windows.Media.Capture>=2.2.0 ; sys_platform == 'win32' # Python 3.13 support -typed-D3DShot[numpy]>=1.0.1 ; sys_platform == 'win32' + # # Linux-only dependencies PyScreeze ; sys_platform == 'linux' diff --git a/src/capture_method/__init__.py b/src/capture_method/__init__.py index 007e8ee4..f1593daa 100644 --- a/src/capture_method/__init__.py +++ b/src/capture_method/__init__.py @@ -21,16 +21,15 @@ if sys.platform == "win32": from _ctypes import COMError # noqa: PLC2701 # comtypes is untyped + from pygrabber.dshow_graph import FilterGraph + from capture_method.BitBltCaptureMethod import BitBltCaptureMethod + from capture_method.DesktopDuplicationCaptureMethod import DesktopDuplicationCaptureMethod from capture_method.ForceFullContentRenderingCaptureMethod import ( ForceFullContentRenderingCaptureMethod, ) from capture_method.WindowsGraphicsCaptureMethod import WindowsGraphicsCaptureMethod - if sys.version_info < (3, 13): - # https://github.com/enthought/comtypes/issues/618 - from capture_method.DesktopDuplicationCaptureMethod import DesktopDuplicationCaptureMethod - if sys.platform == "linux": import pyscreeze from PIL import UnidentifiedImageError, features @@ -184,10 +183,7 @@ class CameraInfo: def get_input_devices(): - if sys.platform == "win32" and sys.version_info < (3, 13): - # https://github.com/enthought/comtypes/issues/618 - from pygrabber.dshow_graph import FilterGraph # noqa: PLC0415 - + if sys.platform == "win32": return FilterGraph().get_input_devices() cameras: list[str] = [] diff --git a/src/utils.py b/src/utils.py index 9e11f03a..61824894 100644 --- a/src/utils.py +++ b/src/utils.py @@ -158,7 +158,7 @@ def get_window_bounds(hwnd: int) -> tuple[int, int, int, int]: # Note: maybe reorganize capture_method module to have # different helper modules and a methods submodule def get_input_device_resolution(index: int) -> tuple[int, int] | None: - if sys.platform != "win32" or sys.version_info >= (3, 13): + if sys.platform != "win32": return (0, 0) # https://github.com/enthought/comtypes/issues/618 From 6e0bb89b48034b91d58acdbdba523e751e0258fc Mon Sep 17 00:00:00 2001 From: Avasam Date: Sun, 20 Oct 2024 14:34:33 -0400 Subject: [PATCH 17/23] Discard changes to .gitignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 197f7a39..0a6ae97f 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,6 @@ env/ build/ dist/ *.prof -*.lock # Generated **/gen/*.py !**/gen/*.pyi From 2799922a73fdf9e6b8eb077ac44a710100697d4c Mon Sep 17 00:00:00 2001 From: Avasam Date: Sun, 20 Oct 2024 14:34:42 -0400 Subject: [PATCH 18/23] Discard changes to pyproject.toml --- pyproject.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 00a8c6f1..ef243b38 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,3 @@ -[project] -name = "AutoSplit" -dynamic = ["version"] - # https://github.com/microsoft/pyright/blob/main/docs/configuration.md#sample-pyprojecttoml-file [tool.pyright] typeCheckingMode = "strict" From 52050c7255e9cce703cfab8e9231c68883ae5164 Mon Sep 17 00:00:00 2001 From: Avasam Date: Sun, 20 Oct 2024 14:35:50 -0400 Subject: [PATCH 19/23] Discard changes to src/utils.py --- src/utils.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/utils.py b/src/utils.py index 61824894..f82018a3 100644 --- a/src/utils.py +++ b/src/utils.py @@ -24,6 +24,7 @@ import win32gui import win32ui + from pygrabber.dshow_graph import FilterGraph from winrt.windows.ai.machinelearning import LearningModelDevice, LearningModelDeviceKind from winrt.windows.media.capture import MediaCapture @@ -160,10 +161,6 @@ def get_window_bounds(hwnd: int) -> tuple[int, int, int, int]: def get_input_device_resolution(index: int) -> tuple[int, int] | None: if sys.platform != "win32": return (0, 0) - - # https://github.com/enthought/comtypes/issues/618 - from pygrabber.dshow_graph import FilterGraph # noqa: PLC0415 - filter_graph = FilterGraph() try: filter_graph.add_video_input_device(index) From f375c0bc35465af8534f0e9e485c998be1c83db7 Mon Sep 17 00:00:00 2001 From: Avasam Date: Sun, 20 Oct 2024 14:35:56 -0400 Subject: [PATCH 20/23] Discard changes to src/capture_method/__init__.py --- src/capture_method/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/capture_method/__init__.py b/src/capture_method/__init__.py index f1593daa..6d25cda1 100644 --- a/src/capture_method/__init__.py +++ b/src/capture_method/__init__.py @@ -137,8 +137,7 @@ def get(self, key: CaptureMethodEnum, default: object = None, /): import d3dshot d3dshot.create(capture_output="numpy") - except (ModuleNotFoundError, COMError, NameError): - # NameError: https://github.com/enthought/comtypes/issues/618 + except (ModuleNotFoundError, COMError): pass else: CAPTURE_METHODS[CaptureMethodEnum.DESKTOP_DUPLICATION] = DesktopDuplicationCaptureMethod From 8eac7c0cab6abddbeab6977b928995a30808774e Mon Sep 17 00:00:00 2001 From: Avasam Date: Sun, 20 Oct 2024 20:00:45 -0400 Subject: [PATCH 21/23] Update scripts/requirements.txt --- scripts/requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/requirements.txt b/scripts/requirements.txt index 3e7444bd..8e4aea1e 100644 --- a/scripts/requirements.txt +++ b/scripts/requirements.txt @@ -25,7 +25,6 @@ pyinstaller>=6.10.0 # Python 3.13 support # https://peps.python.org/pep-0508/#environment-markers # # Windows-only dependencies: -git+https://github.com/enthought/comtypes#egg=comtypes # Python 3.13 support # We don't use directly, just remove once 1.4.8 releases pygrabber>=0.2 ; sys_platform == 'win32' # Completed types pywin32>=307 ; sys_platform == 'win32' # Python 3.13 support typed-D3DShot[numpy]>=1.0.1 ; sys_platform == 'win32' From d7d7a99e01024bb4f737d4ffcbb9ca5649c7ed2a Mon Sep 17 00:00:00 2001 From: Avasam Date: Sun, 20 Oct 2024 20:32:12 -0400 Subject: [PATCH 22/23] Update some comments --- scripts/build.ps1 | 3 ++- scripts/install.ps1 | 9 ++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 3d416c9f..3dd62f23 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -21,7 +21,8 @@ if ($IsWindows) { $arguments += @( # Installed by PyAutoGUI '--exclude=pyscreeze' - # Installed by D3DShot + # Sometimes installed by other automation/image libraries. + # Keep this exclusion even if nothing currently installs it, to stay future-proof. '--exclude=PIL') } if ($IsLinux) { diff --git a/scripts/install.ps1 b/scripts/install.ps1 index a6ab3e1c..27acb5f9 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -43,8 +43,7 @@ If ($IsLinux) { &"$python" -m pip install wheel pip setuptools --upgrade # Upgrading QT to 6.6.2 w/o first uninstalling shiboken6 can lead to issues # https://bugreports.qt.io/browse/PYSIDE-2616?focusedId=777285&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-777285 -# Updating from D3DShot to typed-D3DShot w/o uninstalling can cause issues (keep until version bump on PyPI) -&"$python" -m pip uninstall shiboken6 d3dshot types-D3DShot -y +&"$python" -m pip uninstall shiboken6 -y &"$python" -m pip install -r "$PSScriptRoot/requirements$dev.txt" --upgrade # Temporary hack to test install for Python 3.13 &"$python" -m pip install ` @@ -56,12 +55,12 @@ If ($IsLinux) { # PyAutoGUI: We only use it for hotkeys &"$python" -m pip install PyAutoGUI --no-deps --upgrade -# Uninstall optional dependencies if PyAutoGUI or D3DShot was installed outside this script +# Uninstall optional dependencies if PyAutoGUI was installed outside this script # PyScreeze -> pyscreenshot -> mss deps call SetProcessDpiAwareness, used to be installed on Windows -# Pillow, pygetwindow, pymsgbox, pytweening, MouseInfo are picked up by PySide6 +# pygetwindow, pymsgbox, pytweening, MouseInfo are picked up by PyInstaller # (also --exclude from build script, but more consistent with unfrozen run) &"$python" -m pip uninstall pyscreenshot mss pygetwindow pymsgbox pytweening MouseInfo -y -If ($IsWindows) { &"$python" -m pip uninstall PyScreeze Pillow -y } +If ($IsWindows) { &"$python" -m pip uninstall PyScreeze -y } # Don't compile resources on the Build CI job as it'll do so in build script If ($dev) { From 5882529e53078e20f600c343254fce456eb516d9 Mon Sep 17 00:00:00 2001 From: Avasam Date: Fri, 25 Oct 2024 00:18:54 -0400 Subject: [PATCH 23/23] Bump PySide6-Essentials to 6.8.0.2 --- scripts/install.ps1 | 5 ----- scripts/requirements.txt | 8 ++++---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/scripts/install.ps1 b/scripts/install.ps1 index 27acb5f9..ef55a7ea 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -45,11 +45,6 @@ If ($IsLinux) { # https://bugreports.qt.io/browse/PYSIDE-2616?focusedId=777285&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-777285 &"$python" -m pip uninstall shiboken6 -y &"$python" -m pip install -r "$PSScriptRoot/requirements$dev.txt" --upgrade -# Temporary hack to test install for Python 3.13 -&"$python" -m pip install ` - "PySide6-Essentials>=6.8.0.1 ; python_version >= '3.13'" ` - "shiboken6>=6.8.0.1 ; python_version >= '3.13'" ` - --ignore-requires-python # These libraries install extra requirements we don't want # Open suggestion for support in requirements files: https://github.com/pypa/pip/issues/9948 & https://github.com/pypa/pip/pull/10837 # PyAutoGUI: We only use it for hotkeys diff --git a/scripts/requirements.txt b/scripts/requirements.txt index 8e4aea1e..ad83222b 100644 --- a/scripts/requirements.txt +++ b/scripts/requirements.txt @@ -9,11 +9,11 @@ numpy>=2.1 # Python 3.13 support opencv-python-headless>=4.10 # NumPy 2 support packaging psutil>=6.0.0 # Python 3.13 support -# PyAutoGUI # See install.ps1 +# PyAutoGUI # See install.ps1 PyWinCtl>=0.0.42 # py.typed # When needed, dev builds can be found at https://download.qt.io/snapshots/ci/pyside/dev?C=M;O=D -PySide6-Essentials>=6.8.0.1 ; python_version <= '3.12' # Python 3.13 support -scipy>=1.14.1 # Python 3.13 support +PySide6-Essentials>=6.8.0.2 # Python 3.13 support +scipy>=1.14.1 # Python 3.13 support tomli-w>=1.1.0 # Typing fixes typing-extensions>=4.4.0 # @override decorator support @@ -40,5 +40,5 @@ winrt-Windows.Graphics.Imaging>=2.3.0 ; sys_platform == 'win32' # Python 3.13 s # # Linux-only dependencies PyScreeze ; sys_platform == 'linux' -pillow>=11.0 ; sys_platform == 'linux' # Python 3.13 support # Necessary for PyScreeze. For unknown reasons it's not pulled in on CI +pillow>=11.0 ; sys_platform == 'linux' # Python 3.13 support # Necessary for PyScreeze. For unknown reasons it's not pulled in on CI python-xlib ; sys_platform == 'linux'