Skip to content

Commit

Permalink
remove!: requires-python>=3.10に引き上げる (#915)
Browse files Browse the repository at this point in the history
`requires-python`を`>=3.10`に引き上げた上、 #873 の解決を確認する。

Python 3.9, 3.10の機能を使うことは別PRで行う。

Resolves: #873
  • Loading branch information
qryxip authored Jan 3, 2025
1 parent 00d478d commit 5eae9c5
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 91 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,11 @@ jobs:
git fetch private refs/tags/${{ env.PRODUCTION_REPOSITORY_TAG }}
git -c user.name=dummy -c user.email=dummy@dummy.dummy merge FETCH_HEAD
) > /dev/null 2>&1
- name: Set up Python 3.8
- name: Set up Python 3.10
if: matrix.python_whl
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.10"
architecture: ${{ contains(matrix.artifact_name,'x86') && 'x86' || 'x64' }}
- name: set up ${{ matrix.target }}
uses: ./.github/actions/rust-toolchain-from-file
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate_document.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.10"
- name: Setup Java
uses: actions/setup-java@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.10"
- name: Install Poetry
run: |
python -m pip install --upgrade poetry
Expand Down
28 changes: 20 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y shellcheck
- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.10"
- name: Install Pyflakes
run: pip install 'pyflakes>3,<4'
- name: actionlint
Expand All @@ -67,10 +67,10 @@ jobs:
uses: ./.github/actions/rust-toolchain-from-file
with:
components: clippy,rustfmt
- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.10"
- uses: Swatinem/rust-cache@v2
- run: cargo clippy -v --tests -- -D clippy::all -D warnings --no-deps
- run: cargo clippy -v -- -D clippy::all -D warnings --no-deps
Expand Down Expand Up @@ -125,10 +125,10 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.10"
- name: Set up Rust
uses: ./.github/actions/rust-toolchain-from-file
- uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -272,10 +272,10 @@ jobs:
working-directory: ./crates/voicevox_core_python_api
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.10"
- name: Set up Rust
uses: ./.github/actions/rust-toolchain-from-file
- run: |
Expand All @@ -296,6 +296,18 @@ jobs:
for file in ../../example/python/run{,-asyncio}.py; do
poetry run python "$file" ../test_util/data/model/sample.vvm --dict-dir ../test_util/data/open_jtalk_dic_utf_8-1.11
done
# https://github.com/VOICEVOX/voicevox_core/issues/873 が再発しないかの確認。
#
# Python 3.8においては、プロセスの終了までにFatal Python errorに至らなくても`StopIteration`までは達することが多い。
# #873の要因は依然として不明であるが、`StopIteration`が出ないことの確認をもって#873の解決とすることにする。
#
# TODO: 10回の実行におよそ60秒ほどかかるため、状況の経過を見てやめる。
for _ in {1..10}; do
poetry run python ../../example/python/run-asyncio.py ../test_util/data/model/sample.vvm --dict-dir ../test_util/data/open_jtalk_dic_utf_8-1.11 \
2> >(tee ./stderr.txt >&2)
# shellcheck disable=SC2059
! grep -q StopIteration ./stderr.txt
done
build-and-test-java-api:
strategy:
fail-fast: false
Expand Down
2 changes: 1 addition & 1 deletion crates/voicevox_core_python_api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ VOICEVOX CORE の Python バインディングです。
以下の環境が必要です。

- Rustup
- Python ≧ 3.8
- Python ≧ 3.10
- Poetry ≧ 1.6

```console
Expand Down
78 changes: 3 additions & 75 deletions crates/voicevox_core_python_api/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/voicevox_core_python_api/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "voicevox_core"
requires-python = ">=3.8"
requires-python = ">=3.10"
dependencies = ["pydantic>=2.5.2,<3"]
description = "VOICEVOX CORE の Python バインディングです。"
authors = [{ name = "Hiroshiba", email = "hihokaruta@gmail.com" }]
Expand Down Expand Up @@ -38,7 +38,7 @@ description = "VOICEVOX CORE の Python バインディングです。"
authors = []

[tool.poetry.dependencies]
python = ">=3.8,<3.13"
python = ">=3.10,<3.13"
pydantic = ">=2.5.2,<3"

[tool.poetry.group.docs.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion example/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ windows の場合

TODO:

- Python インタプリタ ≧3.8 + venv
- Python インタプリタ ≧3.10 + venv

## 実行

Expand Down

0 comments on commit 5eae9c5

Please sign in to comment.