Jens Tröger

Results 121 comments of Jens Tröger

Thanks @nipunn1313! I’ve not looked through the code yet but do you prefer a PR contribution or is that a change you’ll make yourself?

Thanks @nipunn1313, that makes sense. I’ve been using Python Enums but the extra layer of mapping from protobuf `int` to Python Enum turned out to be bothersome — so I’m...

> Hi. I think `EnumTypeWrapper` may not be what you think it is. It is not a subclass of int. Sorry, I misread the `Generic[int]` use in the type annotation...

> in your example, I think you want this: > > ``` > def foo(pb2_enum_type: EnumTypeWrapper): > ``` Heh… that’s where it all started 😉 If I run this ```python...

> Hence I think in your code, in order for it to work, you would need to use `_EnumTypeWrapper[V]` as your common base type. @nipunn1313 I think your suggestion actually...

> In python3.10 and up, type annotations aren't executed at runtime. `from __future__ import annotations` gets you this behavior in earlier versions of python3 (3.7 and up I think) I’m...

We’ve seen a similar failure when sending a JSON boolean to gRPC fields declared as `optional string`: ``` 2024-01-16 18:11:18.615 2024/01/17 02:11:18 [error] 1249#0: *1606 [kong] init.lua:354 [grpc_gateway] /usr/local/share/lua/5.1/kong/plugins/grpc_gateway/deco.lua:383: bad...

> A [contributing PR](https://github.com/Kong/kong/blob/master/CONTRIBUTING.md) would be welcome, as we've not been able to make fixing this issue a priority to us at this point. Thanks @hanshuebner. I’m currently following the...

> Linux is a safe choice for development purposes in any case. I think I’ll stick with that for the time being. Developing inside of a Ubuntu container is stable?...

Duplicated by https://github.com/PyCQA/pydocstyle/issues/635 Also related to _functions_ decorated with [@overload](https://docs.python.org/3/library/typing.html#typing.overload): ```python @typing.overload def encrypt(cipher: Cipher, data: str) -> str: # noqa: D103 ... @typing.overload def encrypt(cipher: Cipher, data: bytes) ->...