pydantic-rpc 0.15.0__tar.gz → 0.15.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pydantic_rpc-0.15.0 → pydantic_rpc-0.15.1}/PKG-INFO +5 -1
- {pydantic_rpc-0.15.0 → pydantic_rpc-0.15.1}/pyproject.toml +7 -1
- {pydantic_rpc-0.15.0 → pydantic_rpc-0.15.1}/src/pydantic_rpc/core.py +26 -9
- {pydantic_rpc-0.15.0 → pydantic_rpc-0.15.1}/README.md +0 -0
- {pydantic_rpc-0.15.0 → pydantic_rpc-0.15.1}/src/pydantic_rpc/__init__.py +0 -0
- {pydantic_rpc-0.15.0 → pydantic_rpc-0.15.1}/src/pydantic_rpc/decorators.py +0 -0
- {pydantic_rpc-0.15.0 → pydantic_rpc-0.15.1}/src/pydantic_rpc/mcp/__init__.py +0 -0
- {pydantic_rpc-0.15.0 → pydantic_rpc-0.15.1}/src/pydantic_rpc/mcp/converter.py +0 -0
- {pydantic_rpc-0.15.0 → pydantic_rpc-0.15.1}/src/pydantic_rpc/mcp/exporter.py +0 -0
- {pydantic_rpc-0.15.0 → pydantic_rpc-0.15.1}/src/pydantic_rpc/options.py +0 -0
- {pydantic_rpc-0.15.0 → pydantic_rpc-0.15.1}/src/pydantic_rpc/py.typed +0 -0
- {pydantic_rpc-0.15.0 → pydantic_rpc-0.15.1}/src/pydantic_rpc/tls.py +0 -0
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: pydantic-rpc
|
|
3
|
-
Version: 0.15.
|
|
3
|
+
Version: 0.15.1
|
|
4
4
|
Summary: A Python library for building gRPC/ConnectRPC services with Pydantic models.
|
|
5
5
|
Author: Yasushi Itoh
|
|
6
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
7
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
6
10
|
Requires-Dist: annotated-types==0.7.0
|
|
7
11
|
Requires-Dist: pydantic>=2.1.1
|
|
8
12
|
Requires-Dist: grpcio>=1.56.2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "pydantic-rpc"
|
|
3
|
-
version = "0.15.
|
|
3
|
+
version = "0.15.1"
|
|
4
4
|
description = "A Python library for building gRPC/ConnectRPC services with Pydantic models."
|
|
5
5
|
authors = [
|
|
6
6
|
{ name = "Yasushi Itoh" }
|
|
@@ -19,6 +19,12 @@ dependencies = [
|
|
|
19
19
|
]
|
|
20
20
|
readme = "README.md"
|
|
21
21
|
requires-python = ">= 3.11"
|
|
22
|
+
classifiers = [
|
|
23
|
+
"Programming Language :: Python :: 3.11",
|
|
24
|
+
"Programming Language :: Python :: 3.12",
|
|
25
|
+
"Programming Language :: Python :: 3.13",
|
|
26
|
+
"Programming Language :: Python :: 3.14",
|
|
27
|
+
]
|
|
22
28
|
|
|
23
29
|
|
|
24
30
|
[build-system]
|
|
@@ -1064,7 +1064,9 @@ def connect_obj_with_stub_async_connect_python(
|
|
|
1064
1064
|
e, method, context, None, is_grpc=False
|
|
1065
1065
|
)
|
|
1066
1066
|
except Exception as e:
|
|
1067
|
-
raise ConnectError(
|
|
1067
|
+
raise ConnectError(
|
|
1068
|
+
code=Errors.INTERNAL, message=str(e)
|
|
1069
|
+
)
|
|
1068
1070
|
else: # size_of_parameters == 2
|
|
1069
1071
|
|
|
1070
1072
|
async def stub_method(
|
|
@@ -1084,7 +1086,9 @@ def connect_obj_with_stub_async_connect_python(
|
|
|
1084
1086
|
e, method, context, None, is_grpc=False
|
|
1085
1087
|
)
|
|
1086
1088
|
except Exception as e:
|
|
1087
|
-
raise ConnectError(
|
|
1089
|
+
raise ConnectError(
|
|
1090
|
+
code=Errors.INTERNAL, message=str(e)
|
|
1091
|
+
)
|
|
1088
1092
|
|
|
1089
1093
|
return stub_method
|
|
1090
1094
|
else:
|
|
@@ -1110,7 +1114,9 @@ def connect_obj_with_stub_async_connect_python(
|
|
|
1110
1114
|
e, method, context, None, is_grpc=False
|
|
1111
1115
|
)
|
|
1112
1116
|
except Exception as e:
|
|
1113
|
-
raise ConnectError(
|
|
1117
|
+
raise ConnectError(
|
|
1118
|
+
code=Errors.INTERNAL, message=str(e)
|
|
1119
|
+
)
|
|
1114
1120
|
else: # size_of_parameters == 2
|
|
1115
1121
|
|
|
1116
1122
|
async def stub_method(
|
|
@@ -1132,7 +1138,9 @@ def connect_obj_with_stub_async_connect_python(
|
|
|
1132
1138
|
e, method, context, None, is_grpc=False
|
|
1133
1139
|
)
|
|
1134
1140
|
except Exception as e:
|
|
1135
|
-
raise ConnectError(
|
|
1141
|
+
raise ConnectError(
|
|
1142
|
+
code=Errors.INTERNAL, message=str(e)
|
|
1143
|
+
)
|
|
1136
1144
|
|
|
1137
1145
|
return stub_method
|
|
1138
1146
|
else:
|
|
@@ -1165,7 +1173,9 @@ def connect_obj_with_stub_async_connect_python(
|
|
|
1165
1173
|
e, method, context, request, is_grpc=False
|
|
1166
1174
|
)
|
|
1167
1175
|
except Exception as e:
|
|
1168
|
-
raise ConnectError(
|
|
1176
|
+
raise ConnectError(
|
|
1177
|
+
code=Errors.INTERNAL, message=str(e)
|
|
1178
|
+
)
|
|
1169
1179
|
else: # size_of_parameters == 2
|
|
1170
1180
|
|
|
1171
1181
|
async def stub_method(
|
|
@@ -1188,7 +1198,9 @@ def connect_obj_with_stub_async_connect_python(
|
|
|
1188
1198
|
e, method, context, request, is_grpc=False
|
|
1189
1199
|
)
|
|
1190
1200
|
except Exception as e:
|
|
1191
|
-
raise ConnectError(
|
|
1201
|
+
raise ConnectError(
|
|
1202
|
+
code=Errors.INTERNAL, message=str(e)
|
|
1203
|
+
)
|
|
1192
1204
|
|
|
1193
1205
|
return stub_method
|
|
1194
1206
|
else:
|
|
@@ -1219,7 +1231,9 @@ def connect_obj_with_stub_async_connect_python(
|
|
|
1219
1231
|
e, method, context, request, is_grpc=False
|
|
1220
1232
|
)
|
|
1221
1233
|
except Exception as e:
|
|
1222
|
-
raise ConnectError(
|
|
1234
|
+
raise ConnectError(
|
|
1235
|
+
code=Errors.INTERNAL, message=str(e)
|
|
1236
|
+
)
|
|
1223
1237
|
else: # size_of_parameters == 2
|
|
1224
1238
|
|
|
1225
1239
|
async def stub_method(
|
|
@@ -1246,7 +1260,9 @@ def connect_obj_with_stub_async_connect_python(
|
|
|
1246
1260
|
e, method, context, request, is_grpc=False
|
|
1247
1261
|
)
|
|
1248
1262
|
except Exception as e:
|
|
1249
|
-
raise ConnectError(
|
|
1263
|
+
raise ConnectError(
|
|
1264
|
+
code=Errors.INTERNAL, message=str(e)
|
|
1265
|
+
)
|
|
1250
1266
|
|
|
1251
1267
|
return stub_method
|
|
1252
1268
|
|
|
@@ -2956,12 +2972,13 @@ class AsyncIOServer:
|
|
|
2956
2972
|
await self._server.start()
|
|
2957
2973
|
|
|
2958
2974
|
shutdown_event = asyncio.Event()
|
|
2975
|
+
loop = asyncio.get_running_loop()
|
|
2959
2976
|
|
|
2960
2977
|
def shutdown(signum: signal.Signals, frame: Any):
|
|
2961
2978
|
_ = signum
|
|
2962
2979
|
_ = frame
|
|
2963
2980
|
print("Received shutdown signal...")
|
|
2964
|
-
shutdown_event.set
|
|
2981
|
+
loop.call_soon_threadsafe(shutdown_event.set)
|
|
2965
2982
|
|
|
2966
2983
|
for s in [signal.SIGTERM, signal.SIGINT]:
|
|
2967
2984
|
_ = signal.signal(s, shutdown) # pyright:ignore[reportArgumentType]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|