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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:

jobs:
lint:
runs-on: ubuntu-2404-4-cores
runs-on: ubuntu-latest

steps:
# https://github.com/actions/checkout
Expand Down Expand Up @@ -42,7 +42,7 @@ jobs:
uv run ruff format --check src

test:
runs-on: ubuntu-2404-4-cores
runs-on: ubuntu-latest

steps:
# https://github.com/actions/checkout
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/conformance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ concurrency:

jobs:
server:
runs-on: ubuntu-2404-4-cores
runs-on: ubuntu-latest

steps:
# https://github.com/actions/checkout
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
connectconformance --trace --vv --conf ./server_config.yaml --mode server --known-flaky @./server_known_flaky.yaml -- uv run python server_runner.py

client:
runs-on: ubuntu-2404-4-cores
runs-on: ubuntu-latest

steps:
# https://github.com/actions/checkout
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Connect is a simple, reliable, and interoperable RPC framework that combines the
## Installation

```bash
pip install gconnect
pip install connectrpc
```

**⚠️ Dependency Notice**: For gRPC/gRPC-Web support, this package uses forked libraries:
Expand Down Expand Up @@ -70,9 +70,9 @@ protoc --plugin=$(go env GOPATH)/bin/protoc-gen-connect-python -I . --connect-py
### 3. Implement your service

```python
from gconnect.connect import UnaryRequest, UnaryResponse
from gconnect.handler_context import HandlerContext
from gconnect.middleware import ConnectMiddleware
from connectrpc.connect import UnaryRequest, UnaryResponse
from connectrpc.handler_context import HandlerContext
from connectrpc.middleware import ConnectMiddleware
from starlette.applications import Starlette
from starlette.middleware import Middleware

Expand Down Expand Up @@ -118,8 +118,8 @@ if __name__ == "__main__":
### 5. Use the client

```python
from gconnect.client import UnaryRequest
from gconnect.connection_pool import AsyncConnectionPool
from connectrpc.client import UnaryRequest
from connectrpc.connection_pool import AsyncConnectionPool
from ping_pb2 import PingRequest
from ping_connect_pb2 import PingServiceClient

Expand Down Expand Up @@ -266,7 +266,7 @@ This project includes a Protocol Buffer plugin (`protoc-gen-connect-python`) wri

## Contributing

We warmly welcome and greatly value contributions to the gconnect. However, before diving in, we kindly request that you take a moment to review our Contribution Guidelines.
We warmly welcome and greatly value contributions to the connectrpc. However, before diving in, we kindly request that you take a moment to review our Contribution Guidelines.

Additionally, please carefully read the Contributor License Agreement (CLA) before submitting your contribution to Gaudiy. By submitting your contribution, you are considered to have accepted and agreed to be bound by the terms and conditions outlined in the CLA, regardless of circumstances.

Expand Down
6 changes: 3 additions & 3 deletions cmd/protoc-gen-connect-python/generator/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func (g *Generator) generate(gen *protogen.GeneratedFile, f *protogen.File) {
p.P(`import abc`)
p.P(`from enum import Enum`)
p.P()
p.P(`from gconnect import (`)
p.P(`from connectrpc import (`)
p.P(` Client,`)
p.P(` ClientOptions,`)
p.P(` HandlerOptions,`)
Expand All @@ -189,8 +189,8 @@ func (g *Generator) generate(gen *protogen.GeneratedFile, f *protogen.File) {
p.P(` UnaryRequest,`)
p.P(` UnaryResponse,`)
p.P(`)`)
p.P(`from gconnect.connection_pool import AsyncConnectionPool`)
p.P(`from gconnect.handler import BidiStreamHandler, ClientStreamHandler, ServerStreamHandler, UnaryHandler`)
p.P(`from connectrpc.connection_pool import AsyncConnectionPool`)
p.P(`from connectrpc.handler import BidiStreamHandler, ClientStreamHandler, ServerStreamHandler, UnaryHandler`)
p.P(`from google.protobuf.descriptor import MethodDescriptor, ServiceDescriptor`)
p.P()

Expand Down
6 changes: 3 additions & 3 deletions cmd/protoc-gen-connect-python/generator/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
// p.P(`import abc`)
// p.P(`from enum import Enum`)
// p.P()
// p.P(`from gconnect.connect import UnaryRequest, UnaryResponse`)
// p.P(`from gconnect.handler import UnaryHandler`)
// p.P(`from gconnect.options import HandlerOptions`)
// p.P(`from connectrpc.connect import UnaryRequest, UnaryResponse`)
// p.P(`from connectrpc.handler import UnaryHandler`)
// p.P(`from connectrpc.options import HandlerOptions`)
// p.P(`from google.protobuf.descriptor import MethodDescriptor, ServiceDescriptor`)

// PythonIdent is a Python identifier, consisting of a name and import path.
Expand Down
12 changes: 6 additions & 6 deletions conformance/client_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
from collections.abc import AsyncGenerator
from typing import Any

from gconnect.call_options import CallOptions
from gconnect.connect import StreamRequest, UnaryRequest
from gconnect.connection_pool import AsyncConnectionPool
from gconnect.error import ConnectError
from gconnect.headers import Headers
from gconnect.options import ClientOptions
from connectrpc.call_options import CallOptions
from connectrpc.connect import StreamRequest, UnaryRequest
from connectrpc.connection_pool import AsyncConnectionPool
from connectrpc.error import ConnectError
from connectrpc.headers import Headers
from connectrpc.options import ClientOptions
from google.protobuf import any_pb2
from google.protobuf.internal.containers import RepeatedCompositeFieldContainer

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import abc
from enum import Enum

from gconnect import (
from connectrpc import (
Client,
ClientOptions,
HandlerOptions,
Expand All @@ -17,10 +17,10 @@
StreamRequest,
StreamResponse,
)
from gconnect import UnaryRequest as ConnectUnaryRequest
from gconnect import UnaryResponse as ConnectUnaryResponse
from gconnect.connection_pool import AsyncConnectionPool
from gconnect.handler import BidiStreamHandler, ClientStreamHandler, ServerStreamHandler, UnaryHandler
from connectrpc import UnaryRequest as ConnectUnaryRequest
from connectrpc import UnaryResponse as ConnectUnaryResponse
from connectrpc.connection_pool import AsyncConnectionPool
from connectrpc.handler import BidiStreamHandler, ClientStreamHandler, ServerStreamHandler, UnaryHandler
from google.protobuf.descriptor import MethodDescriptor, ServiceDescriptor

from .. import service_pb2
Expand Down
9 changes: 7 additions & 2 deletions conformance/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ description = "Add your description here"
readme = "README.md"
authors = [{ name = "tsubakiky", email = "salovers1205@gmail.com" }]
requires-python = ">=3.13"
dependencies = ["anyio>=4.8.0", "gconnect", "cryptography>=44.0.2", "hypercorn"]
dependencies = [
"anyio>=4.8.0",
"connectrpc",
"cryptography>=44.0.2",
"hypercorn",
]

[tool.uv.sources]
gconnect = { path = "../" }
connectrpc = { path = "../" }
hypercorn = { git = "https://github.com/tsubakiky/hypercorn" }

[dependency-groups]
Expand Down
12 changes: 6 additions & 6 deletions conformance/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
import typing

import google.protobuf.any_pb2 as any_pb2
from gconnect.code import Code
from gconnect.connect import StreamRequest, StreamResponse, UnaryRequest, UnaryResponse
from gconnect.error import ConnectError, ErrorDetail
from gconnect.handler_context import HandlerContext
from gconnect.headers import Headers
from gconnect.middleware import ConnectMiddleware
from connectrpc.code import Code
from connectrpc.connect import StreamRequest, StreamResponse, UnaryRequest, UnaryResponse
from connectrpc.error import ConnectError, ErrorDetail
from connectrpc.handler_context import HandlerContext
from connectrpc.headers import Headers
from connectrpc.middleware import ConnectMiddleware
from starlette.applications import Starlette
from starlette.middleware import Middleware

Expand Down
Loading
Loading