Patchwork [2,of,8,py3-cleanup] run-tests: drop subprocess _cleanup monkeypatch

login
register
mail settings
Submitter Augie Fackler
Date May 18, 2015, 3:58 p.m.
Message ID <ffb6e44e15533eb4f388.1431964721@augie-macbookair2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/9129/
State Accepted
Commit c8725700259857c75f57bc5b9a595e9fb698d79c
Headers show

Comments

Augie Fackler - May 18, 2015, 3:58 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1431911745 14400
#      Sun May 17 21:15:45 2015 -0400
# Node ID ffb6e44e15533eb4f3884d42960c1d20f0095dfc
# Parent  57acc2e6aa0e382289b2e872df7416dbf229c714
run-tests: drop subprocess _cleanup monkeypatch

This was working around a defect in subprocess in Python 2.5, which we
no longer need to worry about.

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -81,12 +81,6 @@  processlock = threading.Lock()
 if sys.version_info > (3, 0, 0):
     xrange = range # we use xrange in one place, and we'd rather not use range
 
-# subprocess._cleanup can race with any Popen.wait or Popen.poll on py24
-# http://bugs.python.org/issue1731717 for details. We shouldn't be producing
-# zombies but it's pretty harmless even if we do.
-if sys.version_info < (2, 5):
-    subprocess._cleanup = lambda: None
-
 def checkportisavailable(port):
     """return true if a port seems free to bind on localhost"""
     try: