Removed the parts of the example that showed accessing an unset value, as it now raises an `AttributeError`, and added an example of the `match` way of accessing the attributes.
Related to #510 and #358.
This means the betterproto plugin no longer needs to depend durectly on
protobuf.
This requires a small runtime hack to monkey patch some google types to
get around the fact that the compiler uses proto2, but betterproto
expects proto3.
Also:
- regenerate google.protobuf package
- fix a regex bug in the logic for determining whether to use a google
wrapper type.
- fix a bug causing comments to get mixed up when multiple proto files
generate code into a single python module
* re-implement README gRPC client example to be a self-contained script
- fix a syntax error
- fix a usage error
* asyncio.run() was added in 3.7
- this lib targets >= 3.6
* Apply suggestions from code review
Optimized imports, store RPC call result before printing
Co-authored-by: Arun Babu Neelicattu <arun.neelicattu@gmail.com>
* add entry-point check to example
Co-authored-by: Arun Babu Neelicattu <arun.neelicattu@gmail.com>
This change removes the dependency on platform provided protobuf tools
in favour of `grpcio-tools` dependency. This makes both development and
compiler use independent from platform dependencies.
- dropped dev dependency on rope, isort & flake
- poetry doesn't support dev scripts like pipenv, so create a makefile instead
- Add pytest-cov
- Use tox for testing multiple python versions in CI
- Update README
Update ci workflow
Changes:
- Update config and docs to reference 3.6
- Add backports of dataclasses and datetime.fromisoformat for python_version<"3.7"
- Support both 3.7 and 3.6 usages of undocumented __origin__ attribute on typing objects
- Make github ci run tests for python 3.6 as well