diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b4c3a55dcf..9ceb4dd64c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -520,12 +520,7 @@ jobs: - run: python3 -m sysconfig - run: python3 -m pip install --upgrade pip && pip install nox - run: nox -s ffi-check - - name: Run default nox sessions that should pass - run: nox -s clippy docs rustfmt ruff - - name: Run PyO3 tests with free-threaded Python (can fail) - # TODO fix the test crashes so we can unset this - continue-on-error: true - run: nox -s test + - run: nox test-version-limits: needs: [fmt] diff --git a/src/impl_/pyclass.rs b/src/impl_/pyclass.rs index f116e608d2f..b0362174d25 100644 --- a/src/impl_/pyclass.rs +++ b/src/impl_/pyclass.rs @@ -1115,7 +1115,7 @@ impl PyClassThreadChecker for ThreadCheckerImpl { /// Trait denoting that this class is suitable to be used as a base type for PyClass. #[cfg_attr( - all(diagnostic_namespace, feature = "abi3"), + all(diagnostic_namespace, Py_LIMITED_API), diagnostic::on_unimplemented( message = "pyclass `{Self}` cannot be subclassed", label = "required for `#[pyclass(extends={Self})]`", @@ -1124,7 +1124,7 @@ impl PyClassThreadChecker for ThreadCheckerImpl { ) )] #[cfg_attr( - all(diagnostic_namespace, not(feature = "abi3")), + all(diagnostic_namespace, not(Py_LIMITED_API)), diagnostic::on_unimplemented( message = "pyclass `{Self}` cannot be subclassed", label = "required for `#[pyclass(extends={Self})]`", diff --git a/tests/test_gc.rs b/tests/test_gc.rs index b37901930be..a9380c29f7d 100644 --- a/tests/test_gc.rs +++ b/tests/test_gc.rs @@ -120,6 +120,10 @@ fn gc_integration() { Python::with_gil(|py| { py.run(ffi::c_str!("import gc; gc.collect()"), None, None) .unwrap(); + // threads are resumed before tp_clear() calls finish, so drop might not + // necessarily be called when we get here see + // https://peps.python.org/pep-0703/#stop-the-world + #[cfg(not(Py_GIL_DISABLED))] assert!(drop_called.load(Ordering::Relaxed)); }); }