From 4b63b7f1cc5f8ffba5cc0a39b660db989e434fdd Mon Sep 17 00:00:00 2001 From: goodboy Date: Fri, 17 Apr 2026 13:26:19 -0400 Subject: [PATCH] Handle py3.14+ incompats as test skips Since we're devving subints we require the 3.14+ stdlib API and a couple compiled libs don't support it yet, namely: - `cffi`, which we're only using for the `.ipc._linux` eventfd stuff (now factored into `hotbaud` anyway). - `greenback`, which requires `greenlet` which doesn't seem to be wheeled yet * on nixos the sdist build was failing due to lack of `g++` which i don't care to figure out rn since we don't need `.devx` stuff immediately for this subints prototype. * [ ] we still need to adjust any dependent suites to skip. Adjust `test_ringbuf` to skip on import failure. Also project wide, - pin us to py 3.13+ in prep for last-2-minor-version policy. - drop `msgspec>=0.20.0`, the first release with py3.14 support. (cherry picked from commit d2ea8aa2deb681faf7986759ff822579ab9ee22f) --- tests/test_ringbuf.py | 3 +++ tractor/ipc/_linux.py | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/tests/test_ringbuf.py b/tests/test_ringbuf.py index 56c4eae8..e55a87b9 100644 --- a/tests/test_ringbuf.py +++ b/tests/test_ringbuf.py @@ -21,6 +21,9 @@ from tractor._testing.samples import ( # XXX, in case you want to melt your cores, comment this skip line XD pytestmark = pytest.mark.skip +# XXX `cffi` dun build on py3.14 yet.. +cffi = pytest.importorskip("cffi") + @tractor.context async def child_read_shm( diff --git a/tractor/ipc/_linux.py b/tractor/ipc/_linux.py index 88d80d1c..cd7de870 100644 --- a/tractor/ipc/_linux.py +++ b/tractor/ipc/_linux.py @@ -17,10 +17,20 @@ Linux specifics, for now we are only exposing EventFD ''' -import os import errno +import os +import sys + +try: + import cffi +except ImportError as ie: + if sys.version_info < (3, 14): + ie.add_note( + f'The `cffi` pkg has no 3.14 support yet.\n' + ) + + raise ie -import cffi import trio ffi = cffi.FFI()