From 7400379974e5d1f3ebe62d9087ee13f9586b1c11 Mon Sep 17 00:00:00 2001 From: Tom Wenzheng Tang Date: Fri, 6 Feb 2026 06:12:03 +0800 Subject: [PATCH 01/10] disable `aiodns`, fix futex deadlocks The locks created by `pycares`'s lingering threads would conflict with the locks created during JS JIT/GC in a rare condition. --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 39f4ae29..78edc0ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ include = [ [tool.poetry.dependencies] python = "^3.8" pyreadline3 = { version = "^3.4.1", platform = "win32" } -aiohttp = { version = "^3.9.5", extras = ["speedups"] } +aiohttp = { version = "^3.9.5" } pminit = { version = ">=0.4.0", allow-prereleases = true } @@ -83,4 +83,4 @@ ignore="E111,E114,E121" # allow 2-space indents verbose=true indent-size=2 aggressive=3 -exit-code=true \ No newline at end of file +exit-code=true From b7683ae640dfcda24344f2a510812217c3c9e47d Mon Sep 17 00:00:00 2001 From: Tom Tang Date: Mon, 9 Feb 2026 16:57:57 +0000 Subject: [PATCH 02/10] chore: upgrade rust to v1.82 --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 2001a374..5d01bd7a 100755 --- a/setup.sh +++ b/setup.sh @@ -27,7 +27,7 @@ else fi # Install rust compiler echo "Installing rust compiler" -curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.76 +curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.82 CARGO_BIN="$HOME/.cargo/bin/cargo" # also works for Windows. On Windows this equals to %USERPROFILE%\.cargo\bin\cargo $CARGO_BIN install cbindgen # Setup Poetry From 0ac66010c0c07b868c5173f078ee9223f572495d Mon Sep 17 00:00:00 2001 From: Tom Tang Date: Mon, 9 Feb 2026 17:01:26 +0000 Subject: [PATCH 03/10] CI: `macos-13` runner is retired, use `macos-15-intel` runner instead for x86_64 macOS build --- .github/workflows/test-and-publish.yaml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test-and-publish.yaml b/.github/workflows/test-and-publish.yaml index 44a02ba7..6ba4d15e 100644 --- a/.github/workflows/test-and-publish.yaml +++ b/.github/workflows/test-and-publish.yaml @@ -16,7 +16,7 @@ on: options: - '' - 'ubuntu-22.04' - - 'macos-13' + - 'macos-15-intel' - 'macos-14' - 'windows-2022' debug_enabled_python: @@ -67,8 +67,8 @@ jobs: strategy: fail-fast: false matrix: - # Use Ubuntu 22.04 / macOS 13 x86_64 / macOS 14 arm64 + Python 3.10 to build SpiderMonkey - os: [ 'ubuntu-22.04', 'macos-13', 'macos-14', 'ubuntu-22.04-arm' ] # macOS 14 runner exclusively runs on M1 hardwares + # Use Ubuntu 22.04 / macOS 15 x86_64 / macOS 14 arm64 + Python 3.10 to build SpiderMonkey + os: [ 'ubuntu-22.04', 'macos-15-intel', 'macos-14', 'ubuntu-22.04-arm' ] # macOS 14 runner exclusively runs on M1 hardwares # see https://github.blog/changelog/2024-01-30-github-actions-macos-14-sonoma-is-now-available python_version: [ '3.10' ] runs-on: ${{ matrix.os }} @@ -124,10 +124,6 @@ jobs: if: ${{ !startsWith(matrix.os, 'ubuntu') && steps.cache-spidermonkey.outputs.cache-hit != 'true' }} with: python-version: ${{ matrix.python_version }} - - name: Setup XCode - if: ${{ matrix.os == 'macos-13' && steps.cache-spidermonkey.outputs.cache-hit != 'true' }} - # SpiderMonkey requires XCode SDK version at least 13.3 - run: sudo xcode-select -switch /Applications/Xcode_14.3.app - name: Build spidermonkey if: ${{ steps.cache-spidermonkey.outputs.cache-hit != 'true' }} run: ./setup.sh @@ -181,7 +177,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ 'ubuntu-22.04', 'macos-13', 'macos-14', 'windows-2022', 'ubuntu-22.04-arm' ] + os: [ 'ubuntu-22.04', 'macos-15-intel', 'macos-14', 'windows-2022', 'ubuntu-22.04-arm' ] python_version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14-dev' ] runs-on: ${{ matrix.os }} container: ${{ (startsWith(matrix.os, 'ubuntu') && 'ubuntu:20.04') || null }} @@ -293,7 +289,7 @@ jobs: BUILD_TYPE=${WORKFLOW_BUILD_TYPE:-"Debug"} poetry build --format=wheel ls -lah ./dist/ - name: Make the wheels we build also support lower versions of macOS - if: ${{ matrix.os == 'macos-13' || matrix.os == 'macos-14' }} + if: ${{ matrix.os == 'macos-15-intel' || matrix.os == 'macos-14' }} # Change the platform tag part of the wheel filename to `macosx_11_0_xxx` (means to support macOS 11.0 and above) # See https://packaging.python.org/en/latest/specifications/binary-distribution-format/#file-format # A wheel package file will only be selected by pip to install if the platform tag satisfies, regardless of whether the binary compatibility actually is. From 9a013226e23e8c2e726c387a0870eee15a5a09b8 Mon Sep 17 00:00:00 2001 From: Ryan Saweczko Date: Tue, 10 Feb 2026 15:27:38 -0500 Subject: [PATCH 04/10] CI: update rust to 1.85 for stable edition2024 --- setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 5d01bd7a..3096525f 100755 --- a/setup.sh +++ b/setup.sh @@ -27,7 +27,7 @@ else fi # Install rust compiler echo "Installing rust compiler" -curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.82 +curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.85 CARGO_BIN="$HOME/.cargo/bin/cargo" # also works for Windows. On Windows this equals to %USERPROFILE%\.cargo\bin\cargo $CARGO_BIN install cbindgen # Setup Poetry @@ -127,4 +127,4 @@ if test -f .git/hooks/pre-commit; then fi cd ../.. echo "Done building uncrustify" -fi \ No newline at end of file +fi From 01aa5cb65a7b7cbaba22dc82a5cedf7486310b3d Mon Sep 17 00:00:00 2001 From: Tom Tang Date: Wed, 1 Apr 2026 15:56:51 +0000 Subject: [PATCH 05/10] fix(CI): `-ld64` linker flag has been removed from Xcode 26 --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 3096525f..a882422b 100755 --- a/setup.sh +++ b/setup.sh @@ -63,7 +63,7 @@ sed -i'' -e 's/return JS::GetWeakRefsEnabled() == JS::WeakRefSpecifier::Disabled sed -i'' -e 's/return !IsIteratorHelpersEnabled()/return false/' ./js/src/vm/GlobalObject.cpp # forcibly enable iterator helpers sed -i'' -e '/MOZ_CRASH_UNSAFE_PRINTF/,/__PRETTY_FUNCTION__);/d' ./mfbt/LinkedList.h # would crash in Debug Build: in `~LinkedList()` it should have removed all this list's elements before the list's destruction sed -i'' -e '/MOZ_ASSERT(stackRootPtr == nullptr);/d' ./js/src/vm/JSContext.cpp # would assert false in Debug Build since we extensively use `new JS::Rooted` -sed -i'' -e 's/"-fuse-ld=ld"/"-ld64" if c_compiler.version > "14.0.0" else "-fuse-ld=ld"/' ./build/moz.configure/toolchain.configure # XCode 15 changed the linker behaviour. See https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Linking +sed -i'' -e 's/"-fuse-ld=ld"/"-Wl,-ld_classic" if c_compiler.version > "14.0.0" else "-fuse-ld=ld"/' ./build/moz.configure/toolchain.configure # XCode 15 changed the linker behaviour. See https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Linking sed -i'' -e 's/defined(XP_WIN)/defined(_WIN32)/' ./mozglue/baseprofiler/public/BaseProfilerUtils.h # this header file is introduced to js/Debug.h in https://phabricator.services.mozilla.com/D221102, but it would be compiled without XP_WIN in this building configuration cd js/src From efdeb43cb88b018015115fe59ed174ec903e5d5d Mon Sep 17 00:00:00 2001 From: Tom Tang Date: Tue, 7 Apr 2026 16:26:26 +0000 Subject: [PATCH 06/10] fix(CI): switch to an older Xcode version --- .github/workflows/test-and-publish.yaml | 4 ++++ setup.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-and-publish.yaml b/.github/workflows/test-and-publish.yaml index 6ba4d15e..29523de2 100644 --- a/.github/workflows/test-and-publish.yaml +++ b/.github/workflows/test-and-publish.yaml @@ -124,6 +124,10 @@ jobs: if: ${{ !startsWith(matrix.os, 'ubuntu') && steps.cache-spidermonkey.outputs.cache-hit != 'true' }} with: python-version: ${{ matrix.python_version }} + - name: Setup XCode + if: ${{ matrix.os == 'macos-15-intel' && steps.cache-spidermonkey.outputs.cache-hit != 'true' }} + # Xcode 16.x removed the old linker behaviour (-ld64 or -ld_classic) that SpiderMonkey relies on, so we need to switch to an older version + run: sudo xcode-select -switch /Applications/Xcode_16.0.app - name: Build spidermonkey if: ${{ steps.cache-spidermonkey.outputs.cache-hit != 'true' }} run: ./setup.sh diff --git a/setup.sh b/setup.sh index a882422b..3096525f 100755 --- a/setup.sh +++ b/setup.sh @@ -63,7 +63,7 @@ sed -i'' -e 's/return JS::GetWeakRefsEnabled() == JS::WeakRefSpecifier::Disabled sed -i'' -e 's/return !IsIteratorHelpersEnabled()/return false/' ./js/src/vm/GlobalObject.cpp # forcibly enable iterator helpers sed -i'' -e '/MOZ_CRASH_UNSAFE_PRINTF/,/__PRETTY_FUNCTION__);/d' ./mfbt/LinkedList.h # would crash in Debug Build: in `~LinkedList()` it should have removed all this list's elements before the list's destruction sed -i'' -e '/MOZ_ASSERT(stackRootPtr == nullptr);/d' ./js/src/vm/JSContext.cpp # would assert false in Debug Build since we extensively use `new JS::Rooted` -sed -i'' -e 's/"-fuse-ld=ld"/"-Wl,-ld_classic" if c_compiler.version > "14.0.0" else "-fuse-ld=ld"/' ./build/moz.configure/toolchain.configure # XCode 15 changed the linker behaviour. See https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Linking +sed -i'' -e 's/"-fuse-ld=ld"/"-ld64" if c_compiler.version > "14.0.0" else "-fuse-ld=ld"/' ./build/moz.configure/toolchain.configure # XCode 15 changed the linker behaviour. See https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Linking sed -i'' -e 's/defined(XP_WIN)/defined(_WIN32)/' ./mozglue/baseprofiler/public/BaseProfilerUtils.h # this header file is introduced to js/Debug.h in https://phabricator.services.mozilla.com/D221102, but it would be compiled without XP_WIN in this building configuration cd js/src From a1543f18e9b5309dae7162fa9fef2bc49948d920 Mon Sep 17 00:00:00 2001 From: Tom Tang Date: Tue, 7 Apr 2026 18:06:45 +0000 Subject: [PATCH 07/10] test windows --- setup.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.sh b/setup.sh index 3096525f..deebf5d6 100755 --- a/setup.sh +++ b/setup.sh @@ -2,6 +2,9 @@ set -euo pipefail IFS=$'\n\t' +echo "$ clang --print-target-triple" +clang --print-target-triple + # Get number of CPU cores CPUS=$(getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null || echo 1) From 9e73e305d0dbf199efca960c6791e8e10889021c Mon Sep 17 00:00:00 2001 From: Tom Tang Date: Tue, 7 Apr 2026 18:18:47 +0000 Subject: [PATCH 08/10] fix(CI): set the correct rust host triple to install (should be `x86_64-pc-windows-msvc`) --- setup.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/setup.sh b/setup.sh index deebf5d6..bf28c6b2 100755 --- a/setup.sh +++ b/setup.sh @@ -2,9 +2,6 @@ set -euo pipefail IFS=$'\n\t' -echo "$ clang --print-target-triple" -clang --print-target-triple - # Get number of CPU cores CPUS=$(getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null || echo 1) @@ -30,7 +27,7 @@ else fi # Install rust compiler echo "Installing rust compiler" -curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.85 +curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh -s -- -y --default-host "$(clang --print-target-triple)" --default-toolchain 1.85 CARGO_BIN="$HOME/.cargo/bin/cargo" # also works for Windows. On Windows this equals to %USERPROFILE%\.cargo\bin\cargo $CARGO_BIN install cbindgen # Setup Poetry From 6b2bf71ae22a46bfb256f365339c1f8d91a27411 Mon Sep 17 00:00:00 2001 From: Tom Tang Date: Tue, 7 Apr 2026 18:35:10 +0000 Subject: [PATCH 09/10] What? Who wrote the latest version of the rustup script? In its `get_architecture()` function, it's impossible to get to `-windows-msvc` error: error: the argument '--default-host ' cannot be used multiple times --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index bf28c6b2..c4033863 100755 --- a/setup.sh +++ b/setup.sh @@ -27,7 +27,7 @@ else fi # Install rust compiler echo "Installing rust compiler" -curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh -s -- -y --default-host "$(clang --print-target-triple)" --default-toolchain 1.85 +curl --proto '=https' --tlsv1.2 https://raw.githubusercontent.com/rust-lang/rustup/refs/tags/1.28.2/rustup-init.sh -sSf | sh -s -- -y --default-host "$(clang --print-target-triple)" --default-toolchain 1.85 CARGO_BIN="$HOME/.cargo/bin/cargo" # also works for Windows. On Windows this equals to %USERPROFILE%\.cargo\bin\cargo $CARGO_BIN install cbindgen # Setup Poetry From a6f51459a982b052fd7856e8ad5784bb9c32df35 Mon Sep 17 00:00:00 2001 From: Tom Tang Date: Tue, 7 Apr 2026 19:03:48 +0000 Subject: [PATCH 10/10] CI: Use the release version of Python 3.14 --- .github/workflows/test-and-publish.yaml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-and-publish.yaml b/.github/workflows/test-and-publish.yaml index 29523de2..ad562623 100644 --- a/.github/workflows/test-and-publish.yaml +++ b/.github/workflows/test-and-publish.yaml @@ -31,7 +31,7 @@ on: - '3.11' - '3.12' - '3.13' - - '3.14-dev' + - '3.14' build_type: type: choice description: 'Choose the build type to use' @@ -182,7 +182,7 @@ jobs: fail-fast: false matrix: os: [ 'ubuntu-22.04', 'macos-15-intel', 'macos-14', 'windows-2022', 'ubuntu-22.04-arm' ] - python_version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14-dev' ] + python_version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14' ] runs-on: ${{ matrix.os }} container: ${{ (startsWith(matrix.os, 'ubuntu') && 'ubuntu:20.04') || null }} steps: @@ -220,10 +220,6 @@ jobs: echo "$HOME/.pyenv/shims" >> $GITHUB_PATH echo "PYENV_ROOT=$HOME/.pyenv" >> $GITHUB_ENV export PATH="$HOME/.pyenv/bin:$PATH" - if [ "$PYTHON_VERSION" = "3.14-dev" ]; then - # Replacing 3.14-dev with a pinned prerelease version for fast installation - PYTHON_VERSION="3.14.0rc3" - fi pyenv install $PYTHON_VERSION pyenv global $PYTHON_VERSION env: