[pypy-svn] r13548 - pypy/dist/pypy/annotation

tismer at codespeak.net tismer at codespeak.net
Fri Jun 17 19:17:59 CEST 2005


Author: tismer
Date: Fri Jun 17 19:17:58 2005
New Revision: 13548

Modified:
   pypy/dist/pypy/annotation/bookkeeper.py
Log:
added __setstate__ that does the needed import.

The stuff might work now!
I'm not sure, because translation of targetrpystone
does not work with rtyper now, at all.
But I get the same error message after loading a
saved session.
Maybe it is fine, now.

Modified: pypy/dist/pypy/annotation/bookkeeper.py
==============================================================================
--- pypy/dist/pypy/annotation/bookkeeper.py	(original)
+++ pypy/dist/pypy/annotation/bookkeeper.py	Fri Jun 17 19:17:58 2005
@@ -134,6 +134,12 @@
 
     Currently used for factories and user-defined classes."""
 
+    def __setstate__(self, dic):
+        self.__dict__.update(dic) # normal action
+        # import ordering hack
+        global BUILTIN_ANALYZERS
+        from pypy.annotation.builtin import BUILTIN_ANALYZERS
+
     def __init__(self, annotator):
         self.annotator = annotator
         self.userclasses = {}    # map classes to ClassDefs



More information about the Pypy-commit mailing list