Tinkoff / invest-python

Tinkoff Invest Python gRPC client
https://tinkoff.github.io/invest-python/
Apache License 2.0
301 stars 87 forks source link

feat: update protobuf to 4.21.6 #226

Closed irusland closed 1 year ago

irusland commented 1 year ago

Refs: #222

irusland commented 1 year ago

Все литералы в протобаф файлах удалились, но заменились на _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()). Упал линтер, заигнорил. Но я потыкал, вроде все норм

daxartio commented 1 year ago

Обнови эту либу еще types-protobuf = "^3.18.2"

irusland commented 1 year ago

Поднял до types-protobuf = "^4.22.0.2" падает на poetry run mypy tinkoff examples scripts tinkoff/invest/grpc/common_pb2.pyi:6: error: Library stubs not installed for "google.protobuf.descriptor" (or incompatible with Python 3.9) tinkoff/invest/grpc/common_pb2.pyi:6: note: Hint: "python3 -m pip install types-protobuf" tinkoff/invest/grpc/common_pb2.pyi:6: note: (or run "mypy --install-types" to install all missing stub packages) tinkoff/invest/grpc/common_pb2.pyi:6: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports tinkoff/invest/grpc/common_pb2.pyi:6: error: Library stubs not installed for "google.protobuf" (or incompatible with Python 3.9) tinkoff/invest/grpc/common_pb2.pyi:7: error: Library stubs not installed for "google.protobuf.internal.enum_type_wrapper" (or incompatible with Python 3.9) tinkoff/invest/grpc/common_pb2.pyi:7: error: Library stubs not installed for "google.protobuf.internal" (or incompatible with Python 3.9) tinkoff/invest/grpc/common_pb2.pyi:8: error: Library stubs not installed for "google.protobuf.message" (or incompatible with Python 3.9)

irusland commented 1 year ago

Поручилось максимум до 3.20.4.6 поднять

daxartio commented 1 year ago

Поручилось максимум до 3.20.4.6 поднять

Попробуй вообще удалить mypy-protobuf

Судя по твоей ошибке, там будто types-protobuf вообще не поставилось