Skip to content

Commit 64ff87f

Browse files
author
gregory.p.smith
committed
Merged revisions 73917 via svnmerge from
svn+ssh://[email protected]/python/branches/py3k (the changes that add a select.PIPE_BUF attribute were removed) This merge fixes issue3392 ................ r73917 | amaury.forgeotdarc | 2009-07-09 15:44:11 -0700 (Thu, 09 Jul 2009) | 12 lines Merged revisions 73916 via svnmerge from svn+ssh://[email protected]/python/trunk ........ r73916 | amaury.forgeotdarc | 2009-07-10 00:37:22 +0200 (ven., 10 juil. 2009) | 5 lines #6416: Fix compilation of the select module on Windows, as well as test_subprocess: PIPE_BUF is not defined on Windows, and probably has no meaning there. Anyway the subprocess module uses another way to perform non-blocking reads (with a thread) ........ ................ git-svn-id: http://svn.python.org/projects/python/branches/release31-maint@74425 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 0786bcd commit 64ff87f

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

Lib/subprocess.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,12 @@ class pywintypes:
376376
import fcntl
377377
import pickle
378378

379+
# When select or poll has indicated that the file is writable,
380+
# we can write up to _PIPE_BUF bytes without risk of blocking.
381+
# POSIX defines PIPE_BUF as >= 512.
382+
_PIPE_BUF = getattr(select, 'PIPE_BUF', 512)
383+
384+
379385
__all__ = ["Popen", "PIPE", "STDOUT", "call", "check_call", "getstatusoutput",
380386
"getoutput", "check_output", "CalledProcessError"]
381387

@@ -384,11 +390,6 @@ class pywintypes:
384390
except:
385391
MAXFD = 256
386392

387-
# When select or poll has indicated that the file is writable,
388-
# we can write up to _PIPE_BUF bytes without risk of blocking.
389-
# POSIX defines PIPE_BUF as >= 512.
390-
_PIPE_BUF = getattr(select, 'PIPE_BUF', 512)
391-
392393
_active = []
393394

394395
def _cleanup():

Lib/test/test_subprocess.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ def test_getoutput(self):
801801

802802
unit_tests = [ProcessTestCase, CommandTests]
803803

804-
if subprocess._has_poll:
804+
if getattr(subprocess, '_has_poll', False):
805805
class ProcessTestCaseNoPoll(ProcessTestCase):
806806
def setUp(self):
807807
subprocess._has_poll = False

0 commit comments

Comments
 (0)