diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 6a3df7dc3..71825f78a 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -21,6 +21,7 @@ jobs: - "3.10" - "3.11" - "3.12" + - "3.13" wx-version: - "4.1.1" - "4.2.1" @@ -32,6 +33,10 @@ jobs: wx-version: "4.1.1" - python-version: "3.12" wx-version: "4.2.1" + - python-version: "3.13" + wx-version: "4.1.1" + - python-version: "3.13" + wx-version: "4.2.1" steps: @@ -50,6 +55,8 @@ jobs: echo "add_dir_str=cpython-311" >> $GITHUB_ENV elif [ "${{ matrix.python-version }}" == "3.12" ]; then echo "add_dir_str=cpython-312" >> $GITHUB_ENV + elif [ "${{ matrix.python-version }}" == "3.13" ]; then + echo "add_dir_str=cpython-313" >> $GITHUB_ENV fi - name: Setup xvfb diff --git a/DisplayCAL/RealDisplaySizeMM.py b/DisplayCAL/RealDisplaySizeMM.py index e77dcb436..884063fc1 100644 --- a/DisplayCAL/RealDisplaySizeMM.py +++ b/DisplayCAL/RealDisplaySizeMM.py @@ -29,8 +29,8 @@ from DisplayCAL.lib64.python311.RealDisplaySizeMM import * elif sys.version_info[:2] == (3, 12): from DisplayCAL.lib64.python312.RealDisplaySizeMM import * -# else: -# pass + elif sys.version_info[:2] == (3, 13): + from DisplayCAL.lib64.python313.RealDisplaySizeMM import * # TODO: For Linux use the ``xrandr`` command output which supplies everything. # diff --git a/DisplayCAL/freeze.py b/DisplayCAL/freeze.py index ce81eb7fa..d17807672 100644 --- a/DisplayCAL/freeze.py +++ b/DisplayCAL/freeze.py @@ -182,7 +182,7 @@ def add_lib_excludes(key, excludebits): config["excludes"][key].extend([f"{name}.lib{exclude}", f"lib{exclude}"]) for exclude in ("32", "64"): - for pycompat in ("38", "39", "310", "311"): + for pycompat in ("38", "39", "310", "311", "312", "313"): if key == "win32" and ( pycompat == str(sys.version_info[0]) + str(sys.version_info[1]) or exclude == excludebits[0] @@ -463,6 +463,7 @@ def build_py2exe(): "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Multimedia :: Graphics", ], "data_files": data_files, diff --git a/DisplayCAL/lib64/python313/__init__.py b/DisplayCAL/lib64/python313/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/DisplayCAL/meta.py b/DisplayCAL/meta.py index c6f91484b..d42b15a25 100644 --- a/DisplayCAL/meta.py +++ b/DisplayCAL/meta.py @@ -54,7 +54,7 @@ name_html = 'DisplayCAL' py_minversion = (3, 8) -py_maxversion = (3, 12) +py_maxversion = (3, 13) version = VERSION_STRING version_lin = VERSION_STRING # Linux diff --git a/DisplayCAL/safe_print.py b/DisplayCAL/safe_print.py index 8f1b39052..2631ffe13 100644 --- a/DisplayCAL/safe_print.py +++ b/DisplayCAL/safe_print.py @@ -4,7 +4,7 @@ import os import sys -from DisplayCAL.encoding import get_encoding, get_encodings +from DisplayCAL.encoding import get_encodings original_codepage = None diff --git a/DisplayCAL/setup.py b/DisplayCAL/setup.py index f639e6e10..496caf069 100644 --- a/DisplayCAL/setup.py +++ b/DisplayCAL/setup.py @@ -199,7 +199,7 @@ def add_lib_excludes(key, excludebits): config["excludes"][key].extend([f"{name}.lib{exclude}", f"lib{exclude}"]) for exclude in ("32", "64"): - for pycompat in ("38", "39", "310", "311", "312"): + for pycompat in ("38", "39", "310", "311", "312", "313"): if key == "win32" and ( pycompat == str(sys.version_info[0]) + str(sys.version_info[1]) or exclude == excludebits[0] @@ -990,7 +990,7 @@ def findall( packages = [name, f"{name}.lib", f"{name}.lib.agw"] if sdist: # For source distributions we want all libraries - for pycompat in ("38", "39", "310", "311", "312"): + for pycompat in ("38", "39", "310", "311", "312", "313"): packages.extend([f"{name}.lib{bits}", f"{name}.lib{bits}.python{pycompat}"]) elif sys.platform == "darwin": # On Mac OS X we only want the universal binaries @@ -1023,6 +1023,7 @@ def findall( "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Multimedia :: Graphics", ], "data_files": data_files, diff --git a/DisplayCAL/worker.py b/DisplayCAL/worker.py index 4a0173681..f05f04364 100644 --- a/DisplayCAL/worker.py +++ b/DisplayCAL/worker.py @@ -12,7 +12,6 @@ import math import mimetypes import os -import pipes from io import BytesIO from pathlib import Path diff --git a/requirements-dev.txt b/requirements-dev.txt index e52c6c814..971af0809 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -19,5 +19,4 @@ pytest-github-actions-annotate-failures pytest-xdist snowballstemmer twine -yappi wheel