nsscache icon indicating copy to clipboard operation
nsscache copied to clipboard

Properly define byte vs string types in source and cache api boundaries

Open jaqx0r opened this issue 5 years ago • 0 comments

While doing the python3 conversion I realised that the data handlers never cared about encodings and now we've got a mix of ascii and utf8 encodings between sources and caches. I'd like to formally state what types go where and enforce it.

For example, is nssdb a utf8 compatible cache? Or does it have to be ascii only? I think OpenLDAP, Samba4, etc allow utf8?

Should the Updater deal in Python str types and convert to bytes or deal with bytes only and avoid any encoding at all?

Once decided on, can pytype annotations force us to get conforming code?

jaqx0r avatar Nov 01 '19 00:11 jaqx0r