From 51fca655b96a1c6ba6e3c82a4c0a77df69b008ca Mon Sep 17 00:00:00 2001 From: kampersanda Date: Sat, 23 May 2026 02:13:09 +0900 Subject: [PATCH 01/12] Add .gitignore to exclude target/ and Cargo.lock --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2c96eb1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +target/ +Cargo.lock From d5df88478bc735962d0aff4103e7f6b5e2888dfc Mon Sep 17 00:00:00 2001 From: kampersanda Date: Sat, 23 May 2026 02:31:34 +0900 Subject: [PATCH 02/12] Update CI configuration and dependencies for Python support --- .github/workflows/CI.yml | 53 +++++++++++++++++++--------------------- Cargo.toml | 2 +- pyproject.toml | 4 ++- 3 files changed, 29 insertions(+), 30 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 21ff429..358f8e1 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -15,11 +15,11 @@ jobs: strategy: matrix: runs-on: [ ubuntu-latest, windows-latest, macos-latest ] - python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] + python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14' ] runs-on: ${{ matrix.runs-on }} steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - uses: dtolnay/rust-toolchain@stable @@ -44,10 +44,10 @@ jobs: if: "startsWith(github.ref, 'refs/tags/')" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 with: - python-version: '3.12' + python-version: '3.14' - uses: dtolnay/rust-toolchain@stable - name: Build package uses: PyO3/maturin-action@v1 @@ -56,7 +56,7 @@ jobs: - name: Upload wheels uses: actions/upload-artifact@v4 with: - name: wheels-${{ matrix.runs-on }} + name: sdist path: target/wheels pack-linux: @@ -65,24 +65,23 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] target: [ x86_64, i686 ] steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 with: - python-version: ${{ matrix.python-version }} + python-version: '3.8' - uses: dtolnay/rust-toolchain@stable - name: Build package uses: PyO3/maturin-action@v1 with: target: ${{ matrix.target }} manylinux: auto - args: -i ${{ matrix.python-version }} --release + args: -i 3.8 --release - name: Upload wheels uses: actions/upload-artifact@v4 with: - name: wheels-${{ matrix.runs-on }} + name: wheels-linux-${{ matrix.target }} path: target/wheels pack-windows: @@ -91,13 +90,12 @@ jobs: runs-on: windows-latest strategy: matrix: - python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] target: [ x64, x86 ] steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 with: - python-version: ${{ matrix.python-version }} + python-version: '3.8' architecture: ${{ matrix.target }} - uses: dtolnay/rust-toolchain@stable - name: Build package @@ -105,36 +103,32 @@ jobs: with: target: ${{ matrix.target }} manylinux: auto - args: -i ${{ matrix.python-version }} --release + args: -i 3.8 --release - name: Upload wheels uses: actions/upload-artifact@v4 with: - name: wheels-${{ matrix.runs-on }} + name: wheels-windows-${{ matrix.target }} path: target/wheels pack-macos: needs: [ test ] if: "startsWith(github.ref, 'refs/tags/')" runs-on: macos-latest - strategy: - matrix: - python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 with: - python-version: ${{ matrix.python-version }} + python-version: '3.8' - uses: dtolnay/rust-toolchain@stable - name: Build package uses: PyO3/maturin-action@v1 with: - target: ${{ matrix.target }} manylinux: auto - args: -i ${{ matrix.python-version }} --release --universal2 + args: -i 3.8 --release --universal2 - name: Upload wheels uses: actions/upload-artifact@v4 with: - name: wheels-${{ matrix.runs-on }} + name: wheels-macos-universal2 path: target/wheels release: @@ -143,6 +137,9 @@ jobs: needs: [ pack-sdist, pack-linux, pack-windows, pack-macos ] runs-on: ubuntu-latest steps: + - uses: actions/download-artifact@v4 + with: + name: sdist - uses: actions/download-artifact@v4 with: pattern: wheels-* diff --git a/Cargo.toml b/Cargo.toml index 6f51ecf..d09669f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,5 +10,5 @@ crate-type = ["cdylib"] [dependencies] hashbrown = "0.13.2" # MIT or Apache-2.0 ouroboros = "0.15.6" # MIT or Apache-2.0 -pyo3 = { version = "0.18.2", features = ["extension-module"] } # Apache-2.0 +pyo3 = { version = "0.18.2", features = ["extension-module", "abi3-py38"] } # Apache-2.0 vibrato_rust = { package = "vibrato", version = "0.5.0", default-features = false } # MIT or Apache-2.0 diff --git a/pyproject.toml b/pyproject.toml index 7bd8908..a063012 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,8 @@ [build-system] -requires = ["maturin>=0.14,<0.15"] +requires = ["maturin>=1,<2"] build-backend = "maturin" [project] name = "vibrato" +dynamic = ["version"] +requires-python = ">=3.8" From 46c08bfd785be2834cb1063ead8fcfa674ee6c72 Mon Sep 17 00:00:00 2001 From: kampersanda Date: Sat, 23 May 2026 02:37:56 +0900 Subject: [PATCH 03/12] Bump version number to 0.5.2 in README and examples --- README.md | 2 +- docs/source/examples.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dbd1f2a..34f829f 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Check the version number as shown below to use compatible models: ```python >>> import vibrato >>> vibrato.VIBRATO_VERSION -'0.5.1' +'0.5.2' ``` diff --git a/docs/source/examples.rst b/docs/source/examples.rst index 5cff841..bfceaae 100644 --- a/docs/source/examples.rst +++ b/docs/source/examples.rst @@ -11,7 +11,7 @@ You can check the version number as shown below to use compatible models: >>> import vibrato >>> vibrato.VIBRATO_VERSION - '0.5.1' + '0.5.2' Examples: From 65a602f7f59725156f0194b11fcbf5d457093b33 Mon Sep 17 00:00:00 2001 From: kampersanda Date: Sat, 23 May 2026 02:50:19 +0900 Subject: [PATCH 04/12] Add iterator support to TokenIterator with __iter__ method --- src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index fbfd459..bca4c96 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -91,6 +91,10 @@ struct TokenIterator { #[pymethods] impl TokenIterator { + fn __iter__(self_: PyRef) -> Py { + self_.into() + } + fn __next__(&mut self, py: Python) -> Option { if self.index < self.len { let index = self.index; From 3f94c62320f01b3458d67ffb17e1842c1ded8dd7 Mon Sep 17 00:00:00 2001 From: kampersanda Date: Sun, 24 May 2026 01:26:11 +0900 Subject: [PATCH 05/12] Remove Python 3.14 setup step from CI workflow for Ubuntu --- .github/workflows/CI.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 358f8e1..5ef5e6e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -45,9 +45,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - - uses: actions/setup-python@v6 - with: - python-version: '3.14' - uses: dtolnay/rust-toolchain@stable - name: Build package uses: PyO3/maturin-action@v1 From ea5911810d64ce2c58a6099d1aad2f189799dc8a Mon Sep 17 00:00:00 2001 From: Shunsuke Kanda Date: Sun, 24 May 2026 01:35:24 +0900 Subject: [PATCH 06/12] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5ef5e6e..47e1073 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -50,7 +50,7 @@ jobs: uses: PyO3/maturin-action@v1 with: command: sdist - - name: Upload wheels + - name: Upload sdist uses: actions/upload-artifact@v4 with: name: sdist From 659aa03bbf7d2914d285da6a2299e1ed67a6da30 Mon Sep 17 00:00:00 2001 From: kampersanda Date: Sun, 24 May 2026 19:31:48 +0900 Subject: [PATCH 07/12] Update Python version support to 3.10 in CI and project files --- .github/workflows/CI.yml | 14 +++++++------- Cargo.toml | 2 +- pyproject.toml | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 47e1073..9d58142 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: runs-on: [ ubuntu-latest, windows-latest, macos-latest ] - python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14' ] + python-version: [ '3.10', '3.11', '3.12', '3.13', '3.14' ] runs-on: ${{ matrix.runs-on }} steps: - uses: actions/checkout@v6 @@ -67,14 +67,14 @@ jobs: - uses: actions/checkout@v6 - uses: actions/setup-python@v6 with: - python-version: '3.8' + python-version: '3.10' - uses: dtolnay/rust-toolchain@stable - name: Build package uses: PyO3/maturin-action@v1 with: target: ${{ matrix.target }} manylinux: auto - args: -i 3.8 --release + args: -i 3.10 --release - name: Upload wheels uses: actions/upload-artifact@v4 with: @@ -92,7 +92,7 @@ jobs: - uses: actions/checkout@v6 - uses: actions/setup-python@v6 with: - python-version: '3.8' + python-version: '3.10' architecture: ${{ matrix.target }} - uses: dtolnay/rust-toolchain@stable - name: Build package @@ -100,7 +100,7 @@ jobs: with: target: ${{ matrix.target }} manylinux: auto - args: -i 3.8 --release + args: -i 3.10 --release - name: Upload wheels uses: actions/upload-artifact@v4 with: @@ -115,13 +115,13 @@ jobs: - uses: actions/checkout@v6 - uses: actions/setup-python@v6 with: - python-version: '3.8' + python-version: '3.10' - uses: dtolnay/rust-toolchain@stable - name: Build package uses: PyO3/maturin-action@v1 with: manylinux: auto - args: -i 3.8 --release --universal2 + args: -i 3.10 --release --universal2 - name: Upload wheels uses: actions/upload-artifact@v4 with: diff --git a/Cargo.toml b/Cargo.toml index d09669f..02adff5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,5 +10,5 @@ crate-type = ["cdylib"] [dependencies] hashbrown = "0.13.2" # MIT or Apache-2.0 ouroboros = "0.15.6" # MIT or Apache-2.0 -pyo3 = { version = "0.18.2", features = ["extension-module", "abi3-py38"] } # Apache-2.0 +pyo3 = { version = "0.18.2", features = ["extension-module", "abi3-py310"] } # Apache-2.0 vibrato_rust = { package = "vibrato", version = "0.5.0", default-features = false } # MIT or Apache-2.0 diff --git a/pyproject.toml b/pyproject.toml index a063012..d167149 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,4 +5,4 @@ build-backend = "maturin" [project] name = "vibrato" dynamic = ["version"] -requires-python = ">=3.8" +requires-python = ">=3.10" From 139027f3ae364bd93b99446ad724f66f7a03ea04 Mon Sep 17 00:00:00 2001 From: kampersanda Date: Sun, 24 May 2026 19:42:27 +0900 Subject: [PATCH 08/12] Update release job in CI to set permissions and use updated maturin-action --- .github/workflows/CI.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9d58142..440f2c5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -133,6 +133,9 @@ jobs: if: "startsWith(github.ref, 'refs/tags/')" needs: [ pack-sdist, pack-linux, pack-windows, pack-macos ] runs-on: ubuntu-latest + permissions: + contents: read + id-token: write steps: - uses: actions/download-artifact@v4 with: @@ -142,9 +145,7 @@ jobs: pattern: wheels-* merge-multiple: true - name: Publish to PyPI - uses: messense/maturin-action@v1 - env: - MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} + uses: PyO3/maturin-action@v1 with: command: upload args: --skip-existing * From fbda2a2652a62ebd8dd3ddceee6b5f6d131dfa0f Mon Sep 17 00:00:00 2001 From: kampersanda Date: Sun, 24 May 2026 19:54:33 +0900 Subject: [PATCH 09/12] Update CI workflow to download artifacts and publish using uv --- .github/workflows/CI.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 440f2c5..62162d9 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -140,12 +140,13 @@ jobs: - uses: actions/download-artifact@v4 with: name: sdist + path: dist - uses: actions/download-artifact@v4 with: + path: dist pattern: wheels-* merge-multiple: true + - name: Install uv + uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 - name: Publish to PyPI - uses: PyO3/maturin-action@v1 - with: - command: upload - args: --skip-existing * + run: uv publish --trusted-publishing always From 85f391e2c083f1ef9a11e6f10d6911c5ce5b1734 Mon Sep 17 00:00:00 2001 From: kampersanda Date: Fri, 29 May 2026 18:53:09 +0900 Subject: [PATCH 10/12] Refactor CI workflow to streamline artifact downloading and update publish command for wheels --- .github/workflows/CI.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 62162d9..abfef89 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -139,14 +139,8 @@ jobs: steps: - uses: actions/download-artifact@v4 with: - name: sdist - path: dist - - uses: actions/download-artifact@v4 - with: - path: dist pattern: wheels-* - merge-multiple: true - name: Install uv uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 - name: Publish to PyPI - run: uv publish --trusted-publishing always + run: uv publish --trusted-publishing always wheels-*/* From 824ec80a15b87cc04d8be42378591d33221a9c5f Mon Sep 17 00:00:00 2001 From: kampersanda Date: Sat, 30 May 2026 13:08:30 +0900 Subject: [PATCH 11/12] Update actions/upload-artifact and actions/download-artifact to latest versions in CI workflow --- .github/workflows/CI.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index abfef89..9019451 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -51,7 +51,7 @@ jobs: with: command: sdist - name: Upload sdist - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: sdist path: target/wheels @@ -76,7 +76,7 @@ jobs: manylinux: auto args: -i 3.10 --release - name: Upload wheels - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: wheels-linux-${{ matrix.target }} path: target/wheels @@ -99,10 +99,9 @@ jobs: uses: PyO3/maturin-action@v1 with: target: ${{ matrix.target }} - manylinux: auto args: -i 3.10 --release - name: Upload wheels - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: wheels-windows-${{ matrix.target }} path: target/wheels @@ -120,10 +119,9 @@ jobs: - name: Build package uses: PyO3/maturin-action@v1 with: - manylinux: auto - args: -i 3.10 --release --universal2 + args: -i 3.10 --release --target universal2-apple-darwin - name: Upload wheels - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: wheels-macos-universal2 path: target/wheels @@ -137,7 +135,7 @@ jobs: contents: read id-token: write steps: - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v8 with: pattern: wheels-* - name: Install uv From 2b719bf420a3271fe2f56a354eac80a5c67e8db2 Mon Sep 17 00:00:00 2001 From: kampersanda Date: Sat, 30 May 2026 13:52:52 +0900 Subject: [PATCH 12/12] Update CI workflow to publish source distributions alongside wheels --- .github/workflows/CI.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9019451..8fe7159 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -136,9 +136,7 @@ jobs: id-token: write steps: - uses: actions/download-artifact@v8 - with: - pattern: wheels-* - name: Install uv uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 - name: Publish to PyPI - run: uv publish --trusted-publishing always wheels-*/* + run: uv publish --trusted-publishing always wheels-*/* sdist/*