From 623ced86aa7c66b63d93cc24cffd2a0be47676e4 Mon Sep 17 00:00:00 2001 From: Iisakki Rotko Date: Tue, 1 Oct 2024 10:31:55 +0200 Subject: [PATCH] Build wheels for Python 3.13 --- .github/workflows/build_wheels.yml | 6 ++++-- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 777a0ac..ed904fa 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -16,7 +16,7 @@ jobs: # cibuildwheel builds linux wheels inside a manylinux container # it also takes care of procuring the correct python version for us os: [ubuntu-latest, windows-latest, macos-13] - python-version: [38, 39, 310, 311, 312] + python-version: [38, 39, 310, 311, 312, 313] steps: - uses: actions/checkout@v4 @@ -24,6 +24,7 @@ jobs: - uses: pypa/cibuildwheel@v2.18.0 env: CIBW_BUILD: "cp${{ matrix.python-version}}-*" + CIBW_PRERELEASE_PYTHONS: True - uses: actions/upload-artifact@v3 with: @@ -37,7 +38,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python-version: [38, 39, 310, 311, 312] + python-version: [38, 39, 310, 311, 312, 313] steps: - uses: actions/checkout@v4 @@ -55,6 +56,7 @@ jobs: CIBW_BUILD_VERBOSITY: 3 # https://github.com/rust-lang/cargo/issues/10583 CIBW_ENVIRONMENT_LINUX: PATH="$PATH:$HOME/.cargo/bin" CARGO_NET_GIT_FETCH_WITH_CLI=true + CIBW_PRERELEASE_PYTHONS: True - uses: actions/upload-artifact@v3 with: name: dist diff --git a/Cargo.toml b/Cargo.toml index 4efb156..e94e6b8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ name = "_tiktoken" crate-type = ["cdylib"] [dependencies] -pyo3 = { version = "0.20.0", features = ["extension-module"] } +pyo3 = { version = "0.22.0", features = ["extension-module", "gil-refs"] } # tiktoken dependencies fancy-regex = "0.11.0"