Skip to content

Commit f3d8450

Browse files
authored
rename connectrpc (#109)
1 parent 05a3471 commit f3d8450

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+364
-356
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ concurrency:
1313

1414
jobs:
1515
lint:
16-
runs-on: ubuntu-2404-4-cores
16+
runs-on: ubuntu-latest
1717

1818
steps:
1919
# https://github.com/actions/checkout
@@ -42,7 +42,7 @@ jobs:
4242
uv run ruff format --check src
4343
4444
test:
45-
runs-on: ubuntu-2404-4-cores
45+
runs-on: ubuntu-latest
4646

4747
steps:
4848
# https://github.com/actions/checkout

.github/workflows/conformance.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ concurrency:
1818

1919
jobs:
2020
server:
21-
runs-on: ubuntu-2404-4-cores
21+
runs-on: ubuntu-latest
2222

2323
steps:
2424
# https://github.com/actions/checkout
@@ -58,7 +58,7 @@ jobs:
5858
connectconformance --trace --vv --conf ./server_config.yaml --mode server --known-flaky @./server_known_flaky.yaml -- uv run python server_runner.py
5959
6060
client:
61-
runs-on: ubuntu-2404-4-cores
61+
runs-on: ubuntu-latest
6262

6363
steps:
6464
# https://github.com/actions/checkout

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Connect is a simple, reliable, and interoperable RPC framework that combines the
1414
## Installation
1515

1616
```bash
17-
pip install gconnect
17+
pip install connectrpc
1818
```
1919

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

7272
```python
73-
from gconnect.connect import UnaryRequest, UnaryResponse
74-
from gconnect.handler_context import HandlerContext
75-
from gconnect.middleware import ConnectMiddleware
73+
from connectrpc.connect import UnaryRequest, UnaryResponse
74+
from connectrpc.handler_context import HandlerContext
75+
from connectrpc.middleware import ConnectMiddleware
7676
from starlette.applications import Starlette
7777
from starlette.middleware import Middleware
7878

@@ -118,8 +118,8 @@ if __name__ == "__main__":
118118
### 5. Use the client
119119

120120
```python
121-
from gconnect.client import UnaryRequest
122-
from gconnect.connection_pool import AsyncConnectionPool
121+
from connectrpc.client import UnaryRequest
122+
from connectrpc.connection_pool import AsyncConnectionPool
123123
from ping_pb2 import PingRequest
124124
from ping_connect_pb2 import PingServiceClient
125125

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

267267
## Contributing
268268

269-
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.
269+
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.
270270

271271
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.
272272

cmd/protoc-gen-connect-python/generator/generator.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ func (g *Generator) generate(gen *protogen.GeneratedFile, f *protogen.File) {
177177
p.P(`import abc`)
178178
p.P(`from enum import Enum`)
179179
p.P()
180-
p.P(`from gconnect import (`)
180+
p.P(`from connectrpc import (`)
181181
p.P(` Client,`)
182182
p.P(` ClientOptions,`)
183183
p.P(` HandlerOptions,`)
@@ -189,8 +189,8 @@ func (g *Generator) generate(gen *protogen.GeneratedFile, f *protogen.File) {
189189
p.P(` UnaryRequest,`)
190190
p.P(` UnaryResponse,`)
191191
p.P(`)`)
192-
p.P(`from gconnect.connection_pool import AsyncConnectionPool`)
193-
p.P(`from gconnect.handler import BidiStreamHandler, ClientStreamHandler, ServerStreamHandler, UnaryHandler`)
192+
p.P(`from connectrpc.connection_pool import AsyncConnectionPool`)
193+
p.P(`from connectrpc.handler import BidiStreamHandler, ClientStreamHandler, ServerStreamHandler, UnaryHandler`)
194194
p.P(`from google.protobuf.descriptor import MethodDescriptor, ServiceDescriptor`)
195195
p.P()
196196

cmd/protoc-gen-connect-python/generator/package.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import (
77
// p.P(`import abc`)
88
// p.P(`from enum import Enum`)
99
// p.P()
10-
// p.P(`from gconnect.connect import UnaryRequest, UnaryResponse`)
11-
// p.P(`from gconnect.handler import UnaryHandler`)
12-
// p.P(`from gconnect.options import HandlerOptions`)
10+
// p.P(`from connectrpc.connect import UnaryRequest, UnaryResponse`)
11+
// p.P(`from connectrpc.handler import UnaryHandler`)
12+
// p.P(`from connectrpc.options import HandlerOptions`)
1313
// p.P(`from google.protobuf.descriptor import MethodDescriptor, ServiceDescriptor`)
1414

1515
// PythonIdent is a Python identifier, consisting of a name and import path.

conformance/client_runner.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
from collections.abc import AsyncGenerator
2727
from typing import Any
2828

29-
from gconnect.call_options import CallOptions
30-
from gconnect.connect import StreamRequest, UnaryRequest
31-
from gconnect.connection_pool import AsyncConnectionPool
32-
from gconnect.error import ConnectError
33-
from gconnect.headers import Headers
34-
from gconnect.options import ClientOptions
29+
from connectrpc.call_options import CallOptions
30+
from connectrpc.connect import StreamRequest, UnaryRequest
31+
from connectrpc.connection_pool import AsyncConnectionPool
32+
from connectrpc.error import ConnectError
33+
from connectrpc.headers import Headers
34+
from connectrpc.options import ClientOptions
3535
from google.protobuf import any_pb2
3636
from google.protobuf.internal.containers import RepeatedCompositeFieldContainer
3737

conformance/gen/connectrpc/conformance/v1/conformancev1connect/service_connect.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import abc
88
from enum import Enum
99

10-
from gconnect import (
10+
from connectrpc import (
1111
Client,
1212
ClientOptions,
1313
HandlerOptions,
@@ -17,10 +17,10 @@
1717
StreamRequest,
1818
StreamResponse,
1919
)
20-
from gconnect import UnaryRequest as ConnectUnaryRequest
21-
from gconnect import UnaryResponse as ConnectUnaryResponse
22-
from gconnect.connection_pool import AsyncConnectionPool
23-
from gconnect.handler import BidiStreamHandler, ClientStreamHandler, ServerStreamHandler, UnaryHandler
20+
from connectrpc import UnaryRequest as ConnectUnaryRequest
21+
from connectrpc import UnaryResponse as ConnectUnaryResponse
22+
from connectrpc.connection_pool import AsyncConnectionPool
23+
from connectrpc.handler import BidiStreamHandler, ClientStreamHandler, ServerStreamHandler, UnaryHandler
2424
from google.protobuf.descriptor import MethodDescriptor, ServiceDescriptor
2525

2626
from .. import service_pb2

conformance/pyproject.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@ description = "Add your description here"
55
readme = "README.md"
66
authors = [{ name = "tsubakiky", email = "salovers1205@gmail.com" }]
77
requires-python = ">=3.13"
8-
dependencies = ["anyio>=4.8.0", "gconnect", "cryptography>=44.0.2", "hypercorn"]
8+
dependencies = [
9+
"anyio>=4.8.0",
10+
"connectrpc",
11+
"cryptography>=44.0.2",
12+
"hypercorn",
13+
]
914

1015
[tool.uv.sources]
11-
gconnect = { path = "../" }
16+
connectrpc = { path = "../" }
1217
hypercorn = { git = "https://github.com/tsubakiky/hypercorn" }
1318

1419
[dependency-groups]

conformance/server.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
import typing
2222

2323
import google.protobuf.any_pb2 as any_pb2
24-
from gconnect.code import Code
25-
from gconnect.connect import StreamRequest, StreamResponse, UnaryRequest, UnaryResponse
26-
from gconnect.error import ConnectError, ErrorDetail
27-
from gconnect.handler_context import HandlerContext
28-
from gconnect.headers import Headers
29-
from gconnect.middleware import ConnectMiddleware
24+
from connectrpc.code import Code
25+
from connectrpc.connect import StreamRequest, StreamResponse, UnaryRequest, UnaryResponse
26+
from connectrpc.error import ConnectError, ErrorDetail
27+
from connectrpc.handler_context import HandlerContext
28+
from connectrpc.headers import Headers
29+
from connectrpc.middleware import ConnectMiddleware
3030
from starlette.applications import Starlette
3131
from starlette.middleware import Middleware
3232

0 commit comments

Comments
 (0)