diff -r 73de0794ae71 Lib/subprocess.py --- a/Lib/subprocess.py Mon Jun 10 23:01:20 2013 -0500 +++ b/Lib/subprocess.py Tue Jun 11 02:00:24 2013 -0700 @@ -1243,7 +1243,7 @@ # Close pipe fds. Make sure we don't close the # same fd more than once, or standard fds. - closed = { None } + closed = set([None]) for fd in [p2cread, c2pwrite, errwrite]: if fd not in closed and fd > 2: os.close(fd)