[issue18240] hmac unnecessarily restricts input to bytes

2013-11-12 Thread mpb

Changes by mpb mpb.m...@gmail.com:


--
nosy: +mpb

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18240
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18240] hmac unnecessarily restricts input to bytes

2013-07-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 636947fe131e by Christian Heimes in branch 'default':
Issue 18240: The HMAC module is no longer restricted to bytes and accepts
http://hg.python.org/cpython/rev/636947fe131e

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18240
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18240] hmac unnecessarily restricts input to bytes

2013-07-01 Thread Christian Heimes

Christian Heimes added the comment:

Your CLA came through and I have applied your patch. Thank you very much for 
your contribution!

--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18240
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18240] hmac unnecessarily restricts input to bytes

2013-06-24 Thread Christian Heimes

Christian Heimes added the comment:

Your account hasn't been flagged yet. I'm going to ping the person in charge.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18240
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18240] hmac unnecessarily restricts input to bytes

2013-06-18 Thread Jonas Borgström

Jonas Borgström added the comment:

Patch updated to include tests and versionchanged tags

--
Added file: http://bugs.python.org/file30637/hmac2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18240
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18240] hmac unnecessarily restricts input to bytes

2013-06-18 Thread Christian Heimes

Christian Heimes added the comment:

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/
http://www.python.org/psf/contrib/contrib-form/

--
stage: needs patch - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18240
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18240] hmac unnecessarily restricts input to bytes

2013-06-18 Thread Jonas Borgström

Jonas Borgström added the comment:

Of course. I've now signed and filed the agreement.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18240
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18240] hmac unnecessarily restricts input to bytes

2013-06-18 Thread Christian Heimes

Christian Heimes added the comment:

It may take a day or two until your signature makes it through red tape. I'll 
get back to you. :)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18240
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18240] hmac unnecessarily restricts input to bytes

2013-06-17 Thread Jonas Borgström

New submission from Jonas Borgström:

Problem:
In hmac.py there's a type check that verifies that the msg parameter is of type 
bytes().

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:
Remove that type check. hashlib will make sure str() and other invalid data 
types raises a TypeError.

--
components: Library (Lib)
messages: 191321
nosy: jborg
priority: normal
severity: normal
status: open
title: hmac unnecessarily restricts input to bytes
type: behavior
versions: Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18240
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18240] hmac unnecessarily restricts input to bytes

2013-06-17 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +christian.heimes, gregory.p.smith
stage:  - needs patch
type: behavior - enhancement
versions: +Python 3.4 -Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18240
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18240] hmac unnecessarily restricts input to bytes

2013-06-17 Thread Christian Heimes

Christian Heimes added the comment:

Good idea!

We can also lift the restriction for ``key`` a bit. It can also take a 
bytearray as argument. bytearray has translate() and supports bytes + bytearay.

--
assignee:  - christian.heimes

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18240
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18240] hmac unnecessarily restricts input to bytes

2013-06-17 Thread Jonas Borgström

Changes by Jonas Borgström jo...@borgstrom.se:


--
keywords: +patch
Added file: http://bugs.python.org/file30628/hmac.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18240
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18240] hmac unnecessarily restricts input to bytes

2013-06-17 Thread Christian Heimes

Christian Heimes added the comment:

Thanks for your patch! Please add tests for the new feature. The documentation 
needs versionchanged tags, too.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18240
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com