[py-svn] r23878 - py/dist/py/execnet

mwh at codespeak.net mwh at codespeak.net
Thu Mar 2 00:55:18 CET 2006


Author: mwh
Date: Thu Mar  2 00:55:16 2006
New Revision: 23878

Modified:
   py/dist/py/execnet/gateway.py
Log:
don't hard-code the "let me compile generators" flag in the call to compile()
(fixes test failures on python 2.5 where this flag is 0 and 4096 causes an
exception)



Modified: py/dist/py/execnet/gateway.py
==============================================================================
--- py/dist/py/execnet/gateway.py	(original)
+++ py/dist/py/execnet/gateway.py	Thu Mar  2 00:55:16 2006
@@ -4,7 +4,7 @@
 import traceback
 import atexit
 import weakref
-
+import __future__
 
 # note that the whole code of this module (as well as some
 # other modules) execute not only on the local side but 
@@ -148,7 +148,8 @@
             self.trace("execution starts:", repr(source)[:50])
             close = self._local_redirect_thread_output(outid, errid) 
             try:
-                co = compile(source+'\n', '', 'exec', 4096)
+                co = compile(source+'\n', '', 'exec',
+                             __future__.CO_GENERATOR_ALLOWED)
                 exec co in loc
             finally:
                 close() 



More information about the pytest-commit mailing list