Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 25 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,18 @@ jobs:
fail-fast: false # If one platform fails, allow the rest to keep testing.
matrix:
rust: [stable]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.13t", "pypy-3.9", "pypy-3.10"]
python-version:
[
"3.9",
"3.10",
"3.11",
"3.12",
"3.13",
"3.13t",
"3.14-dev",
"3.14t-dev",
"pypy-3.11",
]
platform:
[
{
Expand All @@ -66,10 +77,6 @@ jobs:
rust-target: "x86_64-pc-windows-msvc",
},
]
exclude:
# PyPy doesn't release 32-bit Windows builds any more
- python-version: pypy-3.9
platform: { os: "windows-latest", python-architecture: "x86" }
include:
# Test minimal supported Rust version
- rust: 1.63.0
Expand Down Expand Up @@ -97,7 +104,12 @@ jobs:
# Test 32-bit windows just on latest Python
- rust: stable
python-version: "3.13"
platform: { os: "windows-latest", python-architecture: "x86", rust-target: "i686-pc-windows-msvc" }
platform:
{
os: "windows-latest",
python-architecture: "x86",
rust-target: "i686-pc-windows-msvc",
}

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -126,9 +138,13 @@ jobs:
- name: Build
run: cargo build --features=${{env.features}} --verbose --target ${{ matrix.platform.rust-target }}

# uvloop doesn't compile under Windows and PyPy, nor for free-threaded Python
- if: ${{ matrix.platform.os != 'windows-latest' && !startsWith(matrix.python-version, 'pypy') && !endsWith(matrix.python-version, 't') }}
name: Install pyo3-asyncio test dependencies
# uvloop doesn't compile under
# Windows, https://github.com/MagicStack/uvloop/issues/536,
# nor PyPy, https://github.com/MagicStack/uvloop/issues/537
# nor for free-threaded Python, see https://github.com/MagicStack/uvloop/issues/642
# nor on 3.14, see https://github.com/MagicStack/uvloop/issues/637
- if: ${{ matrix.platform.os != 'windows-latest' && !startsWith(matrix.python-version, 'pypy') && !endsWith(matrix.python-version, 't') && !startsWith(matrix.python-version, '3.14') }}
name: Install uvloop
run: |
python -m pip install -U uvloop

Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,31 @@ on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
version:
description: The version to build

jobs:
release:
permissions:
id-token: write

runs-on: ubuntu-latest
environment: release
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
# The tag to build or the tag received by the tag event
ref: ${{ github.event.inputs.version || github.ref }}
persist-credentials: false

- uses: dtolnay/rust-toolchain@stable

- uses: rust-lang/crates-io-auth-action@v1
id: auth

- name: Publish to crates.io
run: make publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
5 changes: 5 additions & 0 deletions pytests/test_async_std_uvloop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ fn main() -> pyo3::PyResult<()> {
return Ok(());
}

// uvloop not yet supported on 3.14
if py.version_info() >= (3, 14) {
return Ok(());
}

let uvloop = py.import("uvloop")?;
uvloop.call_method0("install")?;

Expand Down
5 changes: 5 additions & 0 deletions pytests/test_tokio_current_thread_uvloop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ fn main() -> pyo3::PyResult<()> {
return Ok(());
}

// uvloop not yet supported on 3.14
if py.version_info() >= (3, 14) {
return Ok(());
}

let uvloop = py.import("uvloop")?;
uvloop.call_method0("install")?;

Expand Down
5 changes: 5 additions & 0 deletions pytests/test_tokio_multi_thread_uvloop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ fn main() -> pyo3::PyResult<()> {
return Ok(());
}

// uvloop not yet supported on 3.14
if py.version_info() >= (3, 14) {
return Ok(());
}

let uvloop = py.import("uvloop")?;
uvloop.call_method0("install")?;

Expand Down
Loading