From 4c3a7b47ef44d53b6816f5238d794f7f93c3e80d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 20 Apr 2026 00:44:58 +0000 Subject: [PATCH 1/6] Update github.com/bufbuild/protoplugin digest to 25d1d28 --- protoc-gen-connect-python/go.mod | 2 +- protoc-gen-connect-python/go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/protoc-gen-connect-python/go.mod b/protoc-gen-connect-python/go.mod index d938cc1..9c08c89 100644 --- a/protoc-gen-connect-python/go.mod +++ b/protoc-gen-connect-python/go.mod @@ -3,6 +3,6 @@ module github.com/connectrpc/connect-python/protoc-gen-connect-python go 1.25.7 require ( - github.com/bufbuild/protoplugin v0.0.0-20250218205857-750e09ce93e1 + github.com/bufbuild/protoplugin v0.0.0-20260414125817-25d1d281b46b google.golang.org/protobuf v1.36.11 ) diff --git a/protoc-gen-connect-python/go.sum b/protoc-gen-connect-python/go.sum index 3287406..15c4196 100644 --- a/protoc-gen-connect-python/go.sum +++ b/protoc-gen-connect-python/go.sum @@ -2,6 +2,8 @@ github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/ github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c= github.com/bufbuild/protoplugin v0.0.0-20250218205857-750e09ce93e1 h1:V1xulAoqLqVg44rY97xOR+mQpD2N+GzhMHVwJ030WEU= github.com/bufbuild/protoplugin v0.0.0-20250218205857-750e09ce93e1/go.mod h1:c5D8gWRIZ2HLWO3gXYTtUfw/hbJyD8xikv2ooPxnklQ= +github.com/bufbuild/protoplugin v0.0.0-20260414125817-25d1d281b46b h1:b7wvo9ZhjLzCp7tGbOUMvgtYTnd33zGSAmMxcdxMnhQ= +github.com/bufbuild/protoplugin v0.0.0-20260414125817-25d1d281b46b/go.mod h1:c5D8gWRIZ2HLWO3gXYTtUfw/hbJyD8xikv2ooPxnklQ= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= From 71537c86cab652731bc844aa30aa1cd1b30c5728 Mon Sep 17 00:00:00 2001 From: Stefan VanBuren Date: Wed, 22 Apr 2026 09:10:41 -0400 Subject: [PATCH 2/6] Add `go mod tidy` check to generate Shouldn't be very expensive. Signed-off-by: Stefan VanBuren --- poe_tasks.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/poe_tasks.toml b/poe_tasks.toml index 1578fb3..15d8726 100644 --- a/poe_tasks.toml +++ b/poe_tasks.toml @@ -58,6 +58,7 @@ sequence = [ "generate-example", "generate-status", "generate-test", + { cmd = "go mod tidy", cwd = "protoc-gen-connect-python" }, "format", ] From aea6258fc728540771bece015aaf1cb8aa59b95f Mon Sep 17 00:00:00 2001 From: Stefan VanBuren Date: Wed, 22 Apr 2026 09:17:28 -0400 Subject: [PATCH 3/6] Minor tweaks to CI workflow * Rename inner job to `ci` rather than `build` * Reorganize steps so longest bits run last (fail fast) * Add `persist-credentials: false` to actions/checkout to appease zizmor Signed-off-by: Stefan VanBuren --- .github/workflows/ci.yaml | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cad68f3..9791526 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,7 +17,7 @@ concurrency: cancel-in-progress: true jobs: - build: + ci: runs-on: ${{ matrix.os }} strategy: matrix: @@ -57,6 +57,8 @@ jobs: steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 with: @@ -73,14 +75,17 @@ jobs: if: startsWith(matrix.os, 'ubuntu-') run: uv run poe lint + - name: check running generate does not create a diff + # NOTE: running on macOS as our sed command only works there + # We expect uv.lock to change when matrix.resolution == "lowest-direct", so we don't check it there. + if: ${{ startsWith(matrix.os, 'macos-') && matrix.resolution == 'highest' }} + run: uv run poe checkgenerate + env: + BUF_TOKEN: ${{ secrets.BUF_TOKEN }} + - name: run python tests run: uv run poe test ${{ matrix.coverage == 'cov' && '--cov=connectrpc --cov-report=xml' || '' }} - - name: run conformance tests - # TODO: Debug stdin/stdout issues on Windows - if: ${{ !startsWith(matrix.os, 'windows-') }} - run: uv run poe test-conformance ${{ matrix.coverage == 'cov' && '--cov=connectrpc --cov-report=xml' || '' }} - - name: run OTel tests run: uv run poe test-otel ${{ matrix.coverage == 'cov' && '--cov=connectrpc_otel --cov-report=xml' || '' }} @@ -88,13 +93,10 @@ jobs: run: go test ./... working-directory: protoc-gen-connect-python - - name: check running generate does not create a diff - # NOTE: running on macOS as our sed command only works there - # We expect uv.lock to change when matrix.resolution == "lowest-direct", so we don't check it there. - if: ${{ startsWith(matrix.os, 'macos-') && matrix.resolution == 'highest' }} - run: uv run poe checkgenerate - env: - BUF_TOKEN: ${{ secrets.BUF_TOKEN }} + - name: run conformance tests + # TODO: Debug stdin/stdout issues on Windows + if: ${{ !startsWith(matrix.os, 'windows-') }} + run: uv run poe test-conformance ${{ matrix.coverage == 'cov' && '--cov=connectrpc --cov-report=xml' || '' }} - uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0 if: ${{ matrix.coverage == 'cov' }} @@ -103,9 +105,11 @@ jobs: publish: runs-on: ubuntu-24.04 - needs: build + needs: ci steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 From 90e53e94d8dce1ac0c42fc753ca4973435030837 Mon Sep 17 00:00:00 2001 From: Stefan VanBuren Date: Wed, 22 Apr 2026 09:25:04 -0400 Subject: [PATCH 4/6] Switch buf dep to use pypi `buf-bin` Seems like the `go run` version isn't caching build artifacts...? Signed-off-by: Stefan VanBuren --- poe_tasks.toml | 11 ++++------- pyproject.toml | 1 + uv.lock | 25 ++++++++++++++++++++++--- 3 files changed, 27 insertions(+), 10 deletions(-) diff --git a/poe_tasks.toml b/poe_tasks.toml index 15d8726..6b12387 100644 --- a/poe_tasks.toml +++ b/poe_tasks.toml @@ -1,8 +1,5 @@ #:schema https://json.schemastore.org/partial-poe.json -[env] -BUF_VERSION = "v1.67.0" - [tasks.bump] help = "Bump the project version" sequence = [ @@ -65,23 +62,23 @@ sequence = [ [tasks.generate-conformance] help = "Generate conformance files" sequence = [ - { cmd = "go run github.com/bufbuild/buf/cmd/buf@${BUF_VERSION} generate" }, + { cmd = "buf generate" }, { shell = "find test/gen -type f -exec sed -i '' 's/from connectrpc.conformance.v1/from gen.connectrpc.conformance.v1/' {} +", env = { "LC_ALL" = "c" } }, ] cwd = "conformance" [tasks.generate-example] help = "Generate example files" -cmd = "go run github.com/bufbuild/buf/cmd/buf@${BUF_VERSION} generate" +cmd = "buf generate" cwd = "example" [tasks.generate-status] help = "Generate gRPC status" -cmd = "go run github.com/bufbuild/buf/cmd/buf@${BUF_VERSION} generate" +cmd = "buf generate" [tasks.generate-test] help = "Generate test files" -cmd = "go run github.com/bufbuild/buf/cmd/buf@${BUF_VERSION} generate" +cmd = "buf generate" cwd = "test" [tasks.lint] diff --git a/pyproject.toml b/pyproject.toml index 274b671..abc6431 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,6 +40,7 @@ Repository = "https://github.com/connectrpc/connect-python" dev = [ # Needed to enable HTTP/2 in daphne "Twisted[tls,http2]==25.5.0", + "buf-bin==1.68.3", "asgiref==3.11.1", "brotli==1.2.0", "connect-python-example", diff --git a/uv.lock b/uv.lock index c5f627d..05ed56d 100644 --- a/uv.lock +++ b/uv.lock @@ -196,6 +196,23 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/f5/10/56978295c14794b2c12007b07f3e41ba26acda9257457d7085b0bb3bb90c/brotli-1.2.0-cp314-cp314-win_amd64.whl", hash = "sha256:e7c0af964e0b4e3412a0ebf341ea26ec767fa0b4cf81abb5e897c9338b5ad6a3", size = 375639, upload-time = "2025-11-05T18:38:55.67Z" }, ] +[[package]] +name = "buf-bin" +version = "1.68.3" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/42/15/9443a446f741798a498e212dfb771cbb2317411d20862bfa7bb97989895d/buf_bin-1.68.3-py3-none-macosx_11_0_arm64.whl", hash = "sha256:5fe7e01b19573c456aeb4f6959e9093d56651edfe57a9bd32df60124d6a13a38", size = 15280611, upload-time = "2026-04-20T22:39:28.711Z" }, + { url = "https://files.pythonhosted.org/packages/53/56/cfd9ab23646435db38187c1b43dee17d142c6933bfd059ea2616b9e2b4ad/buf_bin-1.68.3-py3-none-macosx_11_0_x86_64.whl", hash = "sha256:dfd5019b550d717e7e472eb40c88d6d6dec39cc456ee9cd666594fb28dcdc8b6", size = 16429435, upload-time = "2026-04-20T22:39:31.193Z" }, + { url = "https://files.pythonhosted.org/packages/fa/df/456a48c5854eb31967a31e544b8ca03f87fa5f78e4a08bea128acd211b1a/buf_bin-1.68.3-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.musllinux_1_1_aarch64.whl", hash = "sha256:41b2874babb151aaa32a0f939ff8379fbc566fe9b0488add51d33b70099d03ee", size = 14465942, upload-time = "2026-04-20T22:39:33.786Z" }, + { url = "https://files.pythonhosted.org/packages/40/fc/dc3d6d5faeaa3544064313df04fa344c01dca76055b97a3414b2775eedca/buf_bin-1.68.3-py3-none-manylinux2014_armv7l.manylinux_2_17_armv7l.musllinux_1_1_armv7l.whl", hash = "sha256:aa16ca7ed064d28b83223e2ea2fd1804aab133d6769efaaef63ceeb66e0f6042", size = 14664645, upload-time = "2026-04-20T22:39:36.299Z" }, + { url = "https://files.pythonhosted.org/packages/fe/95/bfd82ed193f047eebedd3cb9bb4c83550253230db994b305591a3207e7df/buf_bin-1.68.3-py3-none-manylinux2014_ppc64le.manylinux_2_17_ppc64le.musllinux_1_1_ppc64le.whl", hash = "sha256:11b3953b857fddaf3b3f2370a04910cf43be3ec96e3faf20b7fdc8cd9f5492b6", size = 14175536, upload-time = "2026-04-20T22:39:38.606Z" }, + { url = "https://files.pythonhosted.org/packages/d7/e0/3e1aba1583b3922593fc068063cab77c185bb8ecc4f6de89cff7766570bf/buf_bin-1.68.3-py3-none-manylinux2014_s390x.manylinux_2_17_s390x.musllinux_1_1_s390x.whl", hash = "sha256:6409ea6414ed738bc081f5a389995849532c0bbd0ebaac4fad8361fb952b5594", size = 15425939, upload-time = "2026-04-20T22:39:40.782Z" }, + { url = "https://files.pythonhosted.org/packages/c0/5c/34b85c515139e3b240813dff4bd3d0b92dc8051632c84eca7de4176cc471/buf_bin-1.68.3-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.musllinux_1_1_x86_64.whl", hash = "sha256:54e50b425797a133eb6d6483fbdba4d555daa92130551d70718ce54954ea539b", size = 16029379, upload-time = "2026-04-20T22:39:42.926Z" }, + { url = "https://files.pythonhosted.org/packages/62/54/10f01c6d5d25ee74b50116958795085abb440f9a0d5a5a1b373ed63141cf/buf_bin-1.68.3-py3-none-manylinux_2_17_riscv64.musllinux_1_2_riscv64.whl", hash = "sha256:3719dc6258c3a2ce351ce8a28756a257bd65232497d2d057283d9931e4e8f07d", size = 14679823, upload-time = "2026-04-20T22:39:45.193Z" }, + { url = "https://files.pythonhosted.org/packages/5c/89/c5f172a5bcc2d8d501aadeaa97a1850d78256d30d64671274a3893c31e3a/buf_bin-1.68.3-py3-none-win_amd64.whl", hash = "sha256:f223f15179ae8d4b8056c3f710584771bc5fbb447525bf5bd8ab61d9ba783e41", size = 16366444, upload-time = "2026-04-20T22:39:47.397Z" }, + { url = "https://files.pythonhosted.org/packages/8e/7b/793f3c5bfef334c8a4d169cb73e20dd523b85592ed838919beb270375127/buf_bin-1.68.3-py3-none-win_arm64.whl", hash = "sha256:ab873ee2f4f98f90c231ab49df138a44d6cc5ebfab680e3cc4b6792713d44e91", size = 14548467, upload-time = "2026-04-20T22:39:49.7Z" }, +] + [[package]] name = "cbor2" version = "5.9.0" @@ -375,6 +392,7 @@ dependencies = [ dev = [ { name = "asgiref" }, { name = "brotli" }, + { name = "buf-bin" }, { name = "connect-python-example" }, { name = "daphne" }, { name = "granian" }, @@ -413,6 +431,7 @@ requires-dist = [ dev = [ { name = "asgiref", specifier = "==3.11.1" }, { name = "brotli", specifier = "==1.2.0" }, + { name = "buf-bin", specifier = "==1.68.3" }, { name = "connect-python-example", editable = "example" }, { name = "daphne", specifier = "==4.2.1" }, { name = "granian", specifier = "==2.7.3" }, @@ -683,7 +702,7 @@ name = "exceptiongroup" version = "1.3.1" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "typing-extensions", marker = "python_full_version < '3.13'" }, + { name = "typing-extensions", marker = "python_full_version < '3.11'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219", size = 30371, upload-time = "2025-11-21T23:01:54.787Z" } wheels = [ @@ -1956,8 +1975,8 @@ name = "taskgroup" version = "0.2.2" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "exceptiongroup" }, - { name = "typing-extensions" }, + { name = "exceptiongroup", marker = "python_full_version < '3.11'" }, + { name = "typing-extensions", marker = "python_full_version < '3.11'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/f0/8d/e218e0160cc1b692e6e0e5ba34e8865dbb171efeb5fc9a704544b3020605/taskgroup-0.2.2.tar.gz", hash = "sha256:078483ac3e78f2e3f973e2edbf6941374fbea81b9c5d0a96f51d297717f4752d", size = 11504, upload-time = "2025-01-03T09:24:13.761Z" } wheels = [ From c4f5f3f4f5c6e6b182b7f5ad28e567c92fb9b247 Mon Sep 17 00:00:00 2001 From: Stefan VanBuren Date: Wed, 22 Apr 2026 09:30:05 -0400 Subject: [PATCH 5/6] Fix tombi formatting Signed-off-by: Stefan VanBuren --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index abc6431..a03fdf2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,9 +40,9 @@ Repository = "https://github.com/connectrpc/connect-python" dev = [ # Needed to enable HTTP/2 in daphne "Twisted[tls,http2]==25.5.0", - "buf-bin==1.68.3", "asgiref==3.11.1", "brotli==1.2.0", + "buf-bin==1.68.3", "connect-python-example", "daphne==4.2.1", "granian==2.7.3", From f54ffd3616c8ea8ad32d696265426481b9ff8abb Mon Sep 17 00:00:00 2001 From: Stefan VanBuren Date: Wed, 22 Apr 2026 09:31:20 -0400 Subject: [PATCH 6/6] Run `go mod tidy` To actually fix the issue. Signed-off-by: Stefan VanBuren --- protoc-gen-connect-python/go.sum | 2 -- 1 file changed, 2 deletions(-) diff --git a/protoc-gen-connect-python/go.sum b/protoc-gen-connect-python/go.sum index 15c4196..0ac058e 100644 --- a/protoc-gen-connect-python/go.sum +++ b/protoc-gen-connect-python/go.sum @@ -1,7 +1,5 @@ github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/FBatYVw= github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c= -github.com/bufbuild/protoplugin v0.0.0-20250218205857-750e09ce93e1 h1:V1xulAoqLqVg44rY97xOR+mQpD2N+GzhMHVwJ030WEU= -github.com/bufbuild/protoplugin v0.0.0-20250218205857-750e09ce93e1/go.mod h1:c5D8gWRIZ2HLWO3gXYTtUfw/hbJyD8xikv2ooPxnklQ= github.com/bufbuild/protoplugin v0.0.0-20260414125817-25d1d281b46b h1:b7wvo9ZhjLzCp7tGbOUMvgtYTnd33zGSAmMxcdxMnhQ= github.com/bufbuild/protoplugin v0.0.0-20260414125817-25d1d281b46b/go.mod h1:c5D8gWRIZ2HLWO3gXYTtUfw/hbJyD8xikv2ooPxnklQ= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=