1 | | {{{ |

2 | | wstein@sage:~$ /usr/local/bin/sage |

3 | | ---------------------------------------------------------------------- |

4 | | | Sage Version 4.6, Release Date: 2010-10-30 | |

5 | | | Type notebook() for the GUI, and license() for information. | |

6 | | ---------------------------------------------------------------------- |

7 | | sage: d = sage.databases.db.Database('sage_zodb', read_only=False) |

8 | | sage: d[12] = factor(12) |

9 | | sage: d.commit() |

10 | | ... |

11 | | TypeError: can't pickle SageObject objects |

12 | | }}} |

| 1 | zodb only use the pickle protocol version 1. It is also not used in sage apart from one package that has been migrated away from it in #12205. |

32 | | Some ideas for how to fix this: |

33 | | |

34 | | - Modify ZODB itself, e.g., by changing: ZODB.serialiize.ObjectWriter as suggested here: http://www.mail-archive.com/zodb-dev@zope.org/msg04766.html |

35 | | |

36 | | - Figure out how to monkeypatch ODB.serialiize.ObjectWriter at runtime, then document this hack |

37 | | |

38 | | - "Fix" SageObject and/or Cython, so Sage objects can serialize using Pickle protocol 1 instead of requiring 2. I don't personally understand exactly why SageObject can't be pickled using protocol 1. |

39 | | |

| 19 | The suggested option for this ticket is to remove zodb from sage. |

| 20 | ---- |

| 21 | * Apply [attachment:trac10353-db-removal.patch] to the sage library |

| 22 | * Apply [attachment:trac10353-sage_root.patch] to the sage root repository |