Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING CHANGE: Stable API for 1.0 release #15

Open
standy66 opened this issue Feb 9, 2019 · 0 comments
Open

BREAKING CHANGE: Stable API for 1.0 release #15

standy66 opened this issue Feb 9, 2019 · 0 comments
Milestone

Comments

@standy66
Copy link
Member

standy66 commented Feb 9, 2019

We need to fix the API for 1.0 release. Unfortunately, there are going to be some breaking changes ;)
Here are some of them:

  • stream_stream client call (and maybe stream_unary) should really be an async context manager: there is implicit thread of execution running that's feeding the internal send buffer with data from async iterable. If the exception occurs when sending the data (e.g. server expects 3 messages, but client sends 4), this exception should not be discarded. This is in contrast to Google's official grpc implementation, which in the example above will silently discard the exception. I do not think this is reasonable.
  • Give access to request headers and ability to respond with custom headers #4: I think I am going to make optional request argument mandatory context argument.
  • Need to expose stream-like API for those, who does not need separate execution thread for stream_stream calls, this may break something, but I am not sure.
  • Maybe we should change generated files suffix from _grpc.py to something more self-describing, like _purerpc.py

Overall, I think the API should be as close as it can get to grpcio modulo the corner cases described above.

@standy66 standy66 added this to the Release 1.0 milestone Feb 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant