Message269804
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 |
|
Date |
User |
Action |
Args |
2016-07-04 19:43:24 | aonishuk | set | recipients:
+ aonishuk, gps, r.david.murray, ppperry |
2016-07-04 19:43:23 | aonishuk | set | messageid: <1467661403.98.0.593452005362.issue27448@psf.upfronthosting.co.za> |
2016-07-04 19:43:23 | aonishuk | link | issue27448 messages |
2016-07-04 19:43:23 | aonishuk | create | |
|