This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: subprocess.py (py2.5) wrongly claims py2.2 compatibility
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: astrand Nosy List: astrand, racarr, twegener
Priority: normal Keywords:

Created on 2006-11-27 01:07 by twegener, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg30683 - (view) Author: Tim Wegener (twegener) Date: 2006-11-27 01:07
From the comments in subprocess.py (py2.5):
# This module should remain compatible with Python 2.2, see PEP 291.

However, using it from Python 2.2 gives:
NameError: global name 'set' is not defined

(set built-in used on line 1005)

The subprocess.py in py2.4 was 2.2 compatible. 

Either the compatibility comment should be removed/amended or compatibility fixed. 
msg30684 - (view) Author: Robert Carr (racarr) Date: 2006-12-05 15:10
Index: subprocess.py
===================================================================
--- subprocess.py       (revision 52918)
+++ subprocess.py       (working copy)
@@ -1004,8 +1004,8 @@

                     # Close pipe fds.  Make sure we don't close the same
                     # fd more than once, or standard fds.
-                    for fd in set((p2cread, c2pwrite, errwrite))-set((0,1,2)):
-                        if fd: os.close(fd)
+                    for fd in (p2cread,c2pwrite,errwrite):
+                        if fd not in (0,1,2): os.close(fd)

                     # Close all other fds, if asked for
                     if close_fds:

Fixed?
msg30685 - (view) Author: Peter Åstrand (astrand) * (Python committer) Date: 2007-01-07 09:01
Fixed in revision 53293 (trunk) and 53294 (2.5). 
History
Date User Action Args
2022-04-11 14:56:21adminsetgithub: 44281
2006-11-27 01:07:17twegenercreate