Update of /cvsroot/pywin32/pywin32/com/win32comext/axscript/client
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4261/com/win32comext/axscript/client
Modified Files:
Tag: py3k
error.py
Log Message:
merge lots of changes (most via 2to3) from the trunk
Index: error.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axscript/client/error.py,v
retrieving revision 1.9.2.4
retrieving revision 1.9.2.5
diff -C2 -d -r1.9.2.4 -r1.9.2.5
*** error.py 27 Nov 2008 11:31:05 -0000 1.9.2.4
--- error.py 5 Jan 2009 12:51:27 -0000 1.9.2.5
***************
*** 164,184 ****
bits.extend(traceback.format_exception_only(exc_type, value))
! # XXX - this block appears completely bogus??? The UTF8
! # comment below is from well before py3k, so utf8 doesn't have
! # any special status in py2k. Most likely is that this was
! # simply an artifact of an invalid test (which remains - it
! # raises a RuntimeError with a *string* with extended
! # characters.)
! # Sadly, the test still fails in the same way if you raise a
! # Unicode string with an extended char. This block keeps the
! # tests passing, so it remains.
! # XXX - todo - read the above, and fix below!
!
! # all items in the list are utf8 courtesy of Python magically
! # converting unicode to utf8 before compilation.
! for i in range(len(bits)):
! if type(bits[i]) is str:
! #assert type(bits[i]) is str, type(bits[i])
! bits[i] = bits[i].decode('utf8')
self.description = ExpandTabs(''.join(bits))
--- 164,181 ----
bits.extend(traceback.format_exception_only(exc_type, value))
! # XXX - this utf8 encoding seems bogus. From well before py3k,
! # we had the comment:
! # > all items in the list are utf8 courtesy of Python magically
! # > converting unicode to utf8 before compilation.
! # but that is likely just confusion from early unicode days;
! # Python isn't doing it, pywin32 probably was, so 'mbcs' would
! # be the default encoding. We should never hit this these days
! # anyway, but on py3k, we *never* will, and str objects there
! # don't have a decode method...
! if sys.version_info < (3,):
! for i in range(len(bits)):
! if type(bits[i]) is str:
! #assert type(bits[i]) is str, type(bits[i])
! bits[i] = bits[i].decode('utf8')
self.description = ExpandTabs(''.join(bits))
|