client_python icon indicating copy to clipboard operation
client_python copied to clipboard

Allow to return str instead bytes from generate_latest()

Open stalkerg opened this issue 1 year ago • 2 comments

Because converting to bytes anyway happened at the end of function, have sense to return str instead bytes or have options to avoid extra transformation. (many API expected str)

stalkerg avatar Oct 09 '24 09:10 stalkerg

I think the ship has sailed on this, any uses of generate_latest today will be using bytes and changing the return type would be a significant breaking change.

csmarchbanks avatar Oct 14 '24 14:10 csmarchbanks

I think we can create a new function generate_latest_b() and return bytes, and original function will just call new function and convert to string. Seems like the current behavior comes from Python2 era.

stalkerg avatar Oct 15 '24 08:10 stalkerg