Opened 7 years ago

Closed 7 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: master
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: UI/UX:

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 7 years ago.
patch from mage.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 7 years ago by anonymous

  • Cc marijn@… added
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Changed 7 years ago by Simon Greenhill

patch from mage.

comment:2 Changed 7 years ago by Simon Greenhill

  • Has patch set
  • Triage Stage changed from Unreviewed to Ready for checkin

comment:3 Changed 7 years ago by adrian

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

(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