Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
build-sdist:
name: Source distribution
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@v7
with:
Expand Down Expand Up @@ -48,15 +48,9 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-26.04, ubuntu-26.04-arm, windows-2025, windows-11-arm, macos-26]

steps:
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v4
with:
platforms: arm64

- uses: actions/checkout@v7
with:
submodules: recursive
Expand All @@ -65,15 +59,15 @@ jobs:

- uses: actions/upload-artifact@v7
with:
name: wheels-${{ runner.os }}
name: wheels-${{ matrix.os }}
path: wheelhouse/*.whl
if-no-files-found: error

publish:
name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags/v')
needs: [build-sdist, build-wheels]
runs-on: ubuntu-latest
runs-on: ubuntu-26.04
environment:
name: pypi
url: https://pypi.org/project/cchardet/
Expand Down
29 changes: 23 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ concurrency:
jobs:
native-safety:
name: Native ASan / UBSan
runs-on: ubuntu-latest
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@v7
with:
Expand All @@ -40,7 +40,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-26.04, ubuntu-26.04-arm, windows-2025, windows-11-arm, macos-26]
python-version: ["3.11", "3.12", "3.13", "3.14", "3.14t", "3.15", "3.15t"]

steps:
Expand All @@ -51,25 +51,42 @@ jobs:
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
with:
version: latest-known
python-version: ${{ matrix.python-version }}
# On Windows ARM64, uv picks an emulated x86-64 interpreter unless the
# request names the architecture.
python-version: ${{ matrix.os == 'windows-11-arm' && format('cpython-{0}-windows-aarch64-none', matrix.python-version) || matrix.python-version }}

- name: Install locked dependencies
run: uv sync --locked

- name: Check interpreter architecture
shell: bash
run: |
uv run --no-sync python - <<'EOF'
import os
import platform
import sysconfig

plat = sysconfig.get_platform()
# A universal2 build covers both macOS architectures, so check the running process.
arch = platform.machine() if plat.endswith("universal2") else plat
print(plat, arch)
assert ("arm64" in arch or "aarch64" in arch) == (os.environ["RUNNER_ARCH"] == "ARM64")
EOF

- name: Lint
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.14'
if: matrix.os == 'ubuntu-26.04' && matrix.python-version == '3.14'
run: uv run ruff check

- name: Type check
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.14'
if: matrix.os == 'ubuntu-26.04' && matrix.python-version == '3.14'
run: uv run mypy

- name: Test
run: uv run pytest

package:
name: Verify distributions
runs-on: ubuntu-latest
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@v7
with:
Expand Down
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

- Support Python 3.15, including the free-threaded CPython 3.15 build, with
tests and wheels for Linux, macOS, and Windows
- Publish Windows ARM64 wheels, and build Linux aarch64 wheels on native arm64
runners instead of under QEMU emulation
- Test every supported Python version on arm64 Linux and Windows in addition to
x86-64

## 2.3.0 (2026-09-16)

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ cChardet is a high-speed universal character encoding detector built on the
## Python support

cChardet supports CPython 3.11 through 3.15, including the free-threaded
CPython 3.14 and 3.15 builds. Each version is tested on Linux, macOS, and
Windows.
CPython 3.14 and 3.15 builds. Each version is tested on Linux and Windows on
both x86-64 and arm64, and on macOS on Apple silicon.

## Development

Expand Down Expand Up @@ -239,6 +239,6 @@ See **COPYING** file.

## Support Platforms

- Windows x86, x86_64
- Windows x86, x86_64, ARM64
- Linux x86_64, aarch64
- macOS x86_64, arm64
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,5 @@ archs = "auto"
test-command = "python tools/wheel_smoke.py"
test-sources = ["tools/wheel_smoke.py"]

[tool.cibuildwheel.linux]
archs = ["auto", "aarch64"]

[tool.cibuildwheel.macos]
archs = ["x86_64", "arm64"]
Loading