diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index 7186238d6..b585e3bf8 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -44,7 +44,7 @@ jobs: with: workspaces: temporalio/bridge -> target - uses: astral-sh/setup-uv@v5 - - run: uv sync --all-extras + - run: uv sync --all-extras --python 3.13 # Add the source dist only for Linux x64 for now - if: ${{ matrix.package-suffix == 'linux-amd64' }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b079e60b..473c42bec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,20 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: astral-sh/setup-uv@v5 - run: uv tool install poethepoet - - run: uv sync --all-extras + - run: uv sync --all-extras --python ${{ matrix.python }} + - name: Check python version + shell: bash + run: | + actual=$(uv run python -c "import sys; print('.'.join(map(str, sys.version_info[:2])))") + if [[ "$actual" != "${{ matrix.python }}" ]]; then + echo "Python version in use by uv ($actual) does not match intended version (${{ matrix.python }})" + exit 1 + fi + actual=$(python -c "import sys; print('.'.join(map(str, sys.version_info[:2])))") + if [[ "$actual" != "${{ matrix.python }}" ]]; then + echo "Python version on PATH ($actual) does not match intended version (${{ matrix.python }})" + exit 1 + fi - run: poe bridge-lint if: ${{ matrix.clippyLinter }} - run: poe lint @@ -84,7 +97,7 @@ jobs: TEMPORAL_TEST_PROTO3: 1 run: | uv add --python 3.9 "protobuf<4" - uv sync --all-extras + uv sync --all-extras --python 3.9 poe build-develop poe gen-protos poe format diff --git a/.github/workflows/run-bench.yml b/.github/workflows/run-bench.yml index 6dcad63e8..d08c98e93 100644 --- a/.github/workflows/run-bench.yml +++ b/.github/workflows/run-bench.yml @@ -47,7 +47,7 @@ jobs: - uses: astral-sh/setup-uv@v5 # Build - run: uv tool install poethepoet - - run: uv sync --all-extras + - run: uv sync --all-extras --python 3.13 - run: poe build-develop-with-release # Run a bunch of bench tests. We run multiple times since results vary. diff --git a/README.md b/README.md index 58e775da1..1983ed982 100644 --- a/README.md +++ b/README.md @@ -1544,7 +1544,7 @@ poe test -s --log-cli-level=DEBUG -k test_sync_activity_thread_cancel_caught #### Proto Generation and Testing To allow for backwards compatibility, protobuf code is generated on the 3.x series of the protobuf library. To generate -protobuf code, you must be on Python <= 3.10, and then run `uv add "protobuf<4"` + `uv sync --all-extras`. Then the +protobuf code, run `uv add "protobuf<4" --python 3.10` + `uv sync --all-extras --python 3.10`. Then the protobuf files can be generated via `poe gen-protos`. Tests can be run for protobuf version 3 by setting the `TEMPORAL_TEST_PROTO3` env var to `1` prior to running tests.