Index: src/org/python/core/PyObject.java =================================================================== --- src/org/python/core/PyObject.java (revision 3440) +++ src/org/python/core/PyObject.java (working copy) @@ -992,6 +992,9 @@ if (ret != null) return ret._doget(this); return null;*/ + PyString ps = new PyString(name); + if(ps.isunicode()) + ps.encode(); return object___findattr__(name); } Index: Lib/test/test_builtin.py =================================================================== --- Lib/test/test_builtin.py (revision 3440) +++ Lib/test/test_builtin.py (working copy) @@ -425,20 +425,14 @@ self.assertRaises(TypeError, getattr, sys, 1) self.assertRaises(TypeError, getattr, sys, 1, "foo") self.assertRaises(TypeError, getattr) -# Jython transition 2.3 -# hasattr, getattr allow unicode identifiers -# http://jython.org/bugs/1768979 -# self.assertRaises(UnicodeError, getattr, sys, unichr(sys.maxunicode)) + self.assertRaises(UnicodeError, getattr, sys, unichr(sys.maxunicode)) def test_hasattr(self): import sys self.assert_(hasattr(sys, 'stdout')) self.assertRaises(TypeError, hasattr, sys, 1) self.assertRaises(TypeError, hasattr) -# Jython transition 2.3 -# hasattr, getattr allow unicode identifiers -# http://jython.org/bugs/1768979 -# self.assertRaises(UnicodeError, hasattr, sys, unichr(sys.maxunicode)) + self.assertRaises(UnicodeError, hasattr, sys, unichr(sys.maxunicode)) def test_hash(self): hash(None)