Opened 16 years ago

Closed 16 years ago

#7354 closed (fixed)

pickle.dumps on formwizard fails in python2.3 because of keyword argument

Reported by: mage Owned by: nobody
Component: contrib.formtools Version: dev
Severity: Keywords: wizard pickle
Cc: marijn@… 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

The summary says it all:

Traceback:
File "/usr/lib/python2.3/site-packages/django/core/handlers/base.py" in get_response
82. response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.3/site-packages/django/contrib/formtools/wizard.py" in __call__
95. return self.render(form, request, current_step)
File "/usr/lib/python2.3/site-packages/django/contrib/formtools/wizard.py" in render
108. prev_fields.append(hidden.render(hash_name, old_data.get(hash_name, self.security_hash(request, old_form))))
File "/usr/lib/python2.3/site-packages/django/contrib/formtools/wizard.py" in security_hash
152. pickled = pickle.dumps(data, protocol=pickle.HIGHEST_PROTOCOL)
 
Exception Type: TypeError at /snelboeken/
Exception Value: dumps() takes no keyword arguments

this can be fixed easily by changing line 152 to:

pickled = pickle.dumps(data, pickle.HIGHEST_PROTOCOL)

this is exactly the same as was fixed for form preview in: http://code.djangoproject.com/changeset/6754?format=diff&new=6754

Attachments (1)

7354.diff (739 bytes ) - added by Simon Greenhill 16 years ago.
patch from mage.

Download all attachments as: .zip

Change History (4)

comment:1 by anonymous, 16 years ago

Cc: marijn@… added

by Simon Greenhill, 16 years ago

Attachment: 7354.diff added

patch from mage.

comment:2 by Simon Greenhill, 16 years ago

Has patch: set
Triage Stage: UnreviewedReady for checkin

comment:3 by Adrian Holovaty, 16 years ago

Resolution: fixed
Status: newclosed

(In [7657]) Fixed #7354 -- Fixed a Python 2.3 compatibility issue in formtools/wizard.py. Thanks, mage

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