slbotbm commented on PR #3613: URL: https://github.com/apache/iggy/pull/3613#issuecomment-4916832537
@hubcio @jiengup I was thinking that maybe we should change the signature of the headers from `dict[str, str | bytes | bool | int | float] | None` to `dict[str, str | bytes | bool | int | float] | dict[HeaderKey, HeaderValue] | None`, where `HeaderKey` and `HeaderValue` are python classes mirroring rust and expose subclasses like `HeaderKey.String(value)` and `HeaderValue.UnsignedInt128(value)`, etc.. This would allow us to have two advantages: users that do not have much experience/do not require explicit control can use `dict[str, str | bytes | bool | int | float]`, while users that require precise control on the types of headers can use `dict[HeaderKey, HeaderValue]`. Also, by providing `dict[HeaderKey, HeaderValue]` as an option, we allow AI Agents to make less mistakes as compared to `dict[str, str | bytes | bool | int | float]`, which is a little vague from the agents' point of view. What do you guys think? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
