From 163f036d8ddf950205239a3c9ba95d7af90447ad Mon Sep 17 00:00:00 2001 From: zerocewl Date: Mon, 13 Oct 2025 20:18:46 +0200 Subject: [PATCH 1/9] Add support for Python 3.14 on windows builds --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6e48f8f..34b174d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -158,15 +158,15 @@ jobs: ls: dir target: i686 python-architecture: x86 - interpreter: 3.9 3.10 3.11 3.12 3.13 + interpreter: 3.9 3.10 3.11 3.12 3.13 3.14 - os: windows ls: dir target: x86_64 - interpreter: 3.9 3.10 3.11 3.12 3.13 + interpreter: 3.9 3.10 3.11 3.12 3.13 3.14 - os: windows ls: dir target: aarch64 - interpreter: 3.11 3.12 3.13 + interpreter: 3.11 3.12 3.13 3.14 - os: ubuntu platform: linux target: i686 From 3d60c322774ecdf35612ab52bfa5d53555733cb2 Mon Sep 17 00:00:00 2001 From: zerocewl Date: Mon, 13 Oct 2025 21:15:53 +0200 Subject: [PATCH 2/9] Update pyo3 to 0.26.0 --- Cargo.lock | 25 ++++++++++++------------- Cargo.toml | 2 +- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fb24fd8..08f422c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -191,9 +191,9 @@ checksum = "5e0826a989adedc2a244799e823aece04662b66609d96af8dff7ac6df9a8925d" [[package]] name = "once_cell" -version = "1.19.0" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "portable-atomic" @@ -212,9 +212,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.25.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8970a78afe0628a3e3430376fc5fd76b6b45c4d43360ffd6cdd40bdde72b682a" +checksum = "7ba0117f4212101ee6544044dae45abe1083d30ce7b29c4b5cbdfa2354e07383" dependencies = [ "indoc", "libc", @@ -229,20 +229,19 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.25.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458eb0c55e7ece017adeba38f2248ff3ac615e53660d7c71a238d7d2a01c7598" +checksum = "4fc6ddaf24947d12a9aa31ac65431fb1b851b8f4365426e182901eabfb87df5f" dependencies = [ - "once_cell", "python3-dll-a", "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.25.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7114fe5457c61b276ab77c5055f206295b812608083644a5c5b2640c3102565c" +checksum = "025474d3928738efb38ac36d4744a74a400c901c7596199e20e45d98eb194105" dependencies = [ "libc", "pyo3-build-config", @@ -250,9 +249,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.25.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8725c0a622b374d6cb051d11a0983786448f7785336139c3c94f5aa6bef7e50" +checksum = "2e64eb489f22fe1c95911b77c44cc41e7c19f3082fc81cce90f657cdc42ffded" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -262,9 +261,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.25.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4109984c22491085343c05b0dbc54ddc405c3cf7b4374fc533f5c3313a572ccc" +checksum = "100246c0ecf400b475341b8455a9213344569af29a3c841d29270e53102e0fcf" dependencies = [ "heck", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index 0e284c2..616ad0e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ rust-version = "1.77" [dependencies] crossbeam-channel = "0.5.15" notify = { version = "8.0.0" } -pyo3 = { version = "0.25.1", features = [ +pyo3 = { version = "0.26.0", features = [ "extension-module", "generate-import-lib", ] } From ce6b40e39e386ac44e1c83f9db7f9d01629ef84f Mon Sep 17 00:00:00 2001 From: Samuel Colvin Date: Mon, 13 Oct 2025 21:49:18 -0700 Subject: [PATCH 3/9] fix pyo3 0.26 compat --- src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index bbd60eb..f1a5f7a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -264,8 +264,8 @@ impl RustNotify { debounce_ms: u64, step_ms: u64, timeout_ms: u64, - stop_event: PyObject, - ) -> PyResult { + stop_event: Py, + ) -> PyResult> { if matches!(slf.borrow().watcher, WatcherEnum::None) { return Err(PyRuntimeError::new_err("RustNotify watcher closed")); } @@ -282,7 +282,7 @@ impl RustNotify { _ => Some(SystemTime::now() + Duration::from_millis(timeout_ms)), }; loop { - py.allow_threads(|| sleep(step_time)); + py.detach(|| sleep(step_time)); match py.check_signals() { Ok(_) => (), Err(_) => { @@ -348,7 +348,7 @@ impl RustNotify { self.watcher = WatcherEnum::None; } - fn __exit__(&mut self, _exc_type: PyObject, _exc_value: PyObject, _traceback: PyObject) { + fn __exit__(&mut self, _exc_type: Py, _exc_value: Py, _traceback: Py) { self.close(); } From 27e15781caa0f62c6131168fffd0472594092969 Mon Sep 17 00:00:00 2001 From: Samuel Colvin Date: Mon, 13 Oct 2025 22:04:55 -0700 Subject: [PATCH 4/9] tweak ci --- .github/workflows/ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 34b174d..ec56fd3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -192,12 +192,12 @@ jobs: runs-on: ${{ matrix.os }}-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: set up python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: - python-version: "3.11" + python-version: "3.13" architecture: ${{ matrix.python-architecture || 'x64' }} - name: check GITHUB_REF matches package version @@ -219,6 +219,8 @@ jobs: target: ${{ matrix.target }} manylinux: ${{ matrix.manylinux || 'auto' }} args: --release --out dist --interpreter ${{ matrix.interpreter || '3.9 3.10 3.11 3.12 3.13 3.13t 3.14 3.14t' }} + rust-toolchain: stable + docker-options: -e CI - name: build pypy wheels if: ${{ matrix.pypy }} From 82d7ed1c9cadd48810423216def2e31d789d3069 Mon Sep 17 00:00:00 2001 From: Samuel Colvin Date: Mon, 13 Oct 2025 22:16:07 -0700 Subject: [PATCH 5/9] try setting PyO3/maturin-action version explicitly --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ec56fd3..62e332e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -208,13 +208,13 @@ jobs: - name: build sdist if: ${{ matrix.os == 'ubuntu' && matrix.target == 'x86_64' && matrix.manylinux == 'auto' }} - uses: PyO3/maturin-action@v1 + uses: PyO3/maturin-action@v1.49 with: command: sdist args: --out dist - name: build wheels - uses: PyO3/maturin-action@v1 + uses: PyO3/maturin-action@v1.49 with: target: ${{ matrix.target }} manylinux: ${{ matrix.manylinux || 'auto' }} From 536302f8cbf3989265f2918df5e77eb4f5aa3e8b Mon Sep 17 00:00:00 2001 From: Samuel Colvin Date: Mon, 13 Oct 2025 22:17:04 -0700 Subject: [PATCH 6/9] try setting PyO3/maturin-action version explicitly, take 2 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 62e332e..4463b4e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -208,13 +208,13 @@ jobs: - name: build sdist if: ${{ matrix.os == 'ubuntu' && matrix.target == 'x86_64' && matrix.manylinux == 'auto' }} - uses: PyO3/maturin-action@v1.49 + uses: PyO3/maturin-action@v1.49.4 with: command: sdist args: --out dist - name: build wheels - uses: PyO3/maturin-action@v1.49 + uses: PyO3/maturin-action@v1.49.4 with: target: ${{ matrix.target }} manylinux: ${{ matrix.manylinux || 'auto' }} From 46e3db3d8d9c3825ea2e5eb7bd2a25ee3f966e1c Mon Sep 17 00:00:00 2001 From: Samuel Colvin Date: Mon, 13 Oct 2025 22:24:01 -0700 Subject: [PATCH 7/9] try setting pyo3 in build-dependencies --- Cargo.lock | 1 + Cargo.toml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 08f422c..309604b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -360,6 +360,7 @@ dependencies = [ "crossbeam-channel", "notify", "pyo3", + "pyo3-build-config", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 616ad0e..07f1fba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,6 +31,9 @@ pyo3 = { version = "0.26.0", features = [ "generate-import-lib", ] } +[build-dependencies] +pyo3-build-config = { version = "0.26" } + [lib] name = "_rust_notify" crate-type = ["cdylib"] From f139e112a7788926212c986e98c04bd6a96e9cb7 Mon Sep 17 00:00:00 2001 From: zerocewl Date: Tue, 14 Oct 2025 09:32:30 +0200 Subject: [PATCH 8/9] Update ``python3-dll-a`` to 0.2.14 --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 309604b..4135230 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -274,9 +274,9 @@ dependencies = [ [[package]] name = "python3-dll-a" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49fe4227a288cf9493942ad0220ea3f185f4d1f2a14f197f7344d6d02f4ed4ed" +checksum = "d381ef313ae70b4da5f95f8a4de773c6aa5cd28f73adec4b4a31df70b66780d8" dependencies = [ "cc", ] From 22fc9850f6d251387e727cd494d3d6ae1500576d Mon Sep 17 00:00:00 2001 From: Samuel Colvin Date: Tue, 14 Oct 2025 07:17:38 -0700 Subject: [PATCH 9/9] revert unnecessary changes --- .github/workflows/ci.yml | 6 ++---- Cargo.toml | 3 --- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4463b4e..f7ac6ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -208,19 +208,17 @@ jobs: - name: build sdist if: ${{ matrix.os == 'ubuntu' && matrix.target == 'x86_64' && matrix.manylinux == 'auto' }} - uses: PyO3/maturin-action@v1.49.4 + uses: PyO3/maturin-action@v1 with: command: sdist args: --out dist - name: build wheels - uses: PyO3/maturin-action@v1.49.4 + uses: PyO3/maturin-action@v1 with: target: ${{ matrix.target }} manylinux: ${{ matrix.manylinux || 'auto' }} args: --release --out dist --interpreter ${{ matrix.interpreter || '3.9 3.10 3.11 3.12 3.13 3.13t 3.14 3.14t' }} - rust-toolchain: stable - docker-options: -e CI - name: build pypy wheels if: ${{ matrix.pypy }} diff --git a/Cargo.toml b/Cargo.toml index 07f1fba..616ad0e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,9 +31,6 @@ pyo3 = { version = "0.26.0", features = [ "generate-import-lib", ] } -[build-dependencies] -pyo3-build-config = { version = "0.26" } - [lib] name = "_rust_notify" crate-type = ["cdylib"]