Skip to content

Commit 20ef487

Browse files
authored
Add support for Python 3.13 (#298)
1 parent a2371bc commit 20ef487

File tree

6 files changed

+24
-21
lines changed

6 files changed

+24
-21
lines changed

Diff for: .github/workflows/lint-and-build.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
# Ruff is version and platform sensible
4747
matrix:
4848
os: [windows-latest, ubuntu-22.04]
49-
python-version: ["3.11", "3.12"]
49+
python-version: ["3.11", "3.12", "3.13"]
5050
steps:
5151
- name: Checkout ${{ github.repository }}/${{ github.ref }}
5252
uses: actions/checkout@v4
@@ -66,7 +66,7 @@ jobs:
6666
# Pyright is version and platform sensible
6767
matrix:
6868
os: [windows-latest, ubuntu-22.04]
69-
python-version: ["3.11", "3.12"]
69+
python-version: ["3.11", "3.12", "3.13"]
7070
steps:
7171
- name: Checkout ${{ github.repository }}/${{ github.ref }}
7272
uses: actions/checkout@v4
@@ -99,7 +99,10 @@ jobs:
9999
# Only the Python version we plan on shipping matters.
100100
matrix:
101101
os: [windows-latest, ubuntu-22.04]
102-
python-version: ["3.11", "3.12"]
102+
python-version: ["3.12", "3.13"]
103+
include:
104+
- os: ubuntu-22.04
105+
python-version: "3.11" # I had some Qt Wayland issues on 3.12 for ubuntu-22.04 iirc. TODO: test it
103106
steps:
104107
- name: Checkout ${{ github.repository }}/${{ github.ref }}
105108
uses: actions/checkout@v4

Diff for: .vscode/launch.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"configurations": [
77
{
88
"name": "Python: AutoSplit (debug non-user code)",
9-
"type": "python",
9+
"type": "debugpy",
1010
"request": "launch",
1111
"preLaunchTask": "Compile resources",
1212
"program": "src/AutoSplit.py",
@@ -15,7 +15,7 @@
1515
},
1616
{
1717
"name": "Python: AutoSplit",
18-
"type": "python",
18+
"type": "debugpy",
1919
"request": "launch",
2020
"preLaunchTask": "Compile resources",
2121
"program": "src/AutoSplit.py",
@@ -24,7 +24,7 @@
2424
},
2525
{
2626
"name": "Python: AutoSplit --auto-controlled",
27-
"type": "python",
27+
"type": "debugpy",
2828
"request": "launch",
2929
"preLaunchTask": "Compile resources",
3030
"program": "src/AutoSplit.py",

Diff for: mypy.ini

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
; We don't run mypy in the CI. This is just to help anyone who would like to use it manually.
22
; Namely, the mypy_primer tool.
33
[mypy]
4+
python_version = 3.11
45
show_column_numbers = true
56
mypy_path = $MYPY_CONFIG_FILE_DIR/typings
67
implicit_reexport = true

Diff for: scripts/build.ps1

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ if ($IsWindows) {
2121
$arguments += @(
2222
# Installed by PyAutoGUI
2323
'--exclude=pyscreeze'
24-
# Installed by D3DShot
24+
# Sometimes installed by other automation/image libraries.
25+
# Keep this exclusion even if nothing currently installs it, to stay future-proof.
2526
'--exclude=PIL')
2627
}
2728
if ($IsLinux) {

Diff for: scripts/install.ps1

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ If ($IsLinux) {
5050
# PyAutoGUI: We only use it for hotkeys
5151
&"$python" -m pip install PyAutoGUI --no-deps --upgrade
5252

53-
# Uninstall optional dependencies if PyAutoGUI or D3DShot was installed outside this script
53+
# Uninstall optional dependencies if PyAutoGUI was installed outside this script
5454
# PyScreeze -> pyscreenshot -> mss deps call SetProcessDpiAwareness, used to be installed on Windows
55-
# Pillow, pygetwindow, pymsgbox, pytweening, MouseInfo are picked up by PySide6
55+
# pygetwindow, pymsgbox, pytweening, MouseInfo are picked up by PyInstaller
5656
# (also --exclude from build script, but more consistent with unfrozen run)
5757
&"$python" -m pip uninstall pyscreenshot mss pygetwindow pymsgbox pytweening MouseInfo -y
58-
If ($IsWindows) { &"$python" -m pip uninstall PyScreeze Pillow -y }
58+
If ($IsWindows) { &"$python" -m pip uninstall PyScreeze -y }
5959

6060
# Don't compile resources on the Build CI job as it'll do so in build script
6161
If ($dev) {

Diff for: scripts/requirements.txt

+9-11
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,28 @@
55
# Dependencies:
66
git+https://github.com/boppreh/keyboard.git#egg=keyboard # Fix install on macos and linux-ci https://github.com/boppreh/keyboard/pull/568
77
Levenshtein>=0.25
8-
# Some modules used by OpenCV are not compiled for Numpy 2 yet on Linux. Error happens on import at runtime
9-
numpy>=1.26,<2.0 # Python 3.12 support
10-
opencv-python-headless>=4.9.0.80 # Typing fixes
8+
numpy>=2.1 # Python 3.13 support
9+
opencv-python-headless>=4.10 # NumPy 2 support
1110
packaging
12-
psutil>=5.9.6 # Python 3.12 fixes
13-
# PyAutoGUI # See install.ps1
11+
psutil>=6.0.0 # Python 3.13 support
12+
# PyAutoGUI # See install.ps1
1413
PyWinCtl>=0.0.42 # py.typed
1514
# When needed, dev builds can be found at https://download.qt.io/snapshots/ci/pyside/dev?C=M;O=D
16-
PySide6-Essentials>=6.6.0 # Python 3.12 support
17-
scipy>=1.11.2 # Python 3.12 support
15+
PySide6-Essentials>=6.8.0.2 # Python 3.13 support
16+
scipy>=1.14.1 # Python 3.13 support
1817
tomli-w>=1.1.0 # Typing fixes
1918
typing-extensions>=4.4.0 # @override decorator support
2019

2120
#
2221
# Build and compile resources
23-
pyinstaller>=5.13 # Python 3.12 support
22+
pyinstaller>=6.10.0 # Python 3.13 support
2423

2524
#
2625
# https://peps.python.org/pep-0508/#environment-markers
2726
#
2827
# Windows-only dependencies:
29-
comtypes<1.4.5 ; sys_platform == 'win32' # https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/807
3028
pygrabber>=0.2 ; sys_platform == 'win32' # Completed types
31-
pywin32>=301 ; sys_platform == 'win32'
29+
pywin32>=307 ; sys_platform == 'win32' # Python 3.13 support
3230
typed-D3DShot[numpy]>=1.0.1 ; sys_platform == 'win32'
3331
winrt-Windows.Foundation>=2.2.0 ; sys_platform == 'win32' # Python 3.13 support
3432
winrt-Windows.Graphics.Capture>=2.3.0 ; sys_platform == 'win32' # Python 3.13 support
@@ -42,5 +40,5 @@ winrt-Windows.Graphics.Imaging>=2.3.0 ; sys_platform == 'win32' # Python 3.13 s
4240
#
4341
# Linux-only dependencies
4442
PyScreeze ; sys_platform == 'linux'
45-
pillow ; sys_platform == 'linux' # Necessary for PyScreeze. For unknown reasons it's not pulled in on CI
43+
pillow>=11.0 ; sys_platform == 'linux' # Python 3.13 support # Necessary for PyScreeze. For unknown reasons it's not pulled in on CI
4644
python-xlib ; sys_platform == 'linux'

0 commit comments

Comments
 (0)