Author cjsimpson
Recipients amak, cjsimpson, daishiharada, fwierzbicki, pjenvey, ssteiner, zyasoft
Date 2014-08-06.22:26:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I believe this issue (or a similar one) is causing a failure in test_json (json.tests.test_tool.TestTool.test_infile_stdout). This is with Jython 2.7b3+ / java1.7.0_40 / osx 10.9.4.

That test ends up calling json.tool, which has (simplified) code similar to:

with sys.stdout:
    #do stuff

When the context manager calls sys.stdout.__exit__ it closes sys.stdout. Later execfile in is called, which calls Py.flushLine(), which eventually attempts to close sys.stdout. That fails (it's already closed) and org.python.core.PyException gets thrown causing the test to fail.

Since this is not happening from the interactive console it's possible this a similar looking yet different problem. Not sure what the fix to this is, just sharing what I found out when digging into a test failure.
Date User Action Args
2014-08-06 22:26:30cjsimpsonsetmessageid: <>
2014-08-06 22:26:30cjsimpsonsetrecipients: + cjsimpson, fwierzbicki, amak, daishiharada, pjenvey, zyasoft, ssteiner
2014-08-06 22:26:30cjsimpsonlinkissue695383 messages
2014-08-06 22:26:29cjsimpsoncreate