Skip to content
Open
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
26 changes: 22 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,20 @@ jobs:
path: ./dist/tornado-*.tar.gz

build_wheels:
name: Build wheels on ${{ matrix.os }}
name: Build wheels on ${{ matrix.os }}${{ matrix.name_suffix || '' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2025, windows-11-arm, macos-15]
include:
- os: ubuntu-24.04
- os: ubuntu-24.04-arm
- os: ubuntu-24.04
cibw_archs: "riscv64"
name_suffix: "-riscv64"
- os: windows-2025
- os: windows-11-arm
- os: macos-15

steps:
- uses: actions/checkout@v4
Expand All @@ -66,8 +74,18 @@ jobs:
with:
python-version: ${{ env.python-version }}

- name: Set up QEMU
if: matrix.cibw_archs == 'riscv64'
uses: docker/setup-qemu-action@v3
with:
platforms: riscv64

- name: Build wheels
uses: pypa/[email protected]
uses: pypa/[email protected]
env:
CIBW_ARCHS: ${{ matrix.cibw_archs || 'auto' }}
# Increase timeouts for RISC-V due to QEMU emulation slowness
CIBW_ENVIRONMENT: ${{ matrix.cibw_archs == 'riscv64' && 'ASYNC_TEST_TIMEOUT=30' || '' }}

- name: Audit ABI3 compliance
# This may be moved into cibuildwheel itself in the future. See
Expand All @@ -76,7 +94,7 @@ jobs:

- uses: actions/upload-artifact@v4
with:
name: artifacts-${{ matrix.os }}
name: artifacts-${{ matrix.os }}${{ matrix.name_suffix || '' }}
path: ./wheelhouse/*.whl

upload_pypi_test:
Expand Down
2 changes: 2 additions & 0 deletions tornado/test/httputil_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import datetime
import logging
import pickle
import platform
import time
import urllib.parse
import unittest
Expand Down Expand Up @@ -648,6 +649,7 @@ def test_unquote(self):
c = parse_cookie(encoded)
self.assertEqual(c["a"], decoded)

@unittest.skipIf(platform.machine() == "riscv64", "Performance test unreliable under QEMU emulation")
def test_unquote_large(self):
# Adapted from
# https://github.com/python/cpython/blob/dc7a2b6522ec7af41282bc34f405bee9b306d611/Lib/test/test_http_cookies.py#L87
Expand Down
3 changes: 3 additions & 0 deletions tornado/test/simple_httpclient_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
import errno
import logging
import os
import platform
import re
import socket
import ssl
import sys
import typing # noqa: F401
import unittest

from tornado.escape import to_unicode, utf8
from tornado import gen, version
Expand Down Expand Up @@ -315,6 +317,7 @@ async def resolve(self, *args, **kwargs):
cleanup_event.set()
yield gen.sleep(0.2)

@unittest.skipIf(platform.machine() == "riscv64", "Test has race conditions under QEMU emulation")
def test_request_timeout(self):
timeout = 0.1
if os.name == "nt":
Expand Down