mechmotum / cyipopt

Cython interface for the interior point optimzer IPOPT
Eclipse Public License 2.0
227 stars 54 forks source link

Improve string formatting #241

Open chrhansk opened 9 months ago

chrhansk commented 9 months ago

This is an experiment consisting of the following parts:

Let me know what you think. I hope porting from bytes to string does not break compatibility.

moorepants commented 9 months ago

If anyone uses the bytes strings, for example parse it to know what message they got, then this would break things. For example if you have log_message.decode('utf-8') and then we swap to a regular string, that will break. I'm not sure how much this may happen in the wild, but we do risk breaking downstream code without a deprecation. I do think it would be nice to have these as strings, but maybe we should first issue a warning that these will change and maybe even provide a snippet that will handle either output so people could prepare their code.