Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion conformance/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ dependencies = [
"anyio>=4.8.0",
"connect-python",
"cryptography>=44.0.2",
"hypercorn>=0.17.3",
"hypercorn",
]

[tool.uv.sources]
connect-python = { path = "../" }
hypercorn = { git = "https://github.com/tsubakiky/hypercorn" }

[dependency-groups]
dev = ["mypy>=1.15.0", "pyright>=1.1.398", "ruff>=0.11.2"]
Expand Down
3 changes: 1 addition & 2 deletions conformance/run-testcase.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
Connect Unexpected Responses/HTTPVersion:2/TLS:true/client-stream/multiple-responses
Connect Unexpected Responses/HTTPVersion:2/TLS:false/client-stream/ok-but-no-response
gRPC Unexpected Requests/HTTPVersion:2/TLS:true/unary/multiple-requests
3 changes: 2 additions & 1 deletion conformance/server_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ features:
- HTTP_VERSION_2
protocols:
- PROTOCOL_CONNECT
- PROTOCOL_GRPC
codecs:
- CODEC_PROTO
- CODEC_JSON
Expand All @@ -16,7 +17,7 @@ features:
- STREAM_TYPE_SERVER_STREAM
- STREAM_TYPE_HALF_DUPLEX_BIDI_STREAM

supports_trailers: false
supports_trailers: true
supports_tls: true
supports_tls_client_certs: true
supports_half_duplex_bidi_over_http1: true
Expand Down
412 changes: 211 additions & 201 deletions conformance/uv.lock

Large diffs are not rendered by default.

20 changes: 19 additions & 1 deletion examples/cmd/examples-go/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@ package main

import (
"context"
"crypto/tls"
"errors"
"flag"
"fmt"
"log"
"net"
"net/http"

"connectrpc.com/connect"
elizav1 "github.com/gaudiy/connect-python/examples/proto/connectrpc/eliza/v1"
"github.com/gaudiy/connect-python/examples/proto/connectrpc/eliza/v1/v1connect"
"golang.org/x/net/http2"
)

type mode int
Expand Down Expand Up @@ -94,7 +97,22 @@ func main() {
}

func runClient() error {
client := v1connect.NewElizaServiceClient(http.DefaultClient, "http://localhost:8080/")
// Create an HTTP/2 transport that allows unencrypted HTTP/2
transport := &http2.Transport{
AllowHTTP: true,
// Pretend we are dialing TLS but we are not
DialTLS: func(network, addr string, cfg *tls.Config) (net.Conn, error) {
return net.Dial(network, addr)
},
}

// Create an HTTP client with the HTTP/2 transport
httpClient := &http.Client{
Transport: transport,
}

// Create the ElizaService client with the HTTP/2 client
client := v1connect.NewElizaServiceClient(httpClient, "http://localhost:8080/", connect.WithGRPC())

ctx := context.Background()
switch rpcType {
Expand Down
6 changes: 1 addition & 5 deletions examples/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ license = { text = "Apache-2.0" }
authors = [{ name = "tsubakiky", email = "salovers1205@gmail.com" }]
requires-python = ">=3.13"
version = "0.1.0"
dependencies = [
"connect-python",
"grpcio==1.68.1",
"hypercorn[trio,uvloop]>=0.17.3",
]
dependencies = ["connect-python", "hypercorn[trio,uvloop]>=0.17.3"]

[tool.uv]
dev-dependencies = ["mypy>=1.13.0", "pyright>=1.1.390", "ruff>=0.8.2"]
Expand Down
62 changes: 47 additions & 15 deletions examples/uv.lock

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

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ requires-python = ">=3.13"
dynamic = ["version"]
dependencies = [
"anyio>=4.7.0",
"googleapis-common-protos>=1.70.0",
"h2>=4.2.0",
"httpcore>=1.0.7",
"protobuf>=5.29.1",
Expand Down
Loading
Loading