Bouke Versteegh
8864f4fdbd
Merge pull request #103 from boukeversteegh/fix/service-input-message
...
Fix - No arguments are generated for stub methods when using `import` with proto definition
2020-07-10 22:55:05 +02:00
Arun Babu Neelicattu
03211604bc
Replace dependency on protoc with grpcio-tools
...
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.
2020-07-10 13:16:40 +02:00
Bouke Versteegh
8bcb67b66f
Merge pull request #81 from discord/serialized_on_wire_repeated
...
Always set serialized_on_wire for all parsed message fields
2020-07-08 23:10:14 +02:00
boukeversteegh
72d72b4603
Merge remote-tracking branch 'daniel/master' into fix/service-input-message
...
# Conflicts:
# betterproto/plugin.py
2020-07-08 23:00:32 +02:00
Bouke Versteegh
3273ae4d2c
Merge pull request #100 from boukeversteegh/fix/circular-dependencies
...
Import bug - Circular Dependencies
2020-07-07 21:45:06 +02:00
Arun Babu Neelicattu
0f3ad25770
Minor non-functional changes
...
- fix few typos
- remove unused imports
- fix minor code-quality issues
- replace `grpclib._protocols` with `grpclib._typing`
- fix boolean and None assertions in test cases
2020-07-07 19:23:38 +02:00
boukeversteegh
3f519d4fb1
Fixes #23 again, a broken test made it seem the issue was fixed before.
2020-07-05 17:14:53 +02:00
boukeversteegh
23dcbc2695
Fixes circular import problem when a non-circular dependency triangle is flattened into two python packages
2020-07-04 15:49:55 +02:00
boukeversteegh
0af0cf4bfb
Fixes circular import problem when a non-circular dependency triangle is flattened into two python packages
2020-07-04 15:35:42 +02:00
boukeversteegh
f4ebcb0f65
Merge remote-tracking branch 'daniel/master' into fix/imports
...
# Conflicts:
# Pipfile
# README.md
# betterproto/__init__.py
# betterproto/plugin.py
# betterproto/tests/util.py
2020-07-01 12:19:25 +02:00
boukeversteegh
81711d2427
Avoid naming conflicts when importing multiple types with the same name from an ancestor package
2020-07-01 12:07:59 +02:00
boukeversteegh
e3135ce766
Add parameter for non-strict cased output that preserves delimiter count
2020-07-01 09:39:37 +02:00
nat
0c5d1ff868
Merge branch 'master' into client-streaming
2020-06-23 22:02:23 +02:00
Bouke Versteegh
5fb4b4b7ff
Merge pull request #75 from nat-n/add_poetry
...
Switch from pipenv to poetry
2020-06-23 21:59:46 +02:00
nat
5c9a12e2f6
Merge pull request #1 from boukeversteegh/client-streaming-tests
...
Client streaming tests
2020-06-16 19:36:40 +02:00
Nat Noordanus
e1ccd540a9
Fix bugs and remove footgun feature in AsyncChannel
2020-06-16 00:07:28 +02:00
nat
4e78fe9579
Merge branch 'client-streaming' into client-streaming-tests
2020-06-15 23:42:01 +02:00
Nat Noordanus
50bb67bf5d
Fix bugs and remove footgun feature in AsyncChannel
2020-06-15 23:35:56 +02:00
Bouke Versteegh
1ecbf1a125
Merge pull request #90 from jameslan/fix/fixed-types
...
fixed field types should be int
2020-06-15 19:48:31 +02:00
boukeversteegh
0814729c5a
Add cases for send()
2020-06-15 18:14:13 +02:00
boukeversteegh
f7aa6150e2
Add test-cases for client stream-stream
2020-06-15 18:02:37 +02:00
Nat Noordanus
3185c67098
Improve generate script
...
- Fix issue with __pycache__ dirs getting picked up
- parallelise code generation with asyncio for 3x speedup
- silence protoc output unless -v option is supplied
- Use pathlib ;)
2020-06-15 00:19:07 +02:00
boukeversteegh
52eea5ce4c
Added missing tests for casing
2020-06-14 23:15:56 +02:00
Nat Noordanus
4b6f55dce5
Finish implementation and testing of client
...
Including stream_unary and stream_stream call methods.
Also
- improve organisation of relevant tests
- fix some generated type annotations
- Add AsyncChannel utility cos it's useful
2020-06-14 23:04:52 +02:00
boukeversteegh
fdbe0205f1
find_module docstring and search for init files instead of directories
2020-06-14 22:54:03 +02:00
Nat Noordanus
09f821921f
Move ServiceStub to a seperate module and add more rpcs to service test
2020-06-14 22:19:51 +02:00
boukeversteegh
e2d672a422
Fix terminology, improve docstrings and add missing asserts to tests
2020-06-14 21:40:12 +02:00
James Lan
04dce524aa
fixed field types should be int
2020-06-12 17:04:56 -07:00
Nat Noordanus
8edec81b11
Switch from pipenv to poetry
...
- 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
2020-06-12 21:13:55 +02:00
boukeversteegh
5d2f3a2cd9
Remove fixed test from xfail list #11
2020-06-11 13:55:12 +02:00
boukeversteegh
34c34bd15a
Add failing test for importing a message from package that looks like a nested type #87
2020-06-11 13:55:12 +02:00
boukeversteegh
fb54917f2c
Detect entry-point of tests automatically
2020-06-11 13:55:12 +02:00
boukeversteegh
1a95a7988e
Ensure uniquely generated import aliases are not name mangled (python.org/dev/peps/pep-0008/#id34)
2020-06-11 13:55:11 +02:00
boukeversteegh
76db2f153e
Add import aliases to ancestor imports
2020-06-11 13:55:11 +02:00
boukeversteegh
3105e952ea
Fixes issue where importing cousin where path has a package with the same name broke import
2020-06-11 13:55:11 +02:00
boukeversteegh
7c8d47de6d
Add test cases for cousin imports that break due to aliases starting with two underscores
2020-06-11 13:55:11 +02:00
boukeversteegh
f7c2fd1194
Support nested messages, fix casing. Support test-cases in packages.
2020-06-11 13:55:11 +02:00
boukeversteegh
d8abb850f8
Update tests to reflect new generated package structure
2020-06-11 13:55:11 +02:00
boukeversteegh
d7ba27de2b
fix all broken imports
2020-06-11 13:55:11 +02:00
boukeversteegh
57523a9e7f
Implement importing unrelated package
2020-06-11 13:55:11 +02:00
boukeversteegh
e5e61c873c
Implement some import scenarios
2020-06-11 13:55:11 +02:00
boukeversteegh
9fd1c058e6
Create unit tests for importing
2020-06-11 13:55:11 +02:00
Danny Weinberg
28a288924f
Change to have parse
*always* set serialized_on_wire
2020-06-04 16:20:32 -07:00
Danny Weinberg
5c700618fd
Black again lol
2020-06-04 13:42:43 -07:00
Danny Weinberg
a914306f33
Put test into test_features
, simplify to call parse
directly
2020-06-04 13:42:07 -07:00
Danny Weinberg
67422db6b9
Fix formatting
2020-06-04 11:34:20 -07:00
Danny Weinberg
061bf86a9c
Set serialized_on_wire when message contains only lists
...
This fixes a bug where serialized_on_wire was not set when a message contained only repeated values (eg in a list or map). The fix here is to just set it to true in the `parse` method as soon as we receive any valid data. This also adds a test to expose the behavior.
2020-06-04 11:04:36 -07:00
boukeversteegh
973d68a154
Add missing field to MockChannel to prevent warnings while testing
2020-06-04 00:02:28 +02:00
boukeversteegh
ab9857b5fd
Add test-case for service that returns google protobuf values
2020-06-04 00:02:28 +02:00
boukeversteegh
2f658df666
Use betterproto wrapper classes, extract to module for testability
2020-06-04 00:02:28 +02:00