Allow keys of type "bytes" in Python 3 - #39
Conversation
Allow keys of type "bytes" in Python 3
|
@cjlarose thanks! |
|
@progrium tagged and bumped up a new version that includes this. Should be ready to publish. |
|
Sweet! Thanks! |
|
Was this published to PyPi? Looks like 0.2.1 is the current version on the index instead of 0.2.2 |
|
@progrium can you publish latest version to PyPI? If you'd like to add me as a maintainer I could publish releases as well. |
|
Ah, that'd be helpful. What's your PyPI username? On Fri, Oct 10, 2014 at 7:30 AM, José Padilla notifications@github.com
Jeff Lindsay |
|
@progrium my PyPI username is jpadilla |
|
Added! Release away. On Tue, Oct 14, 2014 at 6:17 AM, José Padilla notifications@github.com
Jeff Lindsay |
|
@cjlarose released this as 0.2.3. Already on PyPI. Thanks again! |
|
Thanks!
|
Recall that in Python 2,
bytesis just an alias forstr, and is therefore abasestring. In Python 3,bytesis not abasestring, but still a perfectly acceptable input tohmac.new. The functionprepare_HS_keyas defined before, however, always assumed the key was abasestring. All tests pass in both Python 2.7 and Python 3.4.