Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Python 3.13 #298

Merged
merged 27 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
83e7dab
Bump versions
Avasam Oct 7, 2024
d107efc
Migrate from winsdk to PyWinRT
Avasam Oct 7, 2024
ec5fc62
move hack
Avasam Oct 7, 2024
de78265
-dev
Avasam Oct 7, 2024
aa4b399
Temp disable comtypes code paths for Python 3.13 https://github.com/e…
Avasam Oct 7, 2024
7255662
Running commands w/ Ruff
Avasam Oct 8, 2024
f206024
pillow from github
Avasam Oct 8, 2024
7a43ef6
Merge branch 'dev' into Python-3.13
Avasam Oct 8, 2024
d5c6a7d
Merge branch 'dev' into Python-3.13
Avasam Oct 9, 2024
f66ff52
Bump pillow, use non-dev 3.13
Avasam Oct 15, 2024
bf59638
typed-D3DShot
Avasam Oct 16, 2024
be9acdd
Update scripts/requirements.txt
Avasam Oct 16, 2024
3c0c512
Update comtypes thanks to new pyinstaller-hooks-contrib release
Avasam Oct 16, 2024
aa644a3
comtypes isn't even a direct dependency...
Avasam Oct 16, 2024
1137802
Update scripts/requirements.txt
Avasam Oct 17, 2024
9ada46f
Apply suggestions from code review
Avasam Oct 17, 2024
57f8e8c
Update scripts/install.ps1
Avasam Oct 17, 2024
7eaac33
Bump comtypes
Avasam Oct 20, 2024
6e0bb89
Discard changes to .gitignore
Avasam Oct 20, 2024
2799922
Discard changes to pyproject.toml
Avasam Oct 20, 2024
52050c7
Discard changes to src/utils.py
Avasam Oct 20, 2024
f375c0b
Discard changes to src/capture_method/__init__.py
Avasam Oct 20, 2024
f0f787a
Merge branch 'dev' into Python-3.13
Avasam Oct 20, 2024
8eac7c0
Update scripts/requirements.txt
Avasam Oct 21, 2024
d7d7a99
Update some comments
Avasam Oct 21, 2024
ecda468
Merge branch 'Python-3.13' of https://github.com/Toufool/AutoSplit in…
Avasam Oct 21, 2024
5882529
Bump PySide6-Essentials to 6.8.0.2
Avasam Oct 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/lint-and-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -15,7 +15,7 @@
},
{
"name": "Python: AutoSplit",
"type": "python",
"type": "debugpy",
"request": "launch",
"preLaunchTask": "Compile resources",
"program": "src/AutoSplit.py",
Expand All @@ -24,7 +24,7 @@
},
{
"name": "Python: AutoSplit --auto-controlled",
"type": "python",
"type": "debugpy",
"request": "launch",
"preLaunchTask": "Compile resources",
"program": "src/AutoSplit.py",
Expand Down
1 change: 1 addition & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions scripts/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,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) {
Expand Down
20 changes: 9 additions & 11 deletions scripts/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,28 @@
# 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
# PyAutoGUI # See install.ps1
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.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

#
# 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
typed-D3DShot[numpy]>=1.0.1 ; sys_platform == 'win32'
winrt-Windows.Foundation>=2.2.0 ; sys_platform == 'win32' # Python 3.13 support
winrt-Windows.Graphics.Capture>=2.3.0 ; sys_platform == 'win32' # Python 3.13 support
Expand All @@ -42,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 ; 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'
Loading