mypy-protobuf icon indicating copy to clipboard operation
mypy-protobuf copied to clipboard

update to support protobuf editions

Open zwing99 opened this issue 9 months ago • 3 comments

edition = "2023";

message TestContract {
    string id = 1;
    string name_of_person = 2;
    int32 age = 3;
}

using the contract above i get this warning:

test_contracts.proto: is an editions file, but code generator protoc-gen-mypy hasn't been updated to support editions yet. Please ask the owner of this code generator to add support or switch back to proto2/proto3.

Editions seems like the go forward for protobuf and mypy is certainly the go forward for python. Any chance this tooling can be updated to support it?

zwing99 avatar Feb 06 '25 16:02 zwing99

+1 on this. Editions are the future of Protobuf, will be very helpful to have this for strong types.

wbhob avatar Feb 27 '25 02:02 wbhob

yep seems reasonable! I've definitely been a bit behind in doing updates.

Let me catch some time in between things at my startup. Bear with me.

nipunn1313 avatar Feb 27 '25 08:02 nipunn1313

Thank you — as a note, I was able to get up and running with the official protocolbuffers/pyi package. They may have a reference implementation

wbhob avatar Feb 27 '25 19:02 wbhob

Hello @nipunn1313 ! Any update on that ? Thanks :)

HenriChabert avatar Apr 23 '25 09:04 HenriChabert

Hi, any updates on this? Thanks for the great library!

oelhammouchi avatar Sep 05 '25 08:09 oelhammouchi