[pypy-svn] pypy default: Trying a bit randomly to fix stackless.

arigo commits-noreply at bitbucket.org
Tue Mar 15 18:08:14 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r42657:3994e5797386
Date: 2011-03-14 18:54 -0400
http://bitbucket.org/pypy/pypy/changeset/3994e5797386/

Log:	Trying a bit randomly to fix stackless.

diff --git a/lib_pypy/stackless.py b/lib_pypy/stackless.py
--- a/lib_pypy/stackless.py
+++ b/lib_pypy/stackless.py
@@ -14,9 +14,10 @@
 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

diff --git a/pypy/module/_stackless/interp_coroutine.py b/pypy/module/_stackless/interp_coroutine.py
--- a/pypy/module/_stackless/interp_coroutine.py
+++ b/pypy/module/_stackless/interp_coroutine.py
@@ -55,8 +55,8 @@
 
 # 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):
 
@@ -384,14 +384,14 @@
                       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)


More information about the Pypy-commit mailing list