Message11367

Author jeff.allen
Recipients jeff.allen, stefan.richthofer
Date 2017-05-09.06:29:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1494311384.08.0.158278113327.issue2588@psf.upfronthosting.co.za>
In-reply-to
Content
@stefan I see how you might have interpreted my last paragraph. I'm referring to this test:
https://hg.python.org/jython/file/tip/Lib/test/test_io.py#l2441
which gets run twice, once with _pyio and once with _jyio (called C here, for "compiled", obviously not referring to any particular language :) So you have the code.

I spotted it while messing with encodings, but I can reproduce it in the trunk, which has none of those changes, and ascii paths. It appeared with the localisation of the PC. (However the failure is there even when I set codepage 1252 at the prompt.) In that state:
>>> import sys
>>> sys.getfilesystemencoding()
>>> sys.stdout.encoding
'cp1252'
>>> from java.lang import System
>>> System.getProperty("file.encoding")
u'GBK'

I get some failures from encoding text files too but I've fixed those in the encoding repo (not pushed). In this localisation, I end up using the _java.py codec, which perhaps accounts for the timing change in the threading test, that shows up the bug.

I raise the issue partly on the principle that I shouldn't insert a skip without doing so -- to park it for later. But also I want to raise the question "should we expect this to work"? I wasn't convinced CPython came to the right conclusion. It seemed to be based on the fact that it was an easy fix in a single-threaded interpreter. If you intended to have a highly-concurrent interpreter, and i/o to match, might you think differently?
History
Date User Action Args
2017-05-09 06:29:44jeff.allensetmessageid: <1494311384.08.0.158278113327.issue2588@psf.upfronthosting.co.za>
2017-05-09 06:29:44jeff.allensetrecipients: + jeff.allen, stefan.richthofer
2017-05-09 06:29:43jeff.allenlinkissue2588 messages
2017-05-09 06:29:42jeff.allencreate