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.

Author aonishuk
Recipients aonishuk, gps, ppperry, r.david.murray
Date 2016-07-04.19:43:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1467661403.98.0.593452005362.issue27448@psf.upfronthosting.co.za>
In-reply-to
Content
pppery, I don't think I am breaking gc functionality with my code. The code line I gave just meant to give the basic idea of what was helping to workaround this. If you are actually interested in the code I use, it is below:

def fix_subprocess_racecondition():
  """
  !!! PLEASE NOTE THIS SHOULD BE CALLED BEFORE ANY OTHER INITIALIZATION was done to avoid already created links to subprocess or subprocess.gc or gc
  """
  # monkey patching subprocess
  import subprocess
  subprocess.gc.isenabled = lambda: True

  # re-importing gc to have correct isenabled for non-subprocess contexts
  import sys
  del sys.modules['gc']
  import gc
History
Date User Action Args
2016-07-04 19:43:24aonishuksetrecipients: + aonishuk, gps, r.david.murray, ppperry
2016-07-04 19:43:23aonishuksetmessageid: <1467661403.98.0.593452005362.issue27448@psf.upfronthosting.co.za>
2016-07-04 19:43:23aonishuklinkissue27448 messages
2016-07-04 19:43:23aonishukcreate