python-trio / purerpc

Native, async Python gRPC client and server implementation supporting asyncio, uvloop, and trio
Apache License 2.0
217 stars 15 forks source link

ExceptionGroup support #43

Open VincentVanlaer opened 4 months ago

VincentVanlaer commented 4 months ago

Since anyio 4.0, all task groups raise ExceptionGroups by default. We need to check whether that causes us to miss exceptions, and whether we are passing exception groups to users where we do not intent to raise one.

I did a quick scan for where we use task groups in the main code, assuming that no other anyio functions raise exception groups:

https://github.com/python-trio/purerpc/blob/a3c17dd885d8f36bcf3a78c7506e35f7bc33cccc/src/purerpc/grpc_socket.py#L30 https://github.com/python-trio/purerpc/blob/a3c17dd885d8f36bcf3a78c7506e35f7bc33cccc/src/purerpc/grpc_socket.py#L216 https://github.com/python-trio/purerpc/blob/a3c17dd885d8f36bcf3a78c7506e35f7bc33cccc/src/purerpc/wrappers.py#L103-L107 https://github.com/python-trio/purerpc/blob/a3c17dd885d8f36bcf3a78c7506e35f7bc33cccc/src/purerpc/wrappers.py#L112-L117 https://github.com/python-trio/purerpc/blob/a3c17dd885d8f36bcf3a78c7506e35f7bc33cccc/src/purerpc/server.py#L219-L225

Other uses of tasks groups is in tests and some sample scripts. While those probably should be double checked, the ones above are the most important ones.