Skip to content

Commit c4bd302

Browse files
Add support for Python 3.14 on windows builds (#352)
Co-authored-by: Samuel Colvin <[email protected]>
1 parent e3c956b commit c4bd302

File tree

4 files changed

+26
-26
lines changed

4 files changed

+26
-26
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,15 @@ jobs:
158158
ls: dir
159159
target: i686
160160
python-architecture: x86
161-
interpreter: 3.9 3.10 3.11 3.12 3.13
161+
interpreter: 3.9 3.10 3.11 3.12 3.13 3.14
162162
- os: windows
163163
ls: dir
164164
target: x86_64
165-
interpreter: 3.9 3.10 3.11 3.12 3.13
165+
interpreter: 3.9 3.10 3.11 3.12 3.13 3.14
166166
- os: windows
167167
ls: dir
168168
target: aarch64
169-
interpreter: 3.11 3.12 3.13
169+
interpreter: 3.11 3.12 3.13 3.14
170170
- os: ubuntu
171171
platform: linux
172172
target: i686
@@ -192,12 +192,12 @@ jobs:
192192
runs-on: ${{ matrix.os }}-latest
193193

194194
steps:
195-
- uses: actions/checkout@v4
195+
- uses: actions/checkout@v5
196196

197197
- name: set up python
198-
uses: actions/setup-python@v5
198+
uses: actions/setup-python@v6
199199
with:
200-
python-version: "3.11"
200+
python-version: "3.13"
201201
architecture: ${{ matrix.python-architecture || 'x64' }}
202202

203203
- name: check GITHUB_REF matches package version

Cargo.lock

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ rust-version = "1.77"
2626
[dependencies]
2727
crossbeam-channel = "0.5.15"
2828
notify = { version = "8.0.0" }
29-
pyo3 = { version = "0.25.1", features = [
29+
pyo3 = { version = "0.26.0", features = [
3030
"extension-module",
3131
"generate-import-lib",
3232
] }

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,8 @@ impl RustNotify {
264264
debounce_ms: u64,
265265
step_ms: u64,
266266
timeout_ms: u64,
267-
stop_event: PyObject,
268-
) -> PyResult<PyObject> {
267+
stop_event: Py<PyAny>,
268+
) -> PyResult<Py<PyAny>> {
269269
if matches!(slf.borrow().watcher, WatcherEnum::None) {
270270
return Err(PyRuntimeError::new_err("RustNotify watcher closed"));
271271
}
@@ -282,7 +282,7 @@ impl RustNotify {
282282
_ => Some(SystemTime::now() + Duration::from_millis(timeout_ms)),
283283
};
284284
loop {
285-
py.allow_threads(|| sleep(step_time));
285+
py.detach(|| sleep(step_time));
286286
match py.check_signals() {
287287
Ok(_) => (),
288288
Err(_) => {
@@ -348,7 +348,7 @@ impl RustNotify {
348348
self.watcher = WatcherEnum::None;
349349
}
350350

351-
fn __exit__(&mut self, _exc_type: PyObject, _exc_value: PyObject, _traceback: PyObject) {
351+
fn __exit__(&mut self, _exc_type: Py<PyAny>, _exc_value: Py<PyAny>, _traceback: Py<PyAny>) {
352352
self.close();
353353
}
354354

0 commit comments

Comments
 (0)