[pypy-svn] r35817 - in pypy/dist/pypy/lib: . app_test
stephan at codespeak.net
stephan at codespeak.net
Fri Dec 15 18:12:52 CET 2006
Author: stephan
Date: Fri Dec 15 18:12:51 2006
New Revision: 35817
Modified:
pypy/dist/pypy/lib/app_test/test_stackless.py
pypy/dist/pypy/lib/stackless.py
pypy/dist/pypy/lib/stackless_new.py
Log:
removed the references to py.magic.coroutine. Instead,
http://codespeak.net/svn/user/stephan/hacks/coroutine/
must in the python path in order to run the test_coroutine and
test_stackless tests from CPython.
test_stackless is actually testing stackless_new.
Modified: pypy/dist/pypy/lib/app_test/test_stackless.py
==============================================================================
--- pypy/dist/pypy/lib/app_test/test_stackless.py (original)
+++ pypy/dist/pypy/lib/app_test/test_stackless.py Fri Dec 15 18:12:51 2006
@@ -11,6 +11,7 @@
withinit = False
except ImportError:
from pypy.lib import stackless_new as stackless
+ #from pypy.lib import stackless
withinit = True
from py.test import skip
Modified: pypy/dist/pypy/lib/stackless.py
==============================================================================
--- pypy/dist/pypy/lib/stackless.py (original)
+++ pypy/dist/pypy/lib/stackless.py Fri Dec 15 18:12:51 2006
@@ -17,8 +17,13 @@
try:
from _stackless import coroutine, greenlet
-except ImportError:
- from py.magic import coroutine, greenlet
+except ImportError: # we are running from CPython
+ # you must have coroutine from
+ # http://codespeak.net/svn/user/stephan/hacks/coroutine/
+ # in your path in order to get the following to work
+
+ from py.magic import greenlet
+ from coroutine import coroutine
__all__ = 'run getcurrent getmain schedule tasklet \
channel TaskletExit coroutine greenlet'.split()
@@ -879,3 +884,5 @@
__init()
+_init = __init # compatibility to stackless_new
+
Modified: pypy/dist/pypy/lib/stackless_new.py
==============================================================================
--- pypy/dist/pypy/lib/stackless_new.py (original)
+++ pypy/dist/pypy/lib/stackless_new.py Fri Dec 15 18:12:51 2006
@@ -8,8 +8,14 @@
import sys
try:
from _stackless import coroutine, greenlet
-except ImportError:
- from py.magic import coroutine, greenlet
+except ImportError: # we are running from CPython
+ # you must have coroutine from
+ # http://codespeak.net/svn/user/stephan/hacks/coroutine/
+ # in your path in order to get the following to work
+
+ from py.magic import greenlet
+ from coroutine import coroutine
+
from collections import deque
__all__ = 'run getcurrent getmain schedule tasklet channel coroutine \
More information about the Pypy-commit
mailing list