-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Workspace log proto uses Python reserved keyword #6887
Copy link
Copy link
Closed
Labels
P2We'll consider working on this in future. (Assignee optional)We'll consider working on this in future. (Assignee optional)team-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.External dependency handling, remote repositiories, WORKSPACE file.type: feature request
Description
ATTENTION! Please read and follow:
- if this is a question about how to build / test / query / deploy using Bazel, ask it on StackOverflow instead: https://stackoverflow.com/questions/tagged/bazel
- if this is a discussion starter, send it to bazel-discuss@googlegroups.com
- if this is a bug or feature request, fill the form below as best as you can.
Description of the problem / feature request:
Workspace log proto uses Python reserved keyword
Feature requests: what underlying problem are you trying to solve with this feature?
The protobuf field here is named from: https://source.bazel.build/bazel/+/master:src/main/java/com/google/devtools/build/lib/bazel/debug/workspace_log.proto;l=84?q=WorkspaceEvent.
message SymlinkEvent {
// path to which the symlink will point to
string from = 1;
// path of the symlink
string to = 2;
}
Since from is a keyword, Python protobuf users can't use this field.
python
Python 2.7.12 (default, Nov 12 2018, 14:36:49)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> a = object()
>>> a.from = object()
File "<stdin>", line 1
a.from = object()
^
SyntaxError: invalid syntax
See https://stackoverflow.com/questions/30142750/reserved-keyword-is-used-in-protobuf-in-python for more context.
Could these be renamed to from_path and to_path, and the old uses be removed?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2We'll consider working on this in future. (Assignee optional)We'll consider working on this in future. (Assignee optional)team-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.External dependency handling, remote repositiories, WORKSPACE file.type: feature request