Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#12362 closed (fixed)

hmac.new changed signature between python 2.4 and 2.5

Reported by: Jeremy Dunck Owned by: nobody
Component: Contrib apps Version: dev
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Basically, in 2.4, hmac.new expects digestmod to be an object with a
callable .new().

In 2.5, it expects just a callable.

hashcompat supplied a callable (only) in both cases.

I added *_hmac to hashcompat to make hmac.new work in both cases.

Patch attached; it's tiny.

Attachments (1)

messages-hmac-py2.4.diff (1.7 KB ) - added by Jeremy Dunck 14 years ago.
Existing python 2.4 tests cover this, so no new tests are needed.

Download all attachments as: .zip

Change History (3)

by Jeremy Dunck, 14 years ago

Attachment: messages-hmac-py2.4.diff added

Existing python 2.4 tests cover this, so no new tests are needed.

comment:1 by Russell Keith-Magee, 14 years ago

Resolution: fixed
Status: newclosed

(In [11814]) Fixed #12362 -- Corrected Python 2.4 incompatibility with hmac constructor in contrib.messages. Thanks to Jeremy Dunck for the report and patch.

comment:2 by Jacob, 13 years ago

milestone: 1.2

Milestone 1.2 deleted

Note: See TracTickets for help on using tickets.
Back to Top