From 3099991c756fd875024f06b1a043a1843596bf18 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..769b6d83 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, ),