Issue1708

classification
Title: test_email fails if default locale is Japanese
Type: behaviour Severity: minor
Components: None Versions: Jython 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: nobody Nosy List: fwierzbicki, nobody, stefan.richthofer, yyamano, zyasoft
Priority: high Keywords: patch

Created on 2011-02-17.03:03:54 by yyamano, last changed 2014-12-18.05:36:07 by zyasoft.

Files
File name Uploaded Description Edit Remove
build.xml-patch yyamano, 2011-02-17.03:03:53
Messages
msg6400 (view) Author: Yuji Yamano (yyamano) Date: 2011-02-17.03:03:53
I got the following error when I run the tests on Mac OS X with Japanese locale.

[exec] test_email
[exec] test test_email failed -- Traceback (most recent call last):
[exec]   File "/Users/yyamano/work/jython/trunk/jython/dist/Lib/email/test/test_email.py", line 2129, in test_formatdate_usegmt
[exec]     self.assertEqual(
[exec] AssertionError: 'Thu, 17 Feb 2011 02:03:38 -0000' != '\u6728, 17 2 2011 02:03:38 -0000'
[exec] 

Attached patch solves the problem. It requires Ant 1.7 or later.

Note: LANG and LC_* environment variables doesn't work with the Java implementation on Mac OS X. JAVA_OPTS="-Duser.language=en -Duser.region=US" works.
msg9045 (view) Author: Jim Baker (zyasoft) Date: 2014-09-26.05:43:00
Looks like a very appropriate fix, sorry it has been buried in this bug tracker for so long!
msg9180 (view) Author: Jim Baker (zyasoft) Date: 2014-10-29.00:10:40
Fixed as of https://hg.python.org/jython/rev/7a70d824e7bd

Thanks again for this patch!
msg9185 (view) Author: Stefan Richthofer (stefan.richthofer) Date: 2014-10-30.01:34:00
This fix has a typos at least in lines
1068, 1069 of PyJavaType.java, which prevent building.
The erroneous lines spell
PyObject mapping =
if (!Py.isInstance(other, ))

build process now prints:

src/org/python/core/PyJavaType.java:1069: error: illegal start of expression
    [javac]                     if (!Py.isInstance(other, ))
    [javac]                     ^
    [javac] /src/org/python/core/PyJavaType.java:1069: error: illegal start of expression
    [javac]                     if (!Py.isInstance(other, ))
    [javac]                                               ^
    [javac] /src/org/python/core/PyJavaType.java:1069: error: not a statement
    [javac]                     if (!Py.isInstance(other, ))
    [javac]                        ^
    [javac] /src/org/python/core/PyJavaType.java:1069: error: ';' expected
    [javac]                     if (!Py.isInstance(other, ))
    [javac]                                                 ^
    [javac] 4 errors
msg9186 (view) Author: Stefan Richthofer (stefan.richthofer) Date: 2014-10-30.01:39:54
It appears, simply removing these lines is a valid fix.
History
Date User Action Args
2014-12-18 05:36:07zyasoftsetstatus: pending -> closed
2014-10-30 01:39:54stefan.richthofersetmessages: + msg9186
2014-10-30 01:34:01stefan.richthofersetnosy: + stefan.richthofer
messages: + msg9185
2014-10-29 00:10:40zyasoftsetstatus: open -> pending
resolution: fixed
messages: + msg9180
2014-09-26 05:43:00zyasoftsetpriority: normal -> high
assignee: fwierzbicki -> nobody
messages: + msg9045
nosy: + zyasoft, nobody
2013-02-19 23:43:20fwierzbickisetkeywords: + patch
assignee: fwierzbicki
priority: normal
nosy: + fwierzbicki
versions: + Jython 2.5, - 2.5.2rc
2011-02-17 03:03:54yyamanocreate