You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cat filedata.proto
syntax = "proto3";
package filedata;
message FileData {
uint32 FRAGMENT_NR = 1;
bytes DATA = 2;
uint64 UID = 3;
}
$ protoc --python_betterproto_out . filedata.proto
Writing __init__.py
Writing filedata.py
$ cat filedata.py
# Generated by the protocol buffer compiler. DO NOT EDIT!
# sources: filedata.proto
# plugin: python-betterproto
from dataclasses import dataclass
import betterproto
@dataclass
class FileData(betterproto.Message):
f_r_a_g_m_e_n_t__n_r: int = betterproto.uint32_field(1)
d_a_t_a: bytes = betterproto.bytes_field(2)
u_i_d: int = betterproto.uint64_field(3)
protoc 3.6.1
betterproto 1.2.2 (installed through pip)
python 3.7.3
I assume this has something to do with the parser thinking they are enums?
Rewriting our schema is unfortunately not an option, it's made to be backwards-compatible and encompasses thousands of fields over several hundred message types.
The text was updated successfully, but these errors were encountered:
I assume this has something to do with the parser thinking they are enums?
Rewriting our schema is unfortunately not an option, it's made to be backwards-compatible and encompasses thousands of fields over several hundred message types.
The text was updated successfully, but these errors were encountered: