Code review comment for lp:~diane-trout/dkimpy/python3

Revision history for this message
Stuart Gathman (stuart-gathman) wrote :

Revision 110 adds the changes from Diane that are still applicable. Both python2.7 and python3.4 pass unit tests now.

I am not happy that *all* of the API is bytes. For instance, the canonicalization options should be str, not bytes. The header names for frozen_sign, should_not_sign, etc, should be str. But, of course, email messages must be bytes.

I introduced a text(s) function that converts the bytes/str/unicode argument to str (as defined by python version). If text is a little more efficient (and I just remembered I can define one of 2 versions dynamically), we can use that to lookup header names in those config fields, and change them back to str instead of bytes.

« Back to merge proposal