Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Python 3.11 and PyPy3.9 #564

Merged
merged 5 commits into from
Sep 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.10"]
os: [ubuntu-20.04]
os: [ubuntu-22.04]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
Expand Down
37 changes: 19 additions & 18 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,19 @@ jobs:
os: [windows-latest, macOS-latest, ubuntu-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: git fetch --prune --unshallow

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "3.x"
cache: pip
cache-dependency-path: ".github/workflows/deploy.yml"

- name: Install dependencies
run: |
python -m pip install cibuildwheel==2.3.0
python -m pip install cibuildwheel==2.10.0
python -m pip install -U twine

- name: Build wheels
Expand All @@ -47,14 +48,12 @@ jobs:
CIBW_ARCHS_MACOS: "x86_64 arm64"
# Build only on Linux architectures that don't need qemu emulation.
CIBW_ARCHS_LINUX: "x86_64 i686"
# Don't build with prerelease Python versions.
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.7,<3.11"
# Run the test suite after each build.
CIBW_TEST_REQUIRES: "pytest"
CIBW_TEST_COMMAND: pytest {package}/tests

- name: Upload as build artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist/*.whl
Expand All @@ -81,53 +80,55 @@ jobs:
strategy:
fail-fast: false
matrix:
architecture: ["aarch64"]
python-version:
- pp37
- pp38
- pp39
- cp37
- cp38
- cp39
- cp310
- cp311

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: git fetch --prune --unshallow

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "3.x"
cache: pip
cache-dependency-path: ".github/workflows/deploy.yml"

- name: Install dependencies
run: |
python -m pip install cibuildwheel==2.3.0
python -m pip install cibuildwheel==2.10.0
python -m pip install -U twine

# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2

# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: Build wheels
run: python -m cibuildwheel --output-dir dist
# Options are supplied via environment variables:
env:
# Build only the currently selected Linux architecture (so we can
# parallelise for speed).
CIBW_ARCHS_LINUX: "${{ matrix.architecture }}"
CIBW_ARCHS_LINUX: "aarch64"
# Likewise, select only one Python version per job to speed this up.
CIBW_BUILD: "${{ matrix.python-version }}-*"
# Run the test suite after each build.
CIBW_TEST_REQUIRES: "pytest"
CIBW_TEST_COMMAND: pytest {package}/tests

- name: Upload as build artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist/*.whl
Expand All @@ -150,18 +151,18 @@ jobs:
twine upload --repository-url https://test.pypi.org/legacy/ --skip-existing dist/*.whl

build-sdist:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
needs: ['build-native-wheels', 'build-QEMU-emulated-wheels']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: |
git fetch --prune --unshallow

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.x"
cache: pip
cache-dependency-path: "setup.py"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: micnncim/action-label-syncer@v1
with:
prune: false
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on: [push, pull_request, workflow_dispatch]

jobs:
lint:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v3
- uses: pre-commit/action@v2.0.3
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- uses: pre-commit/action@v3.0.0
10 changes: 6 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ jobs:
- { python-version: "pypy-3.8", os: macos-latest }
- { python-version: "3.10", os: windows-latest }
- { python-version: "3.10", os: macos-latest }
- { python-version: "3.11-dev", os: windows-latest }
- { python-version: "3.11-dev", os: macos-latest }

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
Expand All @@ -48,7 +50,7 @@ jobs:
python -m pytest

- name: Test with coverage
if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.python-version == '3.9' }}
if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.python-version == '3.10' }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
Expand All @@ -66,7 +68,7 @@ jobs:
matrix:
architecture: [ppc64le, s390x, aarch64, arm/v6, 386]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: git fetch --prune --unshallow

# https://github.com/docker/setup-qemu-action
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ classifiers =
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
download_url = https://github.com/ultrajson/ultrajson
project_urls =
Source=https://github.com/ultrajson/ultrajson
Expand Down