Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
7d166f7
ci: reduce number of jobs & improve coverage measurement (#5052)
davidhewitt Apr 11, 2025
73136ea
Impl time crate into pyo3 (#5057)
Owen-CH-Leung Apr 14, 2025
e3a71b4
Bump codecov/codecov-action from 4 to 5 (#5072)
dependabot[bot] Apr 15, 2025
b574650
fix free-threading issue in `test_coroutine` (#5069)
davidhewitt Apr 21, 2025
b2ee6b6
Introspection: add function signatures (#5025)
Tpt Apr 21, 2025
3ae3a6b
release notes for 0.24.1 and 0.24.2 (#5083)
davidhewitt Apr 21, 2025
0062d5e
ffi: expose PyDateTime_*_GET_TZINFO on PyPy (#5079)
exg Apr 22, 2025
7619e62
add `PyModule_Add` to `pyo3-ffi` (#5085)
bschoenmaeckers Apr 23, 2025
caf35f9
remove private types from `pyo3-ffi` (#5064)
davidhewitt Apr 23, 2025
41ba6f9
docs: Include example of calling with PyDict for kwargs (#5078)
prutschman-iv Apr 23, 2025
6ccd7e4
remove `AsPyPointer` trait (#5071)
Icxolu Apr 24, 2025
d50ec3e
Add `PyTzInfo` constructors (#5055)
bschoenmaeckers Apr 25, 2025
a95eecd
ci: fix clippy jobs only running Python 3.7 checks (#5090)
davidhewitt Apr 25, 2025
61f43e8
Fixes pytests tests when using Python 3.7 (#5095)
Tpt Apr 25, 2025
28dc143
remove deprecated `from_py_with` string variant (#5097)
Icxolu Apr 26, 2025
923867c
docs: fix typo in `Ipv4Addr` and `Ipv6Addr` type names (#5098)
0x676e67 Apr 26, 2025
5635b0f
Bump supported cpython version to 3.14 for testing (#4811)
clin1234 Apr 26, 2025
48739ac
add `Py_HashBuffer` to `pyo3-ffi` (#5086)
bschoenmaeckers Apr 28, 2025
7a7b77b
remove TODO in `pyo3-build-config` (#5102)
bschoenmaeckers Apr 28, 2025
dd1f788
add declarative module level constants export (#5096)
Icxolu Apr 29, 2025
4bb903e
ci: tidy up some `with_gil(|gil|` -> `with_gil(|py|` (#5104)
davidhewitt May 1, 2025
936a1c6
introduce `immutable_type` option for pyclasses (#5101)
Icxolu May 1, 2025
ddd6aa0
remove FFI definitions of private static variables (#5105)
davidhewitt May 2, 2025
3c2c884
ci: accept 429 as valid response for external url (#5106)
davidhewitt May 2, 2025
5a3de05
Add #[track_caller] to with_gil. (#5109)
m-ou-se May 4, 2025
91b3825
Remove cfg-if dependency. (#5110)
m-ou-se May 4, 2025
c25c6f7
unify `IntoPyObject`/`FromPyObject` derive attributes (#5070)
Icxolu May 4, 2025
c25577f
Use thread::park() in HangThread. (#5115)
m-ou-se May 5, 2025
fe7c18e
bump supported GraalPy version to 24.2 (#5116)
davidhewitt May 7, 2025
24bc7d0
docs: Document how to add support CPython versions (#5113)
clin1234 May 7, 2025
fb1d360
Beta fix (#5123)
clin1234 May 9, 2025
f6e65ed
fix `jiff::Zoned` into python conversion when `zoneinfo` is not avail…
bschoenmaeckers May 9, 2025
1d36bd3
docs: Fix md formatting on checkboxes (#5122)
clin1234 May 9, 2025
260089a
ci: move main build to use `test-rust` nox job (#5091)
davidhewitt May 9, 2025
280a7d5
tidy up migration.md ahead of 0.25 release (#5129)
davidhewitt May 9, 2025
7ccfcdc
revert tz change for jiff test (#5130)
davidhewitt May 9, 2025
e613a79
Implement optional feature `ordered-float` for NotNan/OrderedFloat <-…
superserious-dev May 9, 2025
3a39844
Add `PyRange` wrapper (#5117)
bschoenmaeckers May 9, 2025
283ba3f
Fix clippy errors (#5134)
clin1234 May 12, 2025
5807d80
Add `#[pyclass(generic)]` (#4926)
IvanIsCoding May 12, 2025
b36849a
more format args inlining (#5135)
davidhewitt May 12, 2025
f87b286
Don't expose PyASCIIObjectState on Python3.14 and newer (#5133)
ngoldbaum May 12, 2025
d74fadc
Implement `OnceExt` & `MutexExt` for `parking_lot` & `lock_api` (#5044)
bschoenmaeckers May 12, 2025
b61dc7f
add `rename_all` support for `#[derive(IntoPyObject)]` (#5112)
Icxolu May 12, 2025
c4efb16
ci: reduce verbosity & install zoneinfo backport on <3.9 (#5136)
davidhewitt May 13, 2025
ec1a350
release: 0.25.0 (#5128)
davidhewitt May 14, 2025
0e298e5
Implements basic method introspection (#5087)
Tpt May 14, 2025
775f03b
docs: fixup typo on object.md (#5143)
davidhewitt May 14, 2025
b4d5935
ci: updates for Rust 1.87 (#5147)
Icxolu May 17, 2025
3ebeca4
Expose the vectorcall functions also on GraalPy
timfel Apr 12, 2025
be9b651
Add PyBytes_AS_STRING, seen in ormsgpack
timfel May 16, 2025
57349c3
Call Py_Is function on GraalPy
timfel May 7, 2025
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
149 changes: 71 additions & 78 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ on:
MSRV:
required: true
type: string
verbose:
type: boolean
default: false

jobs:
build:
Expand All @@ -27,6 +30,15 @@ jobs:
if: ${{ !(startsWith(inputs.python-version, 'graalpy') && startsWith(inputs.os, 'windows')) }}
steps:
- uses: actions/checkout@v4
with:
# For PRs, we need to run on the real PR head, not the resultant merge of the PR into the target branch.
#
# This is necessary for coverage reporting to make sense; we then get exactly the coverage change
# between the base branch and the real PR head.
#
# If it were run on the merge commit the problem is that the coverage potentially does not align
# with the commit diff, because the merge may affect line numbers.
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}

- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v5
Expand All @@ -40,17 +52,26 @@ jobs:
- name: Install nox
run: python -m pip install --upgrade pip && pip install nox

- if: inputs.python-version == 'graalpy24.1'
name: Install GraalPy virtualenv (only GraalPy 24.1)
run: python -m pip install 'git+https://github.com/oracle/graalpython#egg=graalpy_virtualenv_seeder&subdirectory=graalpy_virtualenv_seeder'

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ inputs.rust }}
targets: ${{ inputs.rust-target }}
# needed to correctly format errors, see #1865
components: rust-src
# rust-src needed to correctly format errors, see #1865
components: rust-src,llvm-tools-preview

# On windows 32 bit, we are running on an x64 host, so we need to specifically set the target
# NB we don't do this for *all* jobs because it breaks coverage of proc macros to have an
# explicit target set.
- name: Set Rust target for Windows 32-bit
if: inputs.os == 'windows-latest' && inputs.python-architecture == 'x86'
shell: bash
run: |
echo "CARGO_BUILD_TARGET=i686-pc-windows-msvc" >> $GITHUB_ENV

- name: Install zoneinfo backport for Python 3.7 / 3.8
if: contains(fromJSON('["3.7", "3.8"]'), inputs.python-version)
run: python -m pip install backports.zoneinfo

- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -68,80 +89,12 @@ jobs:
name: Ignore changed error messages when using trybuild
run: echo "TRYBUILD=overwrite" >> "$GITHUB_ENV"

- if: inputs.rust == 'nightly'
name: Prepare to test on nightly rust
run: echo "MAYBE_NIGHTLY=nightly" >> "$GITHUB_ENV"

- name: Build docs
run: nox -s docs

- name: Build (no features)
if: ${{ !startsWith(inputs.python-version, 'graalpy') }}
run: cargo build --lib --tests --no-default-features

# --no-default-features when used with `cargo build/test -p` doesn't seem to work!
- name: Build pyo3-build-config (no features)
run: |
cd pyo3-build-config
cargo build --no-default-features

# Run tests (except on PyPy, because no embedding API).
- if: ${{ !startsWith(inputs.python-version, 'pypy') && !startsWith(inputs.python-version, 'graalpy') }}
name: Test (no features)
run: cargo test --no-default-features --lib --tests

# --no-default-features when used with `cargo build/test -p` doesn't seem to work!
- name: Test pyo3-build-config (no features)
run: |
cd pyo3-build-config
cargo test --no-default-features

- name: Build (all additive features)
if: ${{ !startsWith(inputs.python-version, 'graalpy') }}
run: cargo build --lib --tests --no-default-features --features "multiple-pymethods full $MAYBE_NIGHTLY"

- if: ${{ startsWith(inputs.python-version, 'pypy') }}
name: Build PyPy (abi3-py39)
run: cargo build --lib --tests --no-default-features --features "multiple-pymethods abi3-py39 full $MAYBE_NIGHTLY"

# Run tests (except on PyPy, because no embedding API).
- if: ${{ !startsWith(inputs.python-version, 'pypy') && !startsWith(inputs.python-version, 'graalpy') }}
name: Test
run: cargo test --no-default-features --features "full $MAYBE_NIGHTLY"

# Repeat, with multiple-pymethods feature enabled (it's not entirely additive)
- if: ${{ !startsWith(inputs.python-version, 'pypy') && !startsWith(inputs.python-version, 'graalpy') }}
name: Test
run: cargo test --no-default-features --features "multiple-pymethods full $MAYBE_NIGHTLY"

# Run tests again, but in abi3 mode
- if: ${{ !startsWith(inputs.python-version, 'pypy') && !startsWith(inputs.python-version, 'graalpy') }}
name: Test (abi3)
run: cargo test --no-default-features --features "multiple-pymethods abi3 full $MAYBE_NIGHTLY"

# Run tests again, for abi3-py37 (the minimal Python version)
- if: ${{ (!startsWith(inputs.python-version, 'pypy') && !startsWith(inputs.python-version, 'graalpy')) && (inputs.python-version != '3.7') }}
name: Test (abi3-py37)
run: cargo test --no-default-features --features "multiple-pymethods abi3-py37 full $MAYBE_NIGHTLY"

- name: Test proc-macro code
run: cargo test --manifest-path=pyo3-macros-backend/Cargo.toml

- name: Test build config
run: cargo test --manifest-path=pyo3-build-config/Cargo.toml

- name: Test python examples and tests
shell: bash
run: nox -s test-py
env:
CARGO_TARGET_DIR: ${{ github.workspace }}/target

- uses: dorny/paths-filter@v3
if: ${{ inputs.rust == 'stable' && !startsWith(inputs.python-version, 'graalpy') }}
id: ffi-changes
with:
base: ${{ github.event.pull_request.base.ref || github.event.merge_group.base_ref }}
ref: ${{ github.event.pull_request.head.ref || github.event.merge_group.head_ref }}
base: ${{ github.event.merge_group.base_ref }}
ref: ${{ github.event.merge_group.head_ref }}
filters: |
changed:
- 'pyo3-ffi/**'
Expand All @@ -154,9 +107,49 @@ jobs:
if: ${{ endsWith(inputs.python-version, '-dev') || (steps.ffi-changes.outputs.changed == 'true' && inputs.rust == 'stable' && !startsWith(inputs.python-version, 'graalpy') && !(inputs.python-version == 'pypy3.9' && contains(inputs.os, 'windows'))) }}
run: nox -s ffi-check

- if: ${{ github.event_name != 'merge_group' }}
name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- if: ${{ github.event_name != 'merge_group' }}
name: Prepare coverage environment
run: |
cargo llvm-cov clean --workspace --profraw-only
nox -s set-coverage-env

- name: Build docs
run: nox -s docs

- name: Run Rust tests
run: nox -s test-rust

- name: Test python examples and tests
shell: bash
run: nox -s test-py
continue-on-error: ${{ endsWith(inputs.python-version, '-dev') }}
env:
CARGO_TARGET_DIR: ${{ github.workspace }}/target

- if: ${{ github.event_name != 'merge_group' }}
name: Generate coverage report
run: cargo llvm-cov
--package=pyo3
--package=pyo3-build-config
--package=pyo3-macros-backend
--package=pyo3-macros
--package=pyo3-ffi
report --codecov --output-path coverage.json

- if: ${{ github.event_name != 'merge_group' }}
name: Upload coverage report
uses: codecov/codecov-action@v5
with:
files: coverage.json
name: ${{ inputs.os }}/${{ inputs.python-version }}/${{ inputs.rust }}
token: ${{ secrets.CODECOV_TOKEN }}

env:
CARGO_TERM_VERBOSE: true
CARGO_BUILD_TARGET: ${{ inputs.rust-target }}
CARGO_TERM_VERBOSE: ${{ inputs.verbose }}
RUST_BACKTRACE: 1
RUSTFLAGS: "-D warnings"
RUSTDOCFLAGS: "-D warnings"
Loading
Loading