Opened 13 years ago
Closed 13 years ago
#17976 closed Bug (fixed)
Forms BooleanField not picklable
Reported by: | Torsten Bronger | Owned by: | Aymeric Augustin |
---|---|---|---|
Component: | Forms | Version: | 1.4 |
Severity: | Release blocker | Keywords: | |
Cc: | bronger@… | 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
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)
Change History (7)
comment:1 by , 13 years ago
Severity: | Normal → Release blocker |
---|---|
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Bug |
comment:2 by , 13 years ago
Owner: | changed from | to
---|
comment:3 by , 13 years ago
Summary: | BooleanField not picklable → Forms BooleanField not picklable |
---|
by , 13 years ago
Attachment: | 17976-1.diff added |
---|
Use a module-level function to restore picklability
comment:4 by , 13 years ago
Has patch: | set |
---|
comment:5 by , 13 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Fixed in 9350d1d59c1a4e6a9ac246a808f55da35de0df69.
This must be backported to the 1.4.X branch, but we're in the middle of the migration to GitHub and currently don't have a 1.4 branch. Marking as Ready For Backport.
comment:6 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Backported in a3c8201b77002645f86c39f978fe132cb2dbab14.
Note:
See TracTickets
for help on using tickets.
Change in behavior was introduced by r17132, with r17131:
With r17132: