yaml / pyyaml

Canonical source repository for PyYAML
MIT License
2.47k stars 508 forks source link

chore(python): add Python 3.12 support #739

Closed stegayet closed 10 months ago

stegayet commented 11 months ago

Trying to run CI workflow against Python 3.12.

I'll update documentation/trove classifier accordingly.

hugovk commented 10 months ago

Looking at https://github.com/stegayet/pyyaml/actions/runs/5772519751/job/15647594083

We'll need this in ci.yaml

    - name: Install python ${{ matrix.spec }}
-     uses: actions/setup-python@v2
+     uses: actions/setup-python@v4
      with:
        architecture: ${{ matrix.python_arch }}
        python-version: ${{ matrix.spec }}
+       allow-prereleases: true

And add to each strategy so we can at least see the 3.12 results, regardless of other unrelated jobs failing:

    strategy:
+     fail-fast: false
nitzmahone commented 10 months ago

Since we use private Apple Silicon GHA runners that shouldn't be exposed to the public, I've been running PyYAML CI against every 3.12 pre-release in one of my personal orgs (just as we did for 3.11 pre-releases). I was ready to ship the 3.12 wheels the day 3.12.0rc1 was out, but currently blocked by the Windows wheels not being buildable under cibuildwheel - the custom build_ext args required by the Windows builds don't smuggle properly through PEP517 config_settings. I've been playing with the extension build rewrite that ditches all that stuff, but it's not ready to go yet, so I'll probably end up just doing some temporary customization to do an explicit download/install of 3.12.0rc1 on the Windows runners if needed, until GHA includes it in their image.

Anyway, 3.12 wheels are coming Real Soon Now :laughing: , and we've already got all the necessary changes to CI in place. Thanks!

nitzmahone commented 10 months ago

closing - addressed by https://github.com/yaml/pyyaml/commit/b4d80a742142004490d2da7691d534923820b81c and 6.0.1 wheels for Python 3.12 on all existing support arches + musllinux_1_1_x86_64 wheels for Python 3.8-3.12 released to PyPI this morning