From 71e924bef2e7c82d0932223bdd888628be2b2b2c Mon Sep 17 00:00:00 2001 From: Tom Dunkle Date: Tue, 12 May 2026 14:04:19 -0500 Subject: [PATCH 1/3] Enable Windows arm64 support for asyncpg. --- .github/workflows/release.yml | 2 +- pyproject.toml | 3 ++- setup.py | 9 +++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 353ed824..479cf2df 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -90,7 +90,7 @@ jobs: { cibuildwheel --print-build-identifiers --platform linux --archs x86_64,aarch64 | grep cp | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \ && cibuildwheel --print-build-identifiers --platform macos --archs x86_64,arm64 | grep cp | jq -nRc '{"only": inputs, "os": "macos-latest"}' \ - && cibuildwheel --print-build-identifiers --platform windows --archs x86,AMD64 | grep cp | jq -nRc '{"only": inputs, "os": "windows-latest"}' + && cibuildwheel --print-build-identifiers --platform windows --archs x86,AMD64,ARM64 | grep cp | jq -nRc '{"only": inputs, "os": "windows-latest"}' } | jq -sc ) echo "include=$MATRIX_INCLUDE" >> $GITHUB_OUTPUT diff --git a/pyproject.toml b/pyproject.toml index e2b18388..c958f9ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,8 @@ docs = [ [build-system] requires = [ "setuptools>=77.0.3", - "Cython(>=3.2.1,<4.0.0)" + "Cython(>=3.2.1,<4.0.0)", + "packaging>=24.0" ] build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py index f9fafadf..5178e480 100644 --- a/setup.py +++ b/setup.py @@ -188,8 +188,6 @@ def finalize_options(self): need_cythonize = True if need_cythonize: - import pkg_resources - # Double check Cython presence in case setup_requires # didn't go into effect (most likely because someone # imported Cython before setup_requires injected the @@ -201,8 +199,11 @@ def finalize_options(self): 'please install {} to compile asyncpg from source'.format( CYTHON_DEPENDENCY)) - cython_dep = pkg_resources.Requirement.parse(CYTHON_DEPENDENCY) - if Cython.__version__ not in cython_dep: + from packaging.requirements import Requirement + + cython_dep = Requirement(CYTHON_DEPENDENCY) + if not cython_dep.specifier.contains( + Cython.__version__, prerelease=True): raise RuntimeError( 'asyncpg requires {}, got Cython=={}'.format( CYTHON_DEPENDENCY, Cython.__version__ From ff751de2fd5ed969898e131eac35c61d9e5646d2 Mon Sep 17 00:00:00 2001 From: Tom Dunkle Date: Tue, 12 May 2026 14:21:35 -0500 Subject: [PATCH 2/3] Fix typo. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5178e480..aad10a21 100644 --- a/setup.py +++ b/setup.py @@ -203,7 +203,7 @@ def finalize_options(self): cython_dep = Requirement(CYTHON_DEPENDENCY) if not cython_dep.specifier.contains( - Cython.__version__, prerelease=True): + Cython.__version__, prereleases=True): raise RuntimeError( 'asyncpg requires {}, got Cython=={}'.format( CYTHON_DEPENDENCY, Cython.__version__ From 75301d9f924f3fb6937534911166cc68c2c673d7 Mon Sep 17 00:00:00 2001 From: Tom Dunkle Date: Tue, 12 May 2026 14:40:45 -0500 Subject: [PATCH 3/3] Add Windows on Arm to CI/CD. --- .github/workflows/release.yml | 3 ++- .github/workflows/tests.yml | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 479cf2df..3cae6b46 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -90,7 +90,8 @@ jobs: { cibuildwheel --print-build-identifiers --platform linux --archs x86_64,aarch64 | grep cp | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \ && cibuildwheel --print-build-identifiers --platform macos --archs x86_64,arm64 | grep cp | jq -nRc '{"only": inputs, "os": "macos-latest"}' \ - && cibuildwheel --print-build-identifiers --platform windows --archs x86,AMD64,ARM64 | grep cp | jq -nRc '{"only": inputs, "os": "windows-latest"}' + && cibuildwheel --print-build-identifiers --platform windows --archs x86,AMD64 | grep cp | jq -nRc '{"only": inputs, "os": "windows-latest"}' + && cibuildwheel --print-build-identifiers --platform windows --archs ARM64 | grep cp | jq -nRc '{"only": inputs, "os": "windows-11-arm"}' } | jq -sc ) echo "include=$MATRIX_INCLUDE" >> $GITHUB_OUTPUT diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 77e63738..36841181 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,12 +18,14 @@ jobs: strategy: matrix: python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"] - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest, windows-latest, windows-11-arm] loop: [asyncio, uvloop] exclude: # uvloop does not support windows - loop: uvloop os: windows-latest + - loop: uvloop + os: windows-11-arm runs-on: ${{ matrix.os }}