sympy/sympy — pull request #1148 by Narsil (2012-03-20 16:44:01+00:00)
Title: Bugfix issue 2684+2204 (deepcopying Objects that have evaluate=False)

This patch should fix both issues by correctly pickling/unpickling objects.

When unpickling an object, evaluate=False is passed whenever possible because object has already been evaluated before. Some constructors do not accept evaluate kwarg which is why we have a try:except:.

After calling __new__, __setstate__ needs to be called to set assumptions and other slots for objects.