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
d31f90be6b
Combine circular imports
2020-06-04 00:11:22 +02:00
boukeversteegh
919b0a6a7d
Check if betterproto has wrapper support in idiomatic way
2020-06-04 00:02:28 +02:00
boukeversteegh
7ecf3fe0e6
Add comment to explain unusual import location
2020-06-04 00:02:28 +02:00
Bouke Versteegh
ff14948a4e
Use raw string for regex
...
Co-authored-by: nat <nat.noordanus@gmail.com>
2020-06-04 00:02:28 +02:00
Bouke Versteegh
cb00273257
Fix name PROTOBUF_OPTS -> BETTERPROTO_OPTS
2020-06-04 00:02:28 +02: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
boukeversteegh
b813d1cedb
Undo adding skip to test
2020-06-03 23:59:10 +02:00
boukeversteegh
f5ce1b7108
Check that config.xfail contains valid test case names
2020-06-03 23:59:10 +02:00
boukeversteegh
62fc421d60
Add failing tests for google.protobuf Struct and Value #9
2020-06-03 23:59:10 +02:00
boukeversteegh
eeed1c0db7
Extend pre-compiled Duration and Timestamp instead of manual definition
2020-06-03 23:58:47 +02:00
boukeversteegh
2a3e1e1827
Add basic support for all google.protobuf types
2020-06-03 23:58:47 +02:00
boukeversteegh
53ce1255d3
Do not unwrap google.protobuf.Value and unsupported wrapper types
2020-06-03 23:58:47 +02:00
boukeversteegh
e8991339e9
Use pre-compiled wrapper-classes
2020-06-03 23:54:43 +02:00
boukeversteegh
4556d67503
Include pre-compiled google protobuf classes
2020-06-03 23:54:43 +02:00
boukeversteegh
f087c6c9bd
Support compiling google protobuf files
2020-06-03 23:54:43 +02:00
Bouke Versteegh
eec24e4ee8
Merge pull request #77 from danielgtaylor/nat-n-patch-1
...
Rearrange plugin import to make import errors more helpful
2020-05-30 20:52:35 +02:00
nat
91111ab7d8
Make plugin import errors more helpful
...
This addresses an issue where if the user happens to have black installed in
their environment but not the other dependencies when running the protoc
plugin then the resulting import error (No module named 'google') is not very
helpful.
2020-05-30 16:08:36 +02:00
Bouke Versteegh
fcff3dff74
Merge pull request #62 from jameslan/perf/cache-fields
...
Cache field metadata, to avoid calling `dataclasses.fields` to get more than 10% performance improvement
2020-05-29 12:17:25 +02:00
Bouke Versteegh
5c4969ff1c
Merge pull request #69 from boukeversteegh/pr/bugreports
...
Bugreports
2020-05-28 09:07:11 +02:00
James Lan
ed33a48d64
Cache field metadata, to avoid calling dataclasses.fields
to get more than 10% performance improvement
2020-05-27 15:58:14 -07:00
nat
ee362a7a73
Merge pull request #73 from nat-n/always_black
...
Bump version to 1.2.5
v1.2.5
2020-05-27 13:37:54 +02:00
nat
261e55b2c8
Merge pull request #72 from nat-n/always_black
...
Make CI check formatting is black & append .j2 suffix to template.py
2020-05-27 12:27:33 +02:00
Nat Noordanus
98930ce0d7
Bump version to 1.2.5
2020-05-27 12:04:53 +02:00
Nat Noordanus
d7d277eb0d
Remove typo from Pipfile and update Pipfile.lock
2020-05-27 11:52:18 +02:00
Nat Noordanus
3860c0ab11
Add task to run black --check in ci & update README
2020-05-27 11:52:10 +02:00
Nat Noordanus
cd1c2dc3b5
Rename template file to avoid confusing black or other build tools
2020-05-27 11:25:19 +02:00
Nat Noordanus
be2a24d15c
blacken
2020-05-27 11:25:00 +02:00
Vasilios Syrakis
a5effb219a
Release 1.2.4 ( #71 )
...
Co-authored-by: nat <n@natn.me>
v1.2.4
2020-05-26 22:17:55 +02:00
boukeversteegh
b354aeb692
Add dict to list of built-types for #53
2020-05-26 10:09:58 +02:00
boukeversteegh
6d9e3fc580
Add issue references to failing test cases
2020-05-25 23:43:01 +02:00
boukeversteegh
72de590651
Remove unused proto file
2020-05-25 23:36:09 +02:00
boukeversteegh
3c70f21074
#70 Messages should allow fields that are Python keywords
2020-05-25 23:36:08 +02:00
boukeversteegh
4b7d5d3de4
#53 Crash when field has the same name as a system type
2020-05-25 22:23:39 +02:00
Bouke Versteegh
2d57f0d122
Merge pull request #67 from danielgtaylor/nat-n-patch-1
...
Enforce utf-8 for reading the readme in setup.py
2020-05-25 21:57:12 +02:00
boukeversteegh
142e976c40
Add extra related test cases for #11
2020-05-25 21:56:03 +02:00
boukeversteegh
382fabb96c
#11 ALL_CAPS message fields are parsed incorrectly
2020-05-25 21:50:30 +02:00
boukeversteegh
18598e77d4
Remove renamed service from test input config
2020-05-25 21:38:14 +02:00
boukeversteegh
6871053ab2
#9 Import bug - returning well known type Empty from service
2020-05-25 21:21:33 +02:00
boukeversteegh
5bb6931df7
#25 Two packages with the same name suffix should not cause naming conflict
2020-05-25 21:15:39 +02:00
boukeversteegh
e8a9960b73
Move configuration of test-cases to config file, include list of service tests
2020-05-25 21:11:33 +02:00
boukeversteegh
f25c66777a
#68 Service input messages are not imported
2020-05-25 18:48:42 +02:00
nat
a68505b80e
Enforce utf-8 for reading the readme
...
Fixes failing installation issue #66
2020-05-25 17:53:13 +02:00
nat
2f9497e064
Merge pull request #55 from boukeversteegh/pr/xfail-tests
...
Add intentionally failing test-cases for unimplemented bug-fixes
2020-05-25 09:54:26 +02:00
boukeversteegh
33964b883e
Do not use mutable defaults
2020-05-25 00:35:43 +02:00
boukeversteegh
ec7574086d
Add xfail test-case to for future circular dependency scenario
2020-05-24 20:35:10 +02:00
boukeversteegh
8a42027bc9
Improve failing test-case for issue #64
2020-05-24 20:33:48 +02:00