Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement a "decorator" to allow pickling nested classes #6110

Closed
sagetrac-cwitty mannequin opened this issue May 21, 2009 · 9 comments
Closed

implement a "decorator" to allow pickling nested classes #6110

sagetrac-cwitty mannequin opened this issue May 21, 2009 · 9 comments

Comments

@sagetrac-cwitty
Copy link
Mannequin

sagetrac-cwitty mannequin commented May 21, 2009

The nested_pickle decorator modifies nested classes to be picklable. (In Python 2.6 it should be usable as a decorator, although that hasn't been tested; Python 2.5 doesn't support class decorators, so you can't use that syntax in Sage until it upgrades.)

CC: @craigcitro

Component: misc

Author: Carl Witty, Nicolas M. Thiéry

Reviewer: Robert Bradshaw, Nicolas M. Thiéry

Merged: 4.0.2.alpha0

Issue created by migration from https://trac.sagemath.org/ticket/6110

@sagetrac-cwitty sagetrac-cwitty mannequin added this to the sage-4.0 milestone May 21, 2009
@sagetrac-cwitty sagetrac-cwitty mannequin self-assigned this May 21, 2009
@nthiery
Copy link
Contributor

nthiery commented May 23, 2009

Attachment: nested-pickles.patch.gz

Reviewer patch, with demo of metaclass

@nthiery
Copy link
Contributor

nthiery commented May 23, 2009

comment:2

Attachment: nested-pickles-reviewer.patch.gz

I just uploaded a super patch (for sage 3.4.2) which:

  • Demonstrates the use a metaclass call nested_pickle automatically on a class, and all derived subclasse. Potential application: put this on Category, and all categories would be handled properly. Same thing on Parent? Hmm.
  • Fix nested_pickle to handle old-style classes

@williamstein
Copy link
Contributor

comment:3

Perfect for 4.0.1.

@williamstein williamstein modified the milestones: sage-4.0, sage-4.0.1 May 28, 2009
@robertwb
Copy link
Contributor

comment:4

Looks and works well for me. Lets get this pickle stuff in.

@ncalexan
Copy link
Mannequin

ncalexan mannequin commented Jun 13, 2009

Reviewer: Robert Bradshaw, Nicolas Thiery

@ncalexan
Copy link
Mannequin

ncalexan mannequin commented Jun 13, 2009

Merged: 4.0.2.alpha0

@ncalexan
Copy link
Mannequin

ncalexan mannequin commented Jun 13, 2009

Author: Carl Witty, Nicolas Thiery

@ncalexan ncalexan mannequin removed the s: positive review label Jun 13, 2009
@ncalexan ncalexan mannequin closed this as completed Jun 13, 2009
@fchapoton
Copy link
Contributor

Changed reviewer from Robert Bradshaw, Nicolas Thiery to Robert Bradshaw, Nicolas M. Thiéry

@fchapoton
Copy link
Contributor

Changed author from Carl Witty, Nicolas Thiery to Carl Witty, Nicolas M. Thiéry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants