From 5750895e07f2c3c2cf12aca1b4cee0bb3e53fbf4 Mon Sep 17 00:00:00 2001 From: maniek2332 Date: Tue, 8 Mar 2022 20:32:17 +0100 Subject: [PATCH] Python 3.10 related changes: updated deprecated imports, bumped cython and pytest versions, updated build scripts --- .ci/az-pipelines/make_wheels.yml | 9 +++++++++ requirements/build.txt | 2 +- requirements/test.txt | 2 +- scripts/docker_wheel_builder.sh | 6 +++++- src/kaa/input.pxi | 2 +- 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.ci/az-pipelines/make_wheels.yml b/.ci/az-pipelines/make_wheels.yml index b7077324..fad48e11 100644 --- a/.ci/az-pipelines/make_wheels.yml +++ b/.ci/az-pipelines/make_wheels.yml @@ -38,6 +38,9 @@ jobs: Python39: python.version: '3.9' python.version_tag: 'py39' + Python310: + python.version: '3.10' + python.version_tag: 'py310' variables: docker_image: "quay.io/pypa/manylinux2010_x86_64" platform.name: 'linux' @@ -77,6 +80,9 @@ jobs: Python39: python.version: '3.9' python.version_tag: 'py39' + Python310: + python.version: '3.10' + python.version_tag: 'py310' variables: platform.name: 'windows' steps: @@ -106,6 +112,9 @@ jobs: Python39: python.version: '3.9' python.version_tag: 'py39' + Python310: + python.version: '3.10' + python.version_tag: 'py310' variables: platform.name: 'macos' platform.tag: 'macosx-10.14-x86_64' diff --git a/requirements/build.txt b/requirements/build.txt index 306d507e..1fb2d661 100644 --- a/requirements/build.txt +++ b/requirements/build.txt @@ -1,4 +1,4 @@ ninja==1.9.0.post1 -Cython==0.29.21 +Cython==0.29.28 scikit-build==0.11.1 cymove==1.0.0 diff --git a/requirements/test.txt b/requirements/test.txt index d5bd56fd..92709451 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1 +1 @@ -pytest==6.2.1 +pytest==6.2.5 diff --git a/scripts/docker_wheel_builder.sh b/scripts/docker_wheel_builder.sh index 24e24dc9..8aca159a 100644 --- a/scripts/docker_wheel_builder.sh +++ b/scripts/docker_wheel_builder.sh @@ -29,6 +29,10 @@ then PY_VERSION="python3.9" PY_VERSION_ABI="cp39-cp39" ;; + "py310") + PY_VERSION="python3.10" + PY_VERSION_ABI="cp310-cp310" + ;; *) echo "ERROR: Unknown py version specified: $1" exit 1 @@ -46,7 +50,7 @@ python --version yum install -y alsa-lib-devel pulseaudio-libs-devel # SDL audio dependencies yum install -y libXrandr-devel libXcursor-devel # SDL video dependencies -pip install -r /host/requirements/build.txt -r /host/requirements/dev.txt +pip install cmake -r /host/requirements/build.txt # simulate out-of-source build cp -r /host/src -v . diff --git a/src/kaa/input.pxi b/src/kaa/input.pxi index a72df341..0c6fabbe 100644 --- a/src/kaa/input.pxi +++ b/src/kaa/input.pxi @@ -1,6 +1,6 @@ import inspect from enum import IntEnum -from collections import Iterable +from collections.abc import Iterable import cython from libcpp cimport nullptr