-
-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hmac unnecessarily restricts input to "bytes" #62440
Comments
Problem: if not isinstance(msg, bytes):
raise TypeError("expected bytes, but got %r" % type(msg).__name__) That is incorrect. The hmac module should also work with other data types as long as they are supported by the underlying hashlib module, for example bytearray() and memoryview(). Suggestion: |
Good idea! We can also lift the restriction for |
Thanks for your patch! Please add tests for the new feature. The documentation needs versionchanged tags, too. |
Patch updated to include tests and versionchanged tags |
Thanks for your update. As far as I can tell you haven't signed our contributor agreement yet. Can you please do so? http://www.python.org/psf/contrib/ |
Of course. I've now signed and filed the agreement. |
It may take a day or two until your signature makes it through red tape. I'll get back to you. :) |
Your account hasn't been flagged yet. I'm going to ping the person in charge. |
New changeset 636947fe131e by Christian Heimes in branch 'default': |
Your CLA came through and I have applied your patch. Thank you very much for your contribution! |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: