Skip to content

Conversation

@ocefpaf
Copy link
Member

@ocefpaf ocefpaf commented Oct 27, 2025

This PR builds a single wheel for each platform using Python 3.11 ABI3. That means we drop support for 3.10 and 3.9, I can try to re-add 3.10 later but I don't think 3.9 is worth it. I would stick with SPEC 0 though, that way we can remove 3.10 now and make our lives a bit easier.

Note that, with ABI3, we don't need to rebuild the extension every new Python release. I just tested this wheel against 3.14 and it works as expected.

Closes #626

@scitools-templating: please no share prompt

@CLAassistant
Copy link

CLAassistant commented Oct 27, 2025

CLA assistant check
All committers have signed the CLA.

@ocefpaf
Copy link
Member Author

ocefpaf commented Oct 27, 2025

I don't know how tox works to fix the failures here, but a py310_abl3 wheel is built and tested against py314.

@ocefpaf
Copy link
Member Author

ocefpaf commented Oct 29, 2025

I cannot figure out what is wrong with the CIs. In a different env, where the wheels are built and tested, everything passes. I'm guessing it is the lockfiles, maybe the cython version there is different?

@trexfeathers trexfeathers self-assigned this Nov 26, 2025
@trexfeathers
Copy link
Collaborator

Regarding Tox: we've been worried about it for a while, since tox-conda is unsupported and out-of-date. Unfortunately it has now stopped working. We've been meaning to adopt Pixi anyway so I've spent this afternoon writing a PR for that:

#636

Hopefully I can get that merged soon and then we can update your PR.

@ocefpaf ocefpaf force-pushed the ABI3 branch 3 times, most recently from ba039fd to 41ddd6d Compare January 14, 2026 11:04
@ocefpaf
Copy link
Member Author

ocefpaf commented Jan 14, 2026

I cannot reproduce that failure running pixi run --environment test-py314 pytest locally. I'm not sure if it is the compiler version or something else :-/

@trexfeathers
Copy link
Collaborator

I cannot reproduce that failure running pixi run --environment test-py314 pytest locally. I'm not sure if it is the compiler version or something else :-/

Hey, this is still progress - we have new information! But yeah that's frustrating if it only errors in GHA.

@ocefpaf
Copy link
Member Author

ocefpaf commented Jan 14, 2026

Hey, this is still progress - we have new information! But yeah that's frustrating if it only errors in GHA.

I'll remove the ABI3 from the specialized tests. As long as they build and pass all the tests in the cibuildwheel, that is what really matters. Also, we do need to keep the specialized tests in case folks are building it that way themselves.

There is one expected failure and one, regarding the configuration tests, that is eluding me:

XFAIL cf_units/tests/unit/test__udunits2.py::Test_unit::test_offset_by_time_invalid
FAILED cf_units/tests/test_coding_standards.py::test_python_versions - assert 'NAME: "cf-units-py314"' in '# Reference:\n#   - [https://github.com/actions/cache\n#](https://github.com/actions/cache/n#)   - [https://github.com/actions/checkout\n#](https://github.com/actions/checkout/n#)   - [https://github.com/actions/download-artifact\n#](https://github.com/actions/download-artifact/n#)   - [https://github.com/actions/upload-artifact\n#](https://github.com/actions/upload-artifact/n#)   - [https://github.com/prefix-dev/setup-pixi\n\nname:](https://github.com/prefix-dev/setup-pixi/n/nname:) ci-locks\n\non:\n  workflow_dispatch:\n  schedule:\n    - cron: "3 0 * * 1"\n\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.ref }}\n  cancel-in-progress: true\n\njobs:\n  build-locks:\n    name: "Build locks"\n    runs-on: ubuntu-latest\n    defaults:\n      run:\n        shell: bash -l {0}\n    env:\n      SHELLOPTS: "errexit:pipefail"\n      NAME: "cf-units-py313"\n    steps:\n    - name: "Checkout"\n      uses: actions/checkout@v5\n\n    - name: "Pixi setup"\n      uses: prefix-dev/setup-pixi@82d477f15f3a381dbcc8adc1206ce643fe110fb7\n      with:\n        run-install: false\n\n    - name: "refresh pixi"\n      run: |\n        pixi update --json | pixi exec pixi-diff-to-markdown > diff.md\n        if [ $(wc -c < diff.md) -lt 10 ]; then\n            rm -f diff.md\n        fi\n\n    - name: "refresh locks"\n      if: ${{ hashFiles(\'diff.md\') }}\n      run: |\n        pixi workspace export conda-explicit-spec --envir...ace }}\n\n    - name: "Generate token"\n      uses: actions/create-github-app-token@v2\n      id: generate-token\n      with:\n        app_id: ${{ secrets.AUTH_APP_ID }}\n        private_key: ${{ secrets.AUTH_APP_PRIVATE_KEY }}\n\n    - name: "Push pull-request"\n      id: cpr\n      uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e\n      with:\n        token: ${{ steps.generate-token.outputs.token }}\n        add-paths: ${{ github.workspace }}/requirements/*\n        commit-message: "updated lock files"\n        branch: pixi-auto-update\n        delete-branch: true\n        title: "[cf-units.ci] pixi lock auto-update"\n        body-path: ${{ github.workspace }}/diff.md\n        labels: |\n          Bot\n          New: Pull Request\n\n    - name: "Show pull-request"\n      if: steps.cpr.outputs.pull-request-number != \'\'\n      run: |\n        echo "pull-request #${{ steps.cpr.outputs.pull-request-number }}"\n        echo "pull-request URL ${{ steps.cpr.outputs.pull-request-url }}"\n        echo "pull-request operation [${{ steps.cpr.outputs.pull-request-operation }}]"\n        echo "pull-request SHA ${{ steps.cpr.outputs.pull-request-head-sha }}"\n'
 +  where '# Reference:\n#   - [https://github.com/actions/cache\n#](https://github.com/actions/cache/n#)   - [https://github.com/actions/checkout\n#](https://github.com/actions/checkout/n#)   - [https://github.com/actions/download-artifact\n#](https://github.com/actions/download-artifact/n#)   - [https://github.com/actions/upload-artifact\n#](https://github.com/actions/upload-artifact/n#)   - [https://github.com/prefix-dev/setup-pixi\n\nname:](https://github.com/prefix-dev/setup-pixi/n/nname:) ci-locks\n\non:\n  workflow_dispatch:\n  schedule:\n    - cron: "3 0 * * 1"\n\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.ref }}\n  cancel-in-progress: true\n\njobs:\n  build-locks:\n    name: "Build locks"\n    runs-on: ubuntu-latest\n    defaults:\n      run:\n        shell: bash -l {0}\n    env:\n      SHELLOPTS: "errexit:pipefail"\n      NAME: "cf-units-py313"\n    steps:\n    - name: "Checkout"\n      uses: actions/checkout@v5\n\n    - name: "Pixi setup"\n      uses: prefix-dev/setup-pixi@82d477f15f3a381dbcc8adc1206ce643fe110fb7\n      with:\n        run-install: false\n\n    - name: "refresh pixi"\n      run: |\n        pixi update --json | pixi exec pixi-diff-to-markdown > diff.md\n        if [ $(wc -c < diff.md) -lt 10 ]; then\n            rm -f diff.md\n        fi\n\n    - name: "refresh locks"\n      if: ${{ hashFiles(\'diff.md\') }}\n      run: |\n        pixi workspace export conda-explicit-spec --envir...ace }}\n\n    - name: "Generate token"\n      uses: actions/create-github-app-token@v2\n      id: generate-token\n      with:\n        app_id: ${{ secrets.AUTH_APP_ID }}\n        private_key: ${{ secrets.AUTH_APP_PRIVATE_KEY }}\n\n    - name: "Push pull-request"\n      id: cpr\n      uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e\n      with:\n        token: ${{ steps.generate-token.outputs.token }}\n        add-paths: ${{ github.workspace }}/requirements/*\n        commit-message: "updated lock files"\n        branch: pixi-auto-update\n        delete-branch: true\n        title: "[cf-units.ci] pixi lock auto-update"\n        body-path: ${{ github.workspace }}/diff.md\n        labels: |\n          Bot\n          New: Pull Request\n\n    - name: "Show pull-request"\n      if: steps.cpr.outputs.pull-request-number != \'\'\n      run: |\n        echo "pull-request #${{ steps.cpr.outputs.pull-request-number }}"\n        echo "pull-request URL ${{ steps.cpr.outputs.pull-request-url }}"\n        echo "pull-request operation [${{ steps.cpr.outputs.pull-request-operation }}]"\n        echo "pull-request SHA ${{ steps.cpr.outputs.pull-request-head-sha }}"\n' = read_text()
 +    where read_text = PosixPath('/home/runner/work/cf-units/cf-units/.github/workflows/ci-locks.yml').read_text

@trexfeathers
Copy link
Collaborator

There is one expected failure and one, regarding the configuration tests, that is eluding me:

Yeah the output is unclear - I was in a rush! As you might have guessed, this test is to make sure that we change ALL the appropriate files when we advance our supported Python versions; there are so many and it's easy to miss one. In this case it is talking about ci-locks, which is still using the py313 environment while everything else has moved to py314.

You just need to change this line:

NAME: "cf-units-py313"

@trexfeathers
Copy link
Collaborator

trexfeathers commented Jan 14, 2026

Ugh apparently there are more Python version alignments to make!

This is the offending test:

def test_python_versions():

Any ideas for making it less rubbish are welcomed!

... or you can just read the test and then check all the files manually.

@ocefpaf
Copy link
Member Author

ocefpaf commented Jan 14, 2026

Any ideas for making it less rubbish are welcomed!

I don't want to tackle it in the PR, but I can give it a go later. IMO, we can try to make these a "default" latest and forget about them. Some of those can be replaced by pre-commits that updates the pyproject.toml based on the python-required metadata, etc.

@ocefpaf ocefpaf force-pushed the ABI3 branch 4 times, most recently from 2150a52 to 49932f1 Compare January 14, 2026 13:16
@ocefpaf ocefpaf requested a review from trexfeathers January 14, 2026 13:55
Copy link
Collaborator

@trexfeathers trexfeathers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK I'm comfortable I understand this now. Just a couple of minor things @ocefpaf. Thanks!

@ocefpaf
Copy link
Member Author

ocefpaf commented Jan 16, 2026

Cool! Another conflict 😭

@trexfeathers trexfeathers merged commit 6857ee4 into SciTools:main Jan 16, 2026
19 checks passed
@ocefpaf ocefpaf deleted the ABI3 branch January 16, 2026 14:09
@codecov
Copy link

codecov bot commented Jan 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (f06dec3) to head (2aabb38).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##             main   #627       +/-   ##
=========================================
- Coverage   57.61%      0   -57.62%     
=========================================
  Files          61      0       -61     
  Lines        6293      0     -6293     
  Branches     1150      0     -1150     
=========================================
- Hits         3626      0     -3626     
+ Misses       2376      0     -2376     
+ Partials      291      0      -291     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ocefpaf ocefpaf mentioned this pull request Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Support Python 3.14

3 participants