Skip to content

Commit dc89248

Browse files
committed
Update Python grpc plugin paths since grpc/grpc#39586 in 1.73.0+
1 parent 897dad6 commit dc89248

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

modules/core/internal/common.bzl

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -118,19 +118,6 @@ def python_path(s):
118118
"""
119119
return s.replace("-", "_").replace(".", "/")
120120

121-
def python_grpc_path(s):
122-
"""
123-
Convert a path string to a python import compatible path as is generated by the python grpc plugin.
124-
125-
Args:
126-
s (string): The input string to be converted.
127-
128-
Returns:
129-
(string): The converted string.
130-
131-
"""
132-
return s.replace("-", "_")
133-
134121
def php_path(s):
135122
"""
136123
Convert a path string to a php path as is generated by the php plugin.
@@ -239,8 +226,6 @@ def get_output_filename(src_file, pattern, proto_info):
239226
filename = pattern.replace("{basename|python}", python_path(basename))
240227
elif "{protopath|python}" in pattern:
241228
filename = pattern.replace("{protopath|python}", python_path(protopath))
242-
elif "{protopath|python_grpc}" in pattern:
243-
filename = pattern.replace("{protopath|python_grpc}", python_grpc_path(protopath))
244229
elif "{basename|php}" in pattern:
245230
filename = pattern.replace("{basename|php}", php_path(basename))
246231
elif "{protopath|php}" in pattern:

modules/python/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ proto_plugin(
3030
exclusions = [
3131
"google/protobuf",
3232
],
33-
outputs = ["{protopath|python_grpc}_pb2_grpc.py"],
33+
outputs = ["{protopath|python}_pb2_grpc.py"],
3434
tool = "@grpc//src/compiler:grpc_python_plugin",
3535
visibility = ["//visibility:public"],
3636
)

0 commit comments

Comments
 (0)