From 5064a989ce281b6273ab6d5b65484039031c28ac Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Tue, 15 Oct 2024 14:20:30 +0000 Subject: [PATCH] fix: fix 'Couldn't build proto file' when using Python 3.13 --- proto/enums.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/enums.py b/proto/enums.py index 6207ad7d..7d016611 100644 --- a/proto/enums.py +++ b/proto/enums.py @@ -74,7 +74,7 @@ def __new__(mcls, name, bases, attrs): descriptor_pb2.EnumValueDescriptorProto(name=name, number=number) # Minor hack to get all the enum variants out. for name, number in attrs.items() - if isinstance(number, int) + if name in attrs.member_names and isinstance(number, int) ), key=lambda v: v.number, ),