Skip to content
This repository was archived by the owner on Jun 9, 2025. It is now read-only.

Commit dc25c97

Browse files
Update betterproto to 0.2.1 (#37)
* Update the betterproto dependency * Switch to betterproto release * Fix typechecking
1 parent e6d75b3 commit dc25c97

File tree

12 files changed

+3411
-58
lines changed

12 files changed

+3411
-58
lines changed

poetry.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "betterproto2_compiler"
3-
version = "0.1.1"
3+
version = "0.2.0"
44
description = "Compiler for betterproto2"
55
authors = ["Adrien Vannson <[email protected]>", "Daniel G. Taylor <[email protected]>"]
66
readme = "README.md"
@@ -13,7 +13,7 @@ packages = [
1313

1414
[tool.poetry.dependencies]
1515
python = "^3.10"
16-
betterproto2 = "^0.1.3"
16+
betterproto2 = "^0.2.1"
1717
# The Ruff version is pinned. To update it, also update it in .pre-commit-config.yaml
1818
ruff = "~0.7.4"
1919
grpclib = "^0.4.1"
@@ -139,3 +139,17 @@ help = "Serve the documentation locally"
139139
[build-system]
140140
requires = ["poetry-core>=1.0.0,<2"]
141141
build-backend = "poetry.core.masonry.api"
142+
143+
# python -m grpc.tools.protoc \
144+
# --python_betterproto2_out=src/lib2 \
145+
# google/protobuf/any.proto \
146+
# google/protobuf/api.proto \
147+
# google/protobuf/duration.proto \
148+
# google/protobuf/empty.proto \
149+
# google/protobuf/field_mask.proto \
150+
# google/protobuf/source_context.proto \
151+
# google/protobuf/struct.proto \
152+
# google/protobuf/timestamp.proto \
153+
# google/protobuf/type.proto \
154+
# google/protobuf/wrappers.proto \
155+
# google/protobuf/compiler/plugin.proto

src/betterproto2_compiler/compile/importing.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
TYPE_CHECKING,
66
)
77

8-
from betterproto2.lib.google import protobuf as google_protobuf
9-
8+
from betterproto2_compiler.lib.google import protobuf as google_protobuf
109
from betterproto2_compiler.settings import Settings
1110

1211
from ..casing import safe_snake_case

src/betterproto2_compiler/known_types/any.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import betterproto2
2-
from betterproto2.lib.std.google.protobuf import Any as VanillaAny
32

4-
# TODO put back
5-
# default_message_pool = betterproto2.MessagePool() # Only for typing purpose
6-
default_message_pool = ...
3+
from betterproto2_compiler.lib.google.protobuf import Any as VanillaAny
4+
5+
default_message_pool = betterproto2.MessagePool() # Only for typing purpose
76

87

98
class Any(VanillaAny):

src/betterproto2_compiler/known_types/duration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import datetime
22

3-
from betterproto2.lib.std.google.protobuf import Duration as VanillaDuration
3+
from betterproto2_compiler.lib.google.protobuf import Duration as VanillaDuration
44

55

66
class Duration(VanillaDuration):

src/betterproto2_compiler/known_types/timestamp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import datetime
22

3-
from betterproto2.lib.std.google.protobuf import Timestamp as VanillaTimestamp
3+
from betterproto2_compiler.lib.google.protobuf import Timestamp as VanillaTimestamp
44

55

66
class Timestamp(VanillaTimestamp):

0 commit comments

Comments
 (0)