Issue1252162
Created on 2005-08-04.19:48:23 by leouserz, last changed 2007-01-31.06:07:54 by cgroves.
Messages | |||
---|---|---|---|
msg1014 (view) | Author: Deleted User leouserz (leouserz) | Date: 2005-08-04.19:48:23 | |
the problem: os.path.abspath when fed a unicode object will not recognize the argument as legal. It only recognizes objects of type str. --------- Here is some text describing the problem: --------- Hi Jython makers, I guess Im reporting what appears to be a discrepency between CPython and older versions of Jython in the os.path.abspath method. What is happening is that jyleo in the leoGlobals module is making a call to this method: os.path.abspath with a unicode object. It explodes with a stack pointing to: javapath __tostr line 27 and a message of abspath() argument must be a string object, not 'unicode' object. let stress at this point Im not looking for 'patch' ideas for the work Im doing. Ive got a patch in place. But I do believe this is a change in behavior. Is not a unicode object a string object in unicode disguise? If regular python handles this ok, and other jythons have, shouldn't the correct behavior when faced with a unicode object be to process the unicode object? thanks in advance leouser :) ------------- here is a reply to the query: > Is not a unicode object a string object in unicode disguise? Yes, in fact it is even worse than that: a Jython 'str' object is a wrapper around Java's unicode-based String, and a Jython 'unicode' object is implemented as a thin wrapper around the jython 'str' object. We are going through these contortions in an attempt to make the CPython standard libraries and unit tests happier, however it looks like things are breaking down in this case. > If regular python handles this ok, and other jythons have, shouldn't the > correct behavior when faced with a unicode object be to process the unicode > object? Yes, that would be the correct behavior. One of our primary goals is to be as consistent as we can sensibly be with CPython. Could you file a bug report so this doesn't get lost? Thanks, Frank Wierzbicki |
|||
msg1015 (view) | Author: Charlie Groves (cgroves) | Date: 2007-01-31.06:07:54 | |
Closing in favor of bug #1616493 since it's a more precise description of the problem. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2005-08-04 19:48:23 | leouserz | create |
Supported by Python Software Foundation,
Powered by Roundup