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 From 98b807225bfe0a173be07e6b454372cee022ab16 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Wed, 28 Nov 2018 16:47:00 -0500 Subject: Add info the CHANGES.txt --- src/CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 97c3455..926ae96 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -55,6 +55,9 @@ RELEASE 3.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE yielded trying to combine strings and bytes which threw exception. - Fix GH Issue #3225 SCons.Util.Flatten() doesn't handle MappingView's produced by dictionary as return values from dict().{items(), keys(), values()}. + - Fix GH Issue #3136 no longer wrap io.{BufferedReader,BufferedWriter,BufferedRWPair,BufferedRandom,TextIOWrapper + with logic to set HANDLE_FLAG_INHERIT flag on the file handle. Python 3.4+ automatically sets this according + to Python docs: https://docs.python.org/3/library/os.html#fd-inheritance From Andrew Featherstone - Removed unused --warn options from the man page and source code. -- cgit v0.12