Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#12362 closed (fixed)

hmac.new changed signature between python 2.4 and 2.5

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

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 jdunck 6 years ago.
Existing python 2.4 tests cover this, so no new tests are needed.

Download all attachments as: .zip

Change History (3)

Changed 6 years ago by jdunck

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

comment:1 Changed 6 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

(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 Changed 4 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

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