Forms BooleanField not picklable
Today, I switched from 1.3 to 1.4 and since then, BooleanFields in forms are not picklable (and thus cacheable) anymore. The following doesn't work since 1.4:
import pickle
from django import forms
class MyForm(forms.Form):
my_field = forms.BooleanField()
pickle.dump(MyForm(), open("/dev/null", "w"))
Attachments
(1)
- 17976-1.diff
(1.8 KB
) - added by Claude Paroz 14 years ago.
- Use a module-level function to restore picklability
Download all attachments as:
.zip
Change History
(7)
| Severity: |
Normal → Release blocker
|
| Triage Stage: |
Unreviewed → Accepted
|
| Type: |
Uncategorized → Bug
|
| Owner: |
changed from nobody to Aymeric Augustin
|
| Summary: |
BooleanField not picklable → Forms BooleanField not picklable
|
| Triage Stage: |
Accepted → Ready for checkin
|
| Resolution: |
→ fixed
|
| Status: |
new → closed
|
Change in behavior was introduced by r17132, with r17131:
With r17132: