From a6b491094d829bbd40af051efdecf051c46eff83 Mon Sep 17 00:00:00 2001 From: winstxnhdw Date: Mon, 12 Aug 2024 05:16:11 +0800 Subject: [PATCH] feat/ci/docs: support Python 3.8 --- .github/workflows/main.yml | 5 ++++- README.md | 2 +- keywin/mouse/__init__.py | 2 ++ keywin/send_input/__init__.pyi | 2 ++ pdm.lock | 6 +++--- pdm_build.py | 2 ++ pyproject.toml | 3 ++- 7 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 43ef197..fd7aaf5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -48,6 +48,9 @@ jobs: test: runs-on: windows-latest + strategy: + matrix: + python-version: [3.8, 3.9, '3.10', 3.11, 3.12] steps: - name: Checkout repository @@ -56,7 +59,7 @@ jobs: - name: Setup PDM uses: pdm-project/setup-pdm@v4.1 with: - python-version: '*' + python-version: ${{ matrix.python-version }} cache: true - name: Install dependencies diff --git a/README.md b/README.md index 3565948..7f86e7a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # KeyWin -[![python](https://img.shields.io/badge/python-3.9%20|%203.10%20|%203.11%20|%203.12-blue)](https://www.python.org/) +[![python](https://img.shields.io/badge/python-3.8%20|%203.9%20|%203.10%20|%203.11%20|%203.12-blue)](https://www.python.org/) [![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/PyCQA/pylint) [![main.yml](https://github.com/winstxnhdw/KeyWin/actions/workflows/main.yml/badge.svg)](https://github.com/winstxnhdw/KeyWin/actions/workflows/main.yml) [![formatter.yml](https://github.com/winstxnhdw/KeyWin/actions/workflows/formatter.yml/badge.svg)](https://github.com/winstxnhdw/KeyWin/actions/workflows/formatter.yml) diff --git a/keywin/mouse/__init__.py b/keywin/mouse/__init__.py index cade303..2b4ea67 100644 --- a/keywin/mouse/__init__.py +++ b/keywin/mouse/__init__.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from keywin.mouse.codes import MouseCodes from keywin.send_input import send_mouse_event diff --git a/keywin/send_input/__init__.pyi b/keywin/send_input/__init__.pyi index fcf1d5f..2b18dab 100644 --- a/keywin/send_input/__init__.pyi +++ b/keywin/send_input/__init__.pyi @@ -1,5 +1,7 @@ # pylint: skip-file +from __future__ import annotations + from typing import Iterable def send_mouse_event(inputs: Iterable[tuple[int, int, int, int]]) -> bool: diff --git a/pdm.lock b/pdm.lock index a9b1ffc..062ffe0 100644 --- a/pdm.lock +++ b/pdm.lock @@ -2,13 +2,13 @@ # It is not intended for manual editing. [metadata] -groups = ["default", "build", "lint", "test"] +groups = ["default", "lint", "test"] strategy = ["inherit_metadata"] lock_version = "4.5.0" -content_hash = "sha256:189970331aa5fa4e1be3fce1e1687a59b8ae050abff28447a59f1dfdcb50a97d" +content_hash = "sha256:1eec2b550233b69ab3a98c24ab3264d1aa1f066afeae653fd9559089156bc3f3" [[metadata.targets]] -requires_python = ">=3.9" +requires_python = ">=3.8" [[package]] name = "astroid" diff --git a/pdm_build.py b/pdm_build.py index 6190cde..b7a3193 100644 --- a/pdm_build.py +++ b/pdm_build.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from sys import platform from typing import TypedDict diff --git a/pyproject.toml b/pyproject.toml index b944778..369d5ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,9 +8,10 @@ version = "0.1.0" authors = [{ name = "winstxnhdw", email = "author@example.com" }] description = "A fast Python wrapper for Win32's SendInput function." readme = "README.md" -requires-python = ">=3.9" +requires-python = ">=3.8" classifiers = [ "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11",