Skip to content

Commit

Permalink
Add python 3.11 support (#663)
Browse files Browse the repository at this point in the history
* Add python 3.11 support

* ci: use `windows-2019` runners

`windows-2016` runners have been removed

* ci: use CPython 3.11.0-rc.2 for Windows builds

Co-authored-by: Matt Davis <mrd@redhat.com>
  • Loading branch information
mayeut and nitzmahone committed Sep 13, 2022
1 parent 0abad85 commit 957ae4d
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 31 deletions.
53 changes: 36 additions & 17 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,20 @@ jobs:
# - { platform: manylinux1, arch: x86_64, spec: cp37 }
# - { platform: manylinux1, arch: x86_64, spec: cp38 }
# - { platform: manylinux1, arch: x86_64, spec: cp39 }
- { platform: manylinux2014, arch: x86_64, spec: cp310 }
# - { platform: manylinux2014, arch: x86_64, spec: cp310 }
- { platform: manylinux2014, arch: x86_64, spec: cp311 }
# - { platform: manylinux2014, arch: aarch64, spec: cp36 }
# - { platform: manylinux2014, arch: aarch64, spec: cp37 }
# - { platform: manylinux2014, arch: aarch64, spec: cp38 }
# - { platform: manylinux2014, arch: aarch64, spec: cp39 }
# - { platform: manylinux2014, arch: aarch64, spec: cp310 }
# - { platform: manylinux2014, arch: aarch64, spec: cp311 }
# - { platform: manylinux2014, arch: s390x, spec: cp36 }
# - { platform: manylinux2014, arch: s390x, spec: cp37 }
# - { platform: manylinux2014, arch: s390x, spec: cp38 }
# - { platform: manylinux2014, arch: s390x, spec: cp39 }
# - { platform: manylinux2014, arch: s390x, spec: cp310 }
# - { platform: manylinux2014, arch: s390x, spec: cp311 }

steps:
- name: Checkout PyYAML
Expand Down Expand Up @@ -233,7 +236,8 @@ jobs:
# - spec: cp37-macosx_x86_64
# - spec: cp38-macosx_x86_64
# - spec: cp39-macosx_x86_64
- spec: cp310-macosx_x86_64
# - spec: cp310-macosx_x86_64
- spec: cp311-macosx_x86_64

# # build for arm64 under a hacked macOS 12 self-hosted x86_64-on-arm64 runner until arm64 is fully supported
# # FIXME: ? cp38-macosx_arm64 requires special handling and fails some test_zdist tests under cibw 2.1.2, skip it (so Apple's XCode python3 won't have a wheel)
Expand All @@ -249,6 +253,13 @@ jobs:
# runs_on: [self-hosted, macOS, arm64]
# arch: arm64
# run_wrapper: arch -arm64 bash --noprofile --norc -eo pipefail {0}
# sdkroot: macosx11.3
#
# - spec: cp311-macosx_arm64
# deployment_target: '11.0'
# runs_on: [self-hosted, macOS, arm64]
# arch: arm64
# run_wrapper: arch -arm64 bash --noprofile --norc -eo pipefail {0}
# sdkroot: macosx11.3

steps:
Expand Down Expand Up @@ -293,9 +304,9 @@ jobs:
strategy:
matrix:
include:
- platform: windows-2016
- platform: windows-2019
arch: x64
- platform: windows-2016
- platform: windows-2019
arch: win32
steps:
- name: Get cached libyaml state
Expand Down Expand Up @@ -323,7 +334,7 @@ jobs:
mkdir libyaml/build
pushd libyaml/build
cmake.exe -G "Visual Studio 15 2017" -A ${{ matrix.arch }} -DYAML_STATIC_LIB_NAME=yaml ..
cmake.exe -G "Visual Studio 16 2019" -A ${{ matrix.arch }} -DYAML_STATIC_LIB_NAME=yaml ..
cmake.exe --build . --config Release
popd
Expand All @@ -335,46 +346,54 @@ jobs:
strategy:
matrix:
include:
- platform: windows-2016
- platform: windows-2019
build_arch: x64
python_arch: x64
spec: 3.6
# - platform: windows-2016
# - platform: windows-2019
# build_arch: x64
# python_arch: x64
# spec: 3.7
# - platform: windows-2016
# - platform: windows-2019
# build_arch: x64
# python_arch: x64
# spec: 3.8
# - platform: windows-2016
# - platform: windows-2019
# build_arch: x64
# python_arch: x64
# spec: 3.9
- platform: windows-2016
# - platform: windows-2019
# build_arch: x64
# python_arch: x64
# spec: '3.10'
- platform: windows-2019
build_arch: x64
python_arch: x64
spec: '3.10'
- platform: windows-2016
spec: '3.11.0-rc.2'
- platform: windows-2019
build_arch: win32
python_arch: x86
spec: 3.6
# - platform: windows-2016
# - platform: windows-2019
# build_arch: win32
# python_arch: x86
# spec: 3.7
# - platform: windows-2016
# - platform: windows-2019
# build_arch: win32
# python_arch: x86
# spec: 3.8
# - platform: windows-2016
# - platform: windows-2019
# build_arch: win32
# python_arch: x86
# spec: 3.9
- platform: windows-2016
# - platform: windows-2019
# build_arch: win32
# python_arch: x86
# spec: '3.10'
- platform: windows-2019
build_arch: win32
python_arch: x86
spec: '3.10'
spec: '3.11.0-rc.2'
steps:
# autocrlf screws up tests under Windows
- name: Set git to use LF
Expand Down
45 changes: 32 additions & 13 deletions .github/workflows/manual_artifact_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,19 @@ jobs:
- { platform: manylinux1, arch: x86_64, spec: cp38 }
- { platform: manylinux1, arch: x86_64, spec: cp39 }
- { platform: manylinux2014, arch: x86_64, spec: cp310 }
- { platform: manylinux2014, arch: x86_64, spec: cp311 }
- { platform: manylinux2014, arch: aarch64, spec: cp36 }
- { platform: manylinux2014, arch: aarch64, spec: cp37 }
- { platform: manylinux2014, arch: aarch64, spec: cp38 }
- { platform: manylinux2014, arch: aarch64, spec: cp39 }
- { platform: manylinux2014, arch: aarch64, spec: cp310 }
- { platform: manylinux2014, arch: aarch64, spec: cp311 }
- { platform: manylinux2014, arch: s390x, spec: cp36 }
- { platform: manylinux2014, arch: s390x, spec: cp37 }
- { platform: manylinux2014, arch: s390x, spec: cp38 }
- { platform: manylinux2014, arch: s390x, spec: cp39 }
- { platform: manylinux2014, arch: s390x, spec: cp310 }
- { platform: manylinux2014, arch: s390x, spec: cp311 }

steps:
- name: Checkout PyYAML
Expand Down Expand Up @@ -232,6 +235,7 @@ jobs:
- spec: cp38-macosx_x86_64
- spec: cp39-macosx_x86_64
- spec: cp310-macosx_x86_64
- spec: cp311-macosx_x86_64

# build for arm64 under a hacked macOS 12 self-hosted x86_64-on-arm64 runner until arm64 is fully supported
# FIXME: ? cp38-macosx_arm64 requires special handling and fails some test_zdist tests under cibw 2.1.2, skip it (so Apple's XCode python3 won't have a wheel)
Expand All @@ -249,6 +253,13 @@ jobs:
run_wrapper: arch -arm64 bash --noprofile --norc -eo pipefail {0}
sdkroot: macosx11.3

- spec: cp311-macosx_arm64
deployment_target: '11.0'
runs_on: [self-hosted, macOS, arm64]
arch: arm64
run_wrapper: arch -arm64 bash --noprofile --norc -eo pipefail {0}
sdkroot: macosx11.3

steps:
- name: Checkout PyYAML
uses: actions/checkout@v2
Expand Down Expand Up @@ -291,9 +302,9 @@ jobs:
strategy:
matrix:
include:
- platform: windows-2016
- platform: windows-2019
arch: x64
- platform: windows-2016
- platform: windows-2019
arch: win32
steps:
- name: Get cached libyaml state
Expand Down Expand Up @@ -321,7 +332,7 @@ jobs:
mkdir libyaml/build
pushd libyaml/build
cmake.exe -G "Visual Studio 15 2017" -A ${{ matrix.arch }} -DYAML_STATIC_LIB_NAME=yaml ..
cmake.exe -G "Visual Studio 16 2019" -A ${{ matrix.arch }} -DYAML_STATIC_LIB_NAME=yaml ..
cmake.exe --build . --config Release
popd
Expand All @@ -333,46 +344,54 @@ jobs:
strategy:
matrix:
include:
- platform: windows-2016
- platform: windows-2019
build_arch: x64
python_arch: x64
spec: 3.6
- platform: windows-2016
- platform: windows-2019
build_arch: x64
python_arch: x64
spec: 3.7
- platform: windows-2016
- platform: windows-2019
build_arch: x64
python_arch: x64
spec: 3.8
- platform: windows-2016
- platform: windows-2019
build_arch: x64
python_arch: x64
spec: 3.9
- platform: windows-2016
- platform: windows-2019
build_arch: x64
python_arch: x64
spec: '3.10'
- platform: windows-2016
- platform: windows-2019
build_arch: x64
python_arch: x64
spec: '3.11.0-rc.2'
- platform: windows-2019
build_arch: win32
python_arch: x86
spec: 3.6
- platform: windows-2016
- platform: windows-2019
build_arch: win32
python_arch: x86
spec: 3.7
- platform: windows-2016
- platform: windows-2019
build_arch: win32
python_arch: x86
spec: 3.8
- platform: windows-2016
- platform: windows-2019
build_arch: win32
python_arch: x86
spec: 3.9
- platform: windows-2016
- platform: windows-2019
build_arch: win32
python_arch: x86
spec: '3.10'
- platform: windows-2019
build_arch: win32
python_arch: x86
spec: '3.11.0-rc.2'
steps:
# autocrlf screws up tests under Windows
- name: Set git to use LF
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries :: Python Modules",
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = pypy3,py36,py37,py38,py39,py310
envlist = pypy3,py36,py37,py38,py39,py310,py311

[testenv]
deps =
Expand Down

0 comments on commit 957ae4d

Please sign in to comment.