From ac8fa00713e82610479c31e9a58587b93c952d13 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Wed, 28 Nov 2018 14:10:04 -0500 Subject: Fix GH issue #3136 No need to explicitly set file handles to non-sharable. Py 3.4 and above do this by default --- src/engine/SCons/Platform/win32.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/engine/SCons/Platform/win32.py b/src/engine/SCons/Platform/win32.py index 3b76208..2d40fb8 100644 --- a/src/engine/SCons/Platform/win32.py +++ b/src/engine/SCons/Platform/win32.py @@ -82,16 +82,8 @@ else: win32con.HANDLE_FLAG_INHERIT, 0) file = _scons_file else: - import io - for io_class in ['BufferedReader', 'BufferedWriter', 'BufferedRWPair', - 'BufferedRandom', 'TextIOWrapper']: - _builtin_file = getattr(io, io_class) - class _scons_file(_builtin_file): - def __init__(self, *args, **kw): - _builtin_file.__init__(self, *args, **kw) - win32api.SetHandleInformation(msvcrt.get_osfhandle(self.fileno()), - win32con.HANDLE_FLAG_INHERIT, 0) - setattr(io, io_class, _scons_file) + # No longer needed for python 3.4 and above. Files are opened non sharable + pass -- cgit v0.12