googleapis / gapic-generator-python

Generate Python API client libraries from Protocol Buffers.
Apache License 2.0
119 stars 67 forks source link

Remove workaround in `google-cloud-trace` and `google-cloud-kms` and `google-cloud-dataflow-client` #1840

Open parthea opened 10 months ago

parthea commented 10 months ago

Similarly, set is not listed as a reserved term in gapic-generator-python here. There is a client specific workaround in owlbot.py for google-cloud-dataflow-client to add set as a reserved term. We should consider removing the workaround, which will result in a breaking change for google-cloud-dataflow-client. See https://github.com/googleapis/python-dataflow-client/blob/7d8797710d717094b71250dabe9c50a1eaa5dea8/owlbot.py#L39-L45

    # Work around to avoid a breaking change
    # Replace `set` with `set_` 
    s.replace(
        library / "google/cloud/dataflow_v1beta3/types/metrics.py",
        "set \(google.protobuf.struct_pb2.Value\)",
        "set_ (google.protobuf.struct_pb2.Value)",
    )
parthea commented 10 months ago

I'm going to transfer this issue to gapic-generator-python to determine if there are other solutions before we take a breaking change in these libraries.