cannot pickle classes created by make_enum

Bug #734789 reported by Alexandre PIGNÉ on 2011-03-14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Won't Fix
Barry Warsaw

Bug Description

Pickle refuses to pickle & unpickle make_enum returned classes.

PicklingError: Can't pickle <Fruit2 {kiwi: 1, banana: 2, tomato: 3}>: it's not found as flufl.enum._

Alexandre PIGNÉ (bloodaille) wrote :

Use the module scope of the previous frame to attach the generated object

Barry Warsaw (barry) on 2011-08-19
Changed in flufl.enum:
status: New → Triaged
importance: Undecided → Low
Barry Warsaw (barry) on 2011-09-07
Changed in flufl.enum:
assignee: nobody → Barry Warsaw (barry)
milestone: none → 3.3
status: Triaged → Confirmed
Barry Warsaw (barry) wrote :

The patch seems rather nasty. I think I won't fix this, since you should probably use the class syntax if you want to pickle it.

Changed in flufl.enum:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers