Skip to content

Conversation

neutrinoceros
Copy link
Contributor

@neutrinoceros neutrinoceros commented Sep 21, 2025

Based off #371, similar to Unidata/netcdf4-python#1427
I've included a commit to drop support for 3.8 and 3.9 (soon to be EOL), but it can easily be split out of this PR if desired.

@neutrinoceros
Copy link
Contributor Author

@jswhit I would recommend running CI on #371 first, and hopefully merge it, so I'll gain "contributor" privileges on this repo and will be able to iterate much faster on fixing CI here.

@neutrinoceros
Copy link
Contributor Author

(that said, I think I found the issue and updated the branch here)

@neutrinoceros
Copy link
Contributor Author

Here's the current error

ImportError: dlopen(/private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/cibw-run-67bztgcn/cp314-macosx_arm64/venv-test-arm64/lib/python3.14/site-packages/cftime/_cftime.abi3.so, 0x0002): symbol not found in flat namespace '_PyCode_NewWithPosOnlyArgs'

this is likely caused by some limitation (or bug) in Cython where it can still generate code that isn't strictly Limited-API-compliant. This is similar to why cp310-abi3 doesn't work, so let's try targeting cp312-abi3 instead

@neutrinoceros
Copy link
Contributor Author

cp312-abi3 still errors (different symbol)

ImportError: dlopen(/private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/cibw-run-2th61c55/cp314-macosx_arm64/venv-test-arm64/lib/python3.14/site-packages/cftime/_cftime.abi3.so, 0x0002): symbol not found in flat namespace '__PyThreadState_UncheckedGet'

let's try cp313-abi3

@neutrinoceros
Copy link
Contributor Author

cp313-abi3 builds fine and even passes tests on CPython 3.13, however it doesn't seem to survive the forward compatibility check on CPython 3.14:

2025-09-24T06:37:12.7224860Z + /bin/sh -c 'python -c "import cftime; print(f'"'"'cftime v{cftime.__version__}'"'"')" && python -m pytest -vv /Users/runner/work/cftime/cftime/test
2025-09-24T06:37:12.7225340Z '
2025-09-24T06:37:12.7535710Z <frozen importlib._bootstrap>:491: RuntimeWarning: compile time Python version 3.13 of module 'cftime._cftime' does not match runtime version 3.14

This again might be a sign of a limitation or bug in Cython, but I imagine it could also be a symptom of 3.14 not being completely stabilized yet (even though we're on rc3 at this point). I cannot do much more for now, I'll need to wait for the final 3.14.0 release, about 2 weeks from now, to see if anything changes.
If not, I'll report the 3 failure modes to Cython devs, and we'll see where it goes to from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant