Message8907

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 <1407363990.68.0.960657253306.issue695383@psf.upfronthosting.co.za>
In-reply-to
Content
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 PythonInterpreter.java 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.
History
Date User Action Args
2014-08-06 22:26:30cjsimpsonsetmessageid: <1407363990.68.0.960657253306.issue695383@psf.upfronthosting.co.za>
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