[py-svn] r56722 - in py: branch/event/py/execnet dist/py/execnet trunk/py/execnet
hpk at codespeak.net
hpk at codespeak.net
Tue Jul 22 21:17:17 CEST 2008
Author: hpk
Date: Tue Jul 22 21:17:17 2008
New Revision: 56722
Modified:
py/branch/event/py/execnet/inputoutput.py
py/branch/event/py/execnet/register.py
py/dist/py/execnet/inputoutput.py
py/dist/py/execnet/register.py
py/trunk/py/execnet/inputoutput.py
py/trunk/py/execnet/register.py
Log:
porting the windows-execnet 56717 and 56718 fixes to other active branches
Modified: py/branch/event/py/execnet/inputoutput.py
==============================================================================
--- py/branch/event/py/execnet/inputoutput.py (original)
+++ py/branch/event/py/execnet/inputoutput.py Tue Jul 22 21:17:17 2008
@@ -58,7 +58,11 @@
class Popen2IO:
server_stmt = """
-import sys, StringIO
+import os, sys, StringIO
+if sys.platform == "win32":
+ import msvcrt
+ msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)
+ msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
io = Popen2IO(sys.stdout, sys.stdin)
sys.stdout = sys.stderr = StringIO.StringIO()
#try:
@@ -70,10 +74,6 @@
error = (IOError, OSError, EOFError)
def __init__(self, infile, outfile):
- if sys.platform == 'win32':
- import msvcrt
- msvcrt.setmode(infile.fileno(), os.O_BINARY)
- msvcrt.setmode(outfile.fileno(), os.O_BINARY)
self.outfile, self.infile = infile, outfile
self.readable = self.writeable = True
self.lock = thread.allocate_lock()
Modified: py/branch/event/py/execnet/register.py
==============================================================================
--- py/branch/event/py/execnet/register.py (original)
+++ py/branch/event/py/execnet/register.py Tue Jul 22 21:17:17 2008
@@ -51,6 +51,10 @@
class PopenCmdGateway(InstallableGateway):
def __init__(self, cmd):
infile, outfile = os.popen2(cmd)
+ if sys.platform == 'win32':
+ import msvcrt
+ msvcrt.setmode(infile.fileno(), os.O_BINARY)
+ msvcrt.setmode(outfile.fileno(), os.O_BINARY)
io = inputoutput.Popen2IO(infile, outfile)
super(PopenCmdGateway, self).__init__(io=io)
Modified: py/dist/py/execnet/inputoutput.py
==============================================================================
--- py/dist/py/execnet/inputoutput.py (original)
+++ py/dist/py/execnet/inputoutput.py Tue Jul 22 21:17:17 2008
@@ -58,7 +58,11 @@
class Popen2IO:
server_stmt = """
-import sys, StringIO
+import os, sys, StringIO
+if sys.platform == "win32":
+ import msvcrt
+ msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)
+ msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
io = Popen2IO(sys.stdout, sys.stdin)
sys.stdout = sys.stderr = StringIO.StringIO()
#try:
@@ -70,10 +74,6 @@
error = (IOError, OSError, EOFError)
def __init__(self, infile, outfile):
- if sys.platform == 'win32':
- import msvcrt
- msvcrt.setmode(infile.fileno(), os.O_BINARY)
- msvcrt.setmode(outfile.fileno(), os.O_BINARY)
self.outfile, self.infile = infile, outfile
self.readable = self.writeable = True
self.lock = thread.allocate_lock()
Modified: py/dist/py/execnet/register.py
==============================================================================
--- py/dist/py/execnet/register.py (original)
+++ py/dist/py/execnet/register.py Tue Jul 22 21:17:17 2008
@@ -51,6 +51,10 @@
class PopenCmdGateway(InstallableGateway):
def __init__(self, cmd):
infile, outfile = os.popen2(cmd)
+ if sys.platform == 'win32':
+ import msvcrt
+ msvcrt.setmode(infile.fileno(), os.O_BINARY)
+ msvcrt.setmode(outfile.fileno(), os.O_BINARY)
io = inputoutput.Popen2IO(infile, outfile)
super(PopenCmdGateway, self).__init__(io=io)
Modified: py/trunk/py/execnet/inputoutput.py
==============================================================================
--- py/trunk/py/execnet/inputoutput.py (original)
+++ py/trunk/py/execnet/inputoutput.py Tue Jul 22 21:17:17 2008
@@ -58,7 +58,11 @@
class Popen2IO:
server_stmt = """
-import sys, StringIO
+import os, sys, StringIO
+if sys.platform == "win32":
+ import msvcrt
+ msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)
+ msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
io = Popen2IO(sys.stdout, sys.stdin)
sys.stdout = sys.stderr = StringIO.StringIO()
#try:
@@ -70,10 +74,6 @@
error = (IOError, OSError, EOFError)
def __init__(self, infile, outfile):
- if sys.platform == 'win32':
- import msvcrt
- msvcrt.setmode(infile.fileno(), os.O_BINARY)
- msvcrt.setmode(outfile.fileno(), os.O_BINARY)
self.outfile, self.infile = infile, outfile
self.readable = self.writeable = True
self.lock = thread.allocate_lock()
Modified: py/trunk/py/execnet/register.py
==============================================================================
--- py/trunk/py/execnet/register.py (original)
+++ py/trunk/py/execnet/register.py Tue Jul 22 21:17:17 2008
@@ -51,6 +51,10 @@
class PopenCmdGateway(InstallableGateway):
def __init__(self, cmd):
infile, outfile = os.popen2(cmd)
+ if sys.platform == 'win32':
+ import msvcrt
+ msvcrt.setmode(infile.fileno(), os.O_BINARY)
+ msvcrt.setmode(outfile.fileno(), os.O_BINARY)
io = inputoutput.Popen2IO(infile, outfile)
super(PopenCmdGateway, self).__init__(io=io)
More information about the pytest-commit
mailing list