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

Remove @dataclass, add slots #144

Closed
wants to merge 88 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
64da80a
First go at dataslots
Gobot1234 Aug 24, 2020
0d6ced5
Implement Message.__bool__ for #130
Gobot1234 Aug 24, 2020
7746b91
Add a test for it
Gobot1234 Aug 24, 2020
42cd924
Custom Metaclass that removes need for @dataclass
Gobot1234 Aug 27, 2020
955bbb3
Revert private attributes
Gobot1234 Aug 27, 2020
1597c48
Delete utils.py
Gobot1234 Aug 27, 2020
f81d8cd
Remove brackets
Gobot1234 Aug 27, 2020
1b66467
Cleanup
Gobot1234 Aug 27, 2020
5056997
See if this fixes stuff
Gobot1234 Aug 27, 2020
62de49c
Remove debug print
Gobot1234 Aug 27, 2020
397c6b0
Update template.py.j2
Gobot1234 Aug 27, 2020
16cdaa8
Some bugfixes/optimizations
Gobot1234 Aug 27, 2020
8353b24
Misc comments
Gobot1234 Aug 27, 2020
5373229
Fixes
Gobot1234 Aug 28, 2020
b08a036
Optimize init
Gobot1234 Aug 29, 2020
86a9726
Fix typing
Gobot1234 Aug 29, 2020
18a0ea0
More fixes
Gobot1234 Aug 29, 2020
f0fb3d1
Remove dataclass
Gobot1234 Aug 29, 2020
18d5ec9
Bug fixes
Gobot1234 Aug 29, 2020
13fc75d
Blacken
Gobot1234 Aug 29, 2020
1a07d3b
Couple of small tweaks
Gobot1234 Aug 29, 2020
adc7eba
Merge branch 'master' into dataslots
Gobot1234 Sep 1, 2020
3ff8213
Blacken + tweak
Gobot1234 Sep 1, 2020
2d757fc
Blacken again
Gobot1234 Sep 1, 2020
53a7df0
Merge branch 'master' into master
Gobot1234 Sep 2, 2020
9da923d
Blacken
Gobot1234 Sep 2, 2020
12ae52a
Fixes
Gobot1234 Sep 2, 2020
854325f
Fixes
Gobot1234 Sep 2, 2020
8d62106
Fix arg/kwarg handling
Gobot1234 Sep 2, 2020
90ac7a6
Fix recursive messages & blacken
Gobot1234 Sep 2, 2020
6461109
Final fix?
Gobot1234 Sep 2, 2020
6bc4a35
Final final fix
Gobot1234 Sep 2, 2020
1067b46
Respond to self comments
Gobot1234 Sep 3, 2020
6e21f64
More speed improvements and final changes
Gobot1234 Sep 7, 2020
17e31f4
Update tests
Gobot1234 Sep 19, 2020
a53d805
Fix bool
Gobot1234 Sep 19, 2020
b3b7c00
Fix failing tests
Gobot1234 Sep 19, 2020
a3f5f21
Add benchmarks (#148)
adriangb Sep 19, 2020
58556e0
Update README with example of calling protoc from python (#149)
spacecowboy Sep 19, 2020
d3e4fbb
Add Documentation (#125)
Gobot1234 Sep 20, 2020
4630c1c
bump grpclib to 0.4.1 (#150)
jck Sep 23, 2020
bf9412e
Use poetry-core as PEP 517 build backend (#108)
abn Oct 1, 2020
8f7af27
QOL fixes (#141)
Gobot1234 Oct 17, 2020
4a4429d
Update docs
Gobot1234 Oct 19, 2020
48e80cf
Merge branch 'master' into master
Gobot1234 Oct 19, 2020
99183bf
First go at dataslots
Gobot1234 Aug 24, 2020
a8fb99b
Custom Metaclass that removes need for @dataclass
Gobot1234 Aug 27, 2020
7d67deb
Revert private attributes
Gobot1234 Aug 27, 2020
eab6124
Delete utils.py
Gobot1234 Aug 27, 2020
a179f9b
Remove brackets
Gobot1234 Aug 27, 2020
4ecfd5b
Cleanup
Gobot1234 Aug 27, 2020
7e4ab04
See if this fixes stuff
Gobot1234 Aug 27, 2020
d4f8330
Remove debug print
Gobot1234 Aug 27, 2020
b6be561
Update template.py.j2
Gobot1234 Aug 27, 2020
da8d705
Some bugfixes/optimizations
Gobot1234 Aug 27, 2020
c0771e1
Misc comments
Gobot1234 Aug 27, 2020
9891960
Fixes
Gobot1234 Aug 28, 2020
cc71df2
Optimize init
Gobot1234 Aug 29, 2020
030756f
Fix typing
Gobot1234 Aug 29, 2020
75b927d
More fixes
Gobot1234 Aug 29, 2020
565531a
Remove dataclass
Gobot1234 Aug 29, 2020
a22030c
Bug fixes
Gobot1234 Aug 29, 2020
9f0b5bf
Blacken
Gobot1234 Aug 29, 2020
c7159ea
Couple of small tweaks
Gobot1234 Aug 29, 2020
29c3ad9
Blacken + tweak
Gobot1234 Sep 1, 2020
8b35c1e
Blacken again
Gobot1234 Sep 1, 2020
bdc1f46
Fixes
Gobot1234 Sep 2, 2020
23728fe
Fixes
Gobot1234 Sep 2, 2020
4e99449
Fix arg/kwarg handling
Gobot1234 Sep 2, 2020
008c0d3
Fix recursive messages & blacken
Gobot1234 Sep 2, 2020
6f74c5d
Final fix?
Gobot1234 Sep 2, 2020
8ed2805
Final final fix
Gobot1234 Sep 2, 2020
35c4ee4
Respond to self comments
Gobot1234 Sep 3, 2020
68ae143
More speed improvements and final changes
Gobot1234 Sep 7, 2020
86d7c30
Add __bool__ to special members
Gobot1234 Oct 20, 2020
a304628
Respond to some of the comments
Gobot1234 Oct 20, 2020
14748ae
Merge remote-tracking branch 'origin/dataslots' into dataslots
Gobot1234 Oct 20, 2020
5c8e926
Update __init__.py
Gobot1234 Oct 20, 2020
fec636a
Hmm
Gobot1234 Oct 25, 2020
31579f6
Fix broken branch
Gobot1234 Oct 25, 2020
f10bec4
Simplify bool
Gobot1234 Oct 27, 2020
f48080b
Fix broken branch P2 but with changes and a better structure
Gobot1234 Nov 7, 2020
5e005d3
Fix function
Gobot1234 Nov 7, 2020
ff712f7
Update stuff for slack in case anyone looks
Gobot1234 Nov 7, 2020
529c488
Whoops
Gobot1234 Nov 7, 2020
50949b5
Merge branch 'master' into dataslots
Gobot1234 Nov 7, 2020
3d0fca6
Fix tests and benchmarks
Gobot1234 Nov 7, 2020
222a105
Fix tests
Gobot1234 Nov 7, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/betterproto/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
all_sentinel = True # Keep track of whether every field was default
group_current: Dict[str, str] = {}

for field in self.__raw_get(dataclasses._FIELDS).values():
Gobot1234 marked this conversation as resolved.
Show resolved Hide resolved
for field in self.__raw_get(dataclasses ._FIELDS).values():
# We have to set these here to allow for them to be editable
set_attribute(field.name, field.default)

Expand Down