Commits

Armin Rigo  committed 3994e57

Trying a bit randomly to fix stackless.

  • Participants
  • Parent commits 80bd259

Comments (0)

Files changed (2)

File lib_pypy/stackless.py

 import traceback
 import sys
 try:
-    # If _stackless can be imported then TaskletExit and CoroutineExit are 
+    # If _stackless can be imported then CoroutineExit is
     # automatically added to the builtins.
     from _stackless import coroutine, greenlet
+    TaskletExit = CoroutineExit
 except ImportError: # we are running from CPython
     from greenlet import greenlet, GreenletExit
     TaskletExit = CoroutineExit = GreenletExit

File pypy/module/_stackless/interp_coroutine.py

 
 # Should be moved to interp_stackless.py if it's ever implemented... Currently
 # used by pypy/lib/stackless.py.
-W_TaskletExit = _new_exception('TaskletExit', W_SystemExit, 
-            """Tasklet killed manually.""")
+#W_TaskletExit = _new_exception('TaskletExit', W_SystemExit, 
+#            """Tasklet killed manually.""")
 
 class AppCoroutine(Coroutine): # XXX, StacklessFlags):
 
                       self.w_CoroutineExit)
         
         # Should be moved to interp_stackless.py if it's ever implemented...
-        self.w_TaskletExit = space.gettypefor(W_TaskletExit)
-        space.setitem(
-                      space.exceptions_module.w_dict, 
-                      space.new_interned_str('TaskletExit'), 
-                      self.w_TaskletExit) 
-        space.setitem(space.builtin.w_dict, 
-                      space.new_interned_str('TaskletExit'), 
-                      self.w_TaskletExit)  
+        #self.w_TaskletExit = space.gettypefor(W_TaskletExit)
+        #space.setitem(
+        #              space.exceptions_module.w_dict, 
+        #              space.new_interned_str('TaskletExit'), 
+        #              self.w_TaskletExit) 
+        #space.setitem(space.builtin.w_dict, 
+        #              space.new_interned_str('TaskletExit'), 
+        #              self.w_TaskletExit)  
         
     def post_install(self):
         self.current = self.main = AppCoroutine(self.space, state=self)