Django

Code

Ticket #7354 (closed: fixed)

Opened 6 months ago

Last modified 6 months ago

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

Reported by: mage Assigned to: nobody
Milestone: Component: django.contrib.formtools
Version: SVN Keywords: wizard pickle
Cc: marijn@konstruct.nl Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

7354.diff (0.7 kB) - added by Simon Greenhill on 06/14/08 08:08:17.
patch from mage.

Change History

06/02/08 14:21:37 changed by anonymous

  • cc set to marijn@konstruct.nl.
  • needs_better_patch changed.
  • needs_tests changed.
  • needs_docs changed.

06/14/08 08:08:17 changed by Simon Greenhill

  • attachment 7354.diff added.

patch from mage.

06/14/08 08:08:31 changed by Simon Greenhill

  • has_patch set to 1.
  • stage changed from Unreviewed to Ready for checkin.

06/15/08 23:06:50 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #7354 (pickle.dumps on formwizard fails in python2.3 because of keyword argument)




Change Properties
Action