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

Make Session objects picklable #439

Closed
sharat87 opened this Issue Feb 18, 2012 · 5 comments

Comments

Projects
None yet
3 participants
@sharat87
Copy link
Contributor

sharat87 commented Feb 18, 2012

Currently, when we try to pickle a Session object, we get this:

  File "[...]python2.7/copy_reg.py", line 70, in _reduce_ex
    raise TypeError, "can't pickle %s objects" % base.__name__
TypeError: can't pickle lock objects

The Session objects can be made pickleable rather easily. If you are willing to accept this functionality, I can create a pull request. I showed the implementation on my blog post about this.

@Diaoul

This comment has been minimized.

Copy link

Diaoul commented Feb 18, 2012

Broken link

@sharat87

This comment has been minimized.

Copy link
Contributor

sharat87 commented Feb 18, 2012

Sorry, fixed now.

@kennethreitz

This comment has been minimized.

Copy link
Member

kennethreitz commented Feb 18, 2012

Let's do it!

@sharat87

This comment has been minimized.

Copy link
Contributor

sharat87 commented Feb 19, 2012

I committed my changes and referred to this issue number in the commit message. Can you pull with that or should I create a new pull request (which creates a new issue I believe)?

Edit: Apparently there needs to be a pull request created.

@kennethreitz

This comment has been minimized.

Copy link
Member

kennethreitz commented Feb 20, 2012

Awesome!

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