Update of /cvsroot/wpdev/xmlscripts/python-lib
In directory sc8-pr-cvs1:/tmp/cvs-serv5168
Modified Files:
aifc.py anydbm.py asynchat.py asyncore.py atexit.py
BaseHTTPServer.py Bastion.py bdb.py calendar.py cgi.py
CGIHTTPServer.py cgitb.py chunk.py cmd.py code.py codecs.py
codeop.py compileall.py ConfigParser.py Cookie.py copy.py
copy_reg.py dbhash.py difflib.py dircache.py dis.py doctest.py
dumbdbm.py filecmp.py fileinput.py fnmatch.py formatter.py
ftplib.py getopt.py getpass.py gettext.py gopherlib.py gzip.py
hmac.py htmlentitydefs.py htmllib.py HTMLParser.py httplib.py
ihooks.py imaplib.py imputil.py inspect.py keyword.py
linecache.py locale.py macpath.py mailbox.py mailcap.py
markupbase.py mhlib.py mimetools.py mimetypes.py mimify.py
multifile.py mutex.py netrc.py nntplib.py ntpath.py os.py
pdb.py pickle.py pipes.py popen2.py poplib.py posixpath.py
pprint.py pre.py profile.py pstats.py pty.py py_compile.py
pyclbr.py pydoc.py Queue.py quopri.py random.py re.py
regsub.py repr.py rexec.py rfc822.py rlcompleter.py
robotparser.py sched.py sgmllib.py shelve.py shlex.py
shutil.py SimpleHTTPServer.py SimpleXMLRPCServer.py site.py
smtpd.py smtplib.py socket.py SocketServer.py sre.py
sre_compile.py sre_constants.py sre_parse.py statcache.py
string.py StringIO.py symbol.py symtable.py tabnanny.py
telnetlib.py tempfile.py threading.py toaiff.py token.py
tokenize.py traceback.py types.py unittest.py urllib.py
urllib2.py urlparse.py user.py UserDict.py UserList.py
UserString.py uu.py warnings.py weakref.py webbrowser.py
whichdb.py xdrlib.py xmllib.py xmlrpclib.py zipfile.py
Log Message:
Updated to Python 2.3.2
Index: aifc.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/python-lib/aifc.py,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** aifc.py 1 Jul 2002 01:55:58 -0000 1.1.1.1
--- aifc.py 10 Nov 2003 12:44:15 -0000 1.2
***************
*** 143,147 ****
pass
! _AIFC_version = 0xA2805140 # Version 1 of AIFF-C
_skiplist = 'COMT', 'INST', 'MIDI', 'AESD', \
--- 143,147 ----
pass
! _AIFC_version = 0xA2805140L # Version 1 of AIFF-C
_skiplist = 'COMT', 'INST', 'MIDI', 'AESD', \
***************
*** 179,183 ****
def _read_float(f): # 10 bytes
- import math
expon = _read_short(f) # 2 bytes
sign = 1
--- 179,182 ----
***************
*** 311,315 ****
self._ssnd_seek_needed = 0
elif chunkname == 'FVER':
! self._version = _read_long(chunk)
elif chunkname == 'MARK':
self._readmark(chunk)
--- 310,314 ----
self._ssnd_seek_needed = 0
elif chunkname == 'FVER':
! self._version = _read_ulong(chunk)
elif chunkname == 'MARK':
self._readmark(chunk)
***************
*** 747,752 ****
def _comp_data(self, data):
import cl
! dum = self._comp.SetParam(cl.FRAME_BUFFER_SIZE, len(data))
! dum = self._comp.SetParam(cl.COMPRESSED_BUFFER_SIZE, len(data))
return self._comp.Compress(self._nframes, data)
--- 746,751 ----
def _comp_data(self, data):
import cl
! dummy = self._comp.SetParam(cl.FRAME_BUFFER_SIZE, len(data))
! dummy = self._comp.SetParam(cl.COMPRESSED_BUFFER_SIZE, len(data))
return self._comp.Compress(self._nframes, data)
***************
*** 785,789 ****
def _init_compression(self):
if self._comptype == 'G722':
- import audioop
self._convert = self._lin2adpcm
return
--- 784,787 ----
Index: anydbm.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/python-lib/anydbm.py,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** anydbm.py 1 Jul 2002 01:55:58 -0000 1.1.1.1
--- anydbm.py 10 Nov 2003 12:44:15 -0000 1.2
***************
*** 26,30 ****
del d[key] # delete data stored at key (raises KeyError
# if no such key)
! flag = d.has_key(key) # true if the key exists
list = d.keys() # return a list of all existing keys (slow!)
--- 26,30 ----
del d[key] # delete data stored at key (raises KeyError
# if no such key)
! flag = key in d # true if the key exists
list = d.keys() # return a list of all existing keys (slow!)
***************
*** 43,51 ****
"""
! try:
! class error(Exception):
! pass
! except (NameError, TypeError):
! error = "anydbm.error"
_names = ['dbhash', 'gdbm', 'dbm', 'dumbdbm']
--- 43,48 ----
"""
! class error(Exception):
! pass
_names = ['dbhash', 'gdbm', 'dbm', 'dumbdbm']
Index: asynchat.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/python-lib/asynchat.py,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** asynchat.py 1 Jul 2002 01:55:58 -0000 1.1.1.1
--- asynchat.py 10 Nov 2003 12:44:15 -0000 1.2
***************
*** 65,68 ****
--- 65,74 ----
asyncore.dispatcher.__init__ (self, conn)
+ def collect_incoming_data(self, data):
+ raise NotImplementedError, "must be implemented in subclass"
+
+ def found_terminator(self):
+ raise NotImplementedError, "must be implemented in subclass"
+
def set_terminator (self, term):
"Set the input delimiter. Can be a fixed string of any length, an integer, or None"
***************
*** 95,103 ****
lb = len(self.ac_in_buffer)
terminator = self.get_terminator()
! if terminator is None:
# no terminator, collect it all
self.collect_incoming_data (self.ac_in_buffer)
self.ac_in_buffer = ''
! elif type(terminator) == type(0):
# numeric terminator
n = terminator
--- 101,109 ----
lb = len(self.ac_in_buffer)
terminator = self.get_terminator()
! if terminator is None or terminator == '':
# no terminator, collect it all
self.collect_incoming_data (self.ac_in_buffer)
self.ac_in_buffer = ''
! elif isinstance(terminator, int):
# numeric terminator
n = terminator
***************
*** 178,182 ****
# of the first producer in the queue
def refill_buffer (self):
- _string_type = type('')
while 1:
if len(self.producer_fifo):
--- 184,187 ----
***************
*** 189,193 ****
self.close()
return
! elif type(p) is _string_type:
self.producer_fifo.pop()
self.ac_out_buffer = self.ac_out_buffer + p
--- 194,198 ----
self.close()
return
! elif isinstance(p, str):
self.producer_fifo.pop()
self.ac_out_buffer = self.ac_out_buffer + p
***************
*** 264,270 ****
def pop (self):
if self.list:
! result = self.list[0]
! del self.list[0]
! return (1, result)
else:
return (0, None)
--- 269,273 ----
def pop (self):
if self.list:
! return (1, self.list.pop(0))
else:
return (0, None)
***************
*** 275,293 ****
# for example:
# f_p_a_e ("qwerty\r", "\r\n") => 1
- # f_p_a_e ("qwerty\r\n", "\r\n") => 2
# f_p_a_e ("qwertydkjf", "\r\n") => 0
# this could maybe be made faster with a computed regex?
# [answer: no; circa Python-2.0, Jan 2001]
! # python: 18307/s
# re: 12820/s
# regex: 14035/s
def find_prefix_at_end (haystack, needle):
! nl = len(needle)
! result = 0
! for i in range (1,nl):
! if haystack[-(nl-i):] == needle[:(nl-i)]:
! result = nl-i
! break
! return result
--- 278,294 ----
# for example:
# f_p_a_e ("qwerty\r", "\r\n") => 1
# f_p_a_e ("qwertydkjf", "\r\n") => 0
+ # f_p_a_e ("qwerty\r\n", "\r\n") => <undefined>
# this could maybe be made faster with a computed regex?
# [answer: no; circa Python-2.0, Jan 2001]
! # new python: 28961/s
! # old python: 18307/s
# re: 12820/s
# regex: 14035/s
def find_prefix_at_end (haystack, needle):
! l = len(needle) - 1
! while l and not haystack.endswith(needle[:l]):
! l -= 1
! return l
Index: asyncore.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/python-lib/asyncore.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** asyncore.py 21 Dec 2002 14:52:54 -0000 1.2
--- asyncore.py 10 Nov 2003 12:44:15 -0000 1.3
***************
*** 62,71 ****
socket_map = {}
! class ExitNow (exceptions.Exception):
pass
! DEBUG = 0
! def poll (timeout=0.0, map=None):
if map is None:
map = socket_map
--- 62,96 ----
socket_map = {}
! class ExitNow(exceptions.Exception):
pass
! def read(obj):
! try:
! obj.handle_read_event()
! except ExitNow:
! raise
! except:
! obj.handle_error()
! def write(obj):
! try:
! obj.handle_write_event()
! except ExitNow:
! raise
! except:
! obj.handle_error()
!
! def readwrite(obj, flags):
! try:
! if flags & select.POLLIN:
! obj.handle_read_event()
! if flags & select.POLLOUT:
! obj.handle_write_event()
! except ExitNow:
! raise
! except:
! obj.handle_error()
!
! def poll(timeout=0.0, map=None):
if map is None:
map = socket_map
***************
*** 74,123 ****
for fd, obj in map.items():
if obj.readable():
! r.append (fd)
if obj.writable():
! w.append (fd)
if [] == r == w == e:
time.sleep(timeout)
else:
try:
! r,w,e = select.select (r,w,e, timeout)
except select.error, err:
if err[0] != EINTR:
raise
! r = []; w = []; e = []
!
! if DEBUG:
! print r,w,e
for fd in r:
! try:
! obj = map[fd]
! except KeyError:
continue
!
! try:
! obj.handle_read_event()
! except ExitNow:
! raise ExitNow
! except:
! obj.handle_error()
for fd in w:
! try:
! obj = map[fd]
! except KeyError:
continue
! try:
! obj.handle_write_event()
! except ExitNow:
! raise ExitNow
! except:
! obj.handle_error()
!
! def poll2 (timeout=0.0, map=None):
import poll
if map is None:
! map=socket_map
if timeout is not None:
# timeout is in milliseconds
--- 99,132 ----
for fd, obj in map.items():
if obj.readable():
! r.append(fd)
if obj.writable():
! w.append(fd)
if [] == r == w == e:
time.sleep(timeout)
else:
try:
! r, w, e = select.select(r, w, e, timeout)
except select.error, err:
if err[0] != EINTR:
raise
! else:
! return
for fd in r:
! obj = map.get(fd)
! if obj is None:
continue
! read(obj)
for fd in w:
! obj = map.get(fd)
! if obj is None:
continue
+ write(obj)
! def poll2(timeout=0.0, map=None):
import poll
if map is None:
! map = socket_map
if timeout is not None:
# timeout is in milliseconds
***************
*** 132,157 ****
flags = flags | poll.POLLOUT
if flags:
! l.append ((fd, flags))
! r = poll.poll (l, timeout)
for fd, flags in r:
! try:
! obj = map[fd]
! except KeyError:
continue
! try:
! if (flags & poll.POLLIN):
! obj.handle_read_event()
! if (flags & poll.POLLOUT):
! obj.handle_write_event()
! except ExitNow:
! raise ExitNow
! except:
! obj.handle_error()
!
! def poll3 (timeout=0.0, map=None):
# Use the poll() support added to the select module in Python 2.0
if map is None:
! map=socket_map
if timeout is not None:
# timeout is in milliseconds
--- 141,156 ----
flags = flags | poll.POLLOUT
if flags:
! l.append((fd, flags))
! r = poll.poll(l, timeout)
for fd, flags in r:
! obj = map.get(fd)
! if obj is None:
continue
+ readwrite(obj, flags)
! def poll3(timeout=0.0, map=None):
# Use the poll() support added to the select module in Python 2.0
if map is None:
! map = socket_map
if timeout is not None:
# timeout is in milliseconds
***************
*** 168,172 ****
pollster.register(fd, flags)
try:
! r = pollster.poll (timeout)
except select.error, err:
if err[0] != EINTR:
--- 167,171 ----
pollster.register(fd, flags)
try:
! r = pollster.poll(timeout)
except select.error, err:
if err[0] != EINTR:
***************
*** 174,199 ****
r = []
for fd, flags in r:
! try:
! obj = map[fd]
! except KeyError:
continue
! try:
! if (flags & select.POLLIN):
! obj.handle_read_event()
! if (flags & select.POLLOUT):
! obj.handle_write_event()
! except ExitNow:
! raise ExitNow
! except:
! obj.handle_error()
!
! def loop (timeout=30.0, use_poll=0, map=None):
!
if map is None:
! map=socket_map
if use_poll:
! if hasattr (select, 'poll'):
poll_fun = poll3
else:
--- 173,187 ----
r = []
for fd, flags in r:
! obj = map.get(fd)
! if obj is None:
continue
+ readwrite(obj, flags)
! def loop(timeout=30.0, use_poll=0, map=None):
if map is None:
! map = socket_map
if use_poll:
! if hasattr(select, 'poll'):
poll_fun = poll3
else:
***************
*** 203,209 ****
while map:
! poll_fun (timeout, map)
class dispatcher:
debug = 0
connected = 0
--- 191,198 ----
while map:
! poll_fun(timeout, map)
class dispatcher:
+
debug = 0
connected = 0
***************
*** 212,220 ****
addr = None
! def __init__ (self, sock=None, map=None):
if sock:
! self.set_socket (sock, map)
# I think it should inherit this anyway
! self.socket.setblocking (0)
self.connected = 1
# XXX Does the constructor require that the socket passed
--- 201,209 ----
addr = None
! def __init__(self, sock=None, map=None):
if sock:
! self.set_socket(sock, map)
# I think it should inherit this anyway
! self.socket.setblocking(0)
self.connected = 1
# XXX Does the constructor require that the socket passed
***************
*** 228,278 ****
self.socket = None
! def __repr__ (self):
status = [self.__class__.__module__+"."+self.__class__.__name__]
if self.accepting and self.addr:
! status.append ('listening')
elif self.connected:
! status.append ('connected')
if self.addr is not None:
try:
! status.append ('%s:%d' % self.addr)
except TypeError:
! status.append (repr(self.addr))
! return '<%s at %#x>' % (' '.join (status), id (self))
! def add_channel (self, map=None):
! #self.log_info ('adding channel %s' % self)
if map is None:
! map=socket_map
! map [self._fileno] = self
! def del_channel (self, map=None):
fd = self._fileno
if map is None:
! map=socket_map
! if map.has_key (fd):
! #self.log_info ('closing channel %d:%s' % (fd, self))
! del map [fd]
! def create_socket (self, family, type):
self.family_and_type = family, type
! self.socket = socket.socket (family, type)
self.socket.setblocking(0)
self._fileno = self.socket.fileno()
self.add_channel()
! def set_socket (self, sock, map=None):
self.socket = sock
## self.__dict__['socket'] = sock
self._fileno = sock.fileno()
! self.add_channel (map)
! def set_reuse_addr (self):
# try to re-use a server port if possible
try:
! self.socket.setsockopt (
socket.SOL_SOCKET, socket.SO_REUSEADDR,
! self.socket.getsockopt (socket.SOL_SOCKET,
! socket.SO_REUSEADDR) | 1
)
except socket.error:
--- 217,267 ----
self.socket = None
! def __repr__(self):
status = [self.__class__.__module__+"."+self.__class__.__name__]
if self.accepting and self.addr:
! status.append('listening')
elif self.connected:
! status.append('connected')
if self.addr is not None:
try:
! status.append('%s:%d' % self.addr)
except TypeError:
! status.append(repr(self.addr))
! return '<%s at %#x>' % (' '.join(status), id(self))
! def add_channel(self, map=None):
! #self.log_info('adding channel %s' % self)
if map is None:
! map = socket_map
! map[self._fileno] = self
! def del_channel(self, map=None):
fd = self._fileno
if map is None:
! map = socket_map
! if map.has_key(fd):
! #self.log_info('closing channel %d:%s' % (fd, self))
! del map[fd]
! def create_socket(self, family, type):
self.family_and_type = family, type
! self.socket = socket.socket(family, type)
self.socket.setblocking(0)
self._fileno = self.socket.fileno()
self.add_channel()
! def set_socket(self, sock, map=None):
self.socket = sock
## self.__dict__['socket'] = sock
self._fileno = sock.fileno()
! self.add_channel(map)
! def set_reuse_addr(self):
# try to re-use a server port if possible
try:
! self.socket.setsockopt(
socket.SOL_SOCKET, socket.SO_REUSEADDR,
! self.socket.getsockopt(socket.SOL_SOCKET,
! socket.SO_REUSEADDR) | 1
)
except socket.error:
***************
*** 285,299 ****
# ==================================================
! def readable (self):
! return 1
if os.name == 'mac':
# The macintosh will select a listening socket for
# write if you let it. What might this mean?
! def writable (self):
return not self.accepting
else:
! def writable (self):
! return 1
# ==================================================
--- 274,288 ----
# ==================================================
! def readable(self):
! return True
if os.name == 'mac':
# The macintosh will select a listening socket for
# write if you let it. What might this mean?
! def writable(self):
return not self.accepting
else:
! def writable(self):
! return True
# ==================================================
***************
*** 301,317 ****
# ==================================================
! def listen (self, num):
self.accepting = 1
if os.name == 'nt' and num > 5:
num = 1
! return self.socket.listen (num)
! def bind (self, addr):
self.addr = addr
! return self.socket.bind (addr)
! def connect (self, address):
self.connected = 0
err = self.socket.connect_ex(address)
if err in (EINPROGRESS, EALREADY, EWOULDBLOCK):
return
--- 290,307 ----
# ==================================================
! def listen(self, num):
self.accepting = 1
if os.name == 'nt' and num > 5:
num = 1
! return self.socket.listen(num)
! def bind(self, addr):
self.addr = addr
! return self.socket.bind(addr)
! def connect(self, address):
self.connected = 0
err = self.socket.connect_ex(address)
+ # XXX Should interpret Winsock return values
if err in (EINPROGRESS, EALREADY, EWOULDBLOCK):
return
***************
*** 323,327 ****
raise socket.error, err
! def accept (self):
try:
conn, addr = self.socket.accept()
--- 313,318 ----
raise socket.error, err
! def accept(self):
! # XXX can return either an address pair or None
try:
conn, addr = self.socket.accept()
***************
*** 333,339 ****
raise socket.error, why
! def send (self, data):
try:
! result = self.socket.send (data)
return result
except socket.error, why:
--- 324,330 ----
raise socket.error, why
! def send(self, data):
try:
! result = self.socket.send(data)
return result
except socket.error, why:
***************
*** 344,350 ****
return 0
! def recv (self, buffer_size):
try:
! data = self.socket.recv (buffer_size)
if not data:
# a closed connection is indicated by signaling
--- 335,341 ----
return 0
! def recv(self, buffer_size):
try:
! data = self.socket.recv(buffer_size)
if not data:
# a closed connection is indicated by signaling
***************
*** 362,366 ****
raise socket.error, why
! def close (self):
self.del_channel()
self.socket.close()
--- 353,357 ----
raise socket.error, why
! def close(self):
self.del_channel()
self.socket.close()
***************
*** 368,386 ****
# cheap inheritance, used to pass all other attribute
# references to the underlying socket object.
! def __getattr__ (self, attr):
! return getattr (self.socket, attr)
! # log and log_info maybe overriden to provide more sophisitcated
# logging and warning methods. In general, log is for 'hit' logging
# and 'log_info' is for informational, warning and error logging.
! def log (self, message):
! sys.stderr.write ('log: %s\n' % str(message))
! def log_info (self, message, type='info'):
if __debug__ or type != 'info':
print '%s: %s' % (type, message)
! def handle_read_event (self):
if self.accepting:
# for an accepting socket, getting a read implies
--- 359,377 ----
# cheap inheritance, used to pass all other attribute
# references to the underlying socket object.
! def __getattr__(self, attr):
! return getattr(self.socket, attr)
! # log and log_info may be overridden to provide more sophisticated
# logging and warning methods. In general, log is for 'hit' logging
# and 'log_info' is for informational, warning and error logging.
! def log(self, message):
! sys.stderr.write('log: %s\n' % str(message))
! def log_info(self, message, type='info'):
if __debug__ or type != 'info':
print '%s: %s' % (type, message)
! def handle_read_event(self):
if self.accepting:
# for an accepting socket, getting a read implies
***************
*** 396,400 ****
self.handle_read()
! def handle_write_event (self):
# getting a write implies that we are connected
if not self.connected:
--- 387,391 ----
self.handle_read()
! def handle_write_event(self):
# getting a write implies that we are connected
if not self.connected:
***************
*** 403,419 ****
self.handle_write()
! def handle_expt_event (self):
self.handle_expt()
! def handle_error (self):
nil, t, v, tbinfo = compact_traceback()
# sometimes a user repr method will crash.
try:
! self_repr = repr (self)
except:
! self_repr = '<__repr__ (self) failed for object at %0x>' % id(self)
! self.log_info (
'uncaptured python exception, closing channel %s (%s:%s %s)' % (
self_repr,
--- 394,410 ----
self.handle_write()
! def handle_expt_event(self):
self.handle_expt()
! def handle_error(self):
nil, t, v, tbinfo = compact_traceback()
# sometimes a user repr method will crash.
try:
! self_repr = repr(self)
except:
! self_repr = '<__repr__(self) failed for object at %0x>' % id(self)
! self.log_info(
'uncaptured python exception, closing channel %s (%s:%s %s)' % (
self_repr,
***************
*** 426,446 ****
self.close()
! def handle_expt (self):
! self.log_info ('unhandled exception', 'warning')
! def handle_read (self):
! self.log_info ('unhandled read event', 'warning')
! def handle_write (self):
! self.log_info ('unhandled write event', 'warning')
! def handle_connect (self):
! self.log_info ('unhandled connect event', 'warning')
! def handle_accept (self):
! self.log_info ('unhandled accept event', 'warning')
! def handle_close (self):
! self.log_info ('unhandled close event', 'warning')
self.close()
--- 417,437 ----
self.close()
! def handle_expt(self):
! self.log_info('unhandled exception', 'warning')
! def handle_read(self):
! self.log_info('unhandled read event', 'warning')
! def handle_write(self):
! self.log_info('unhandled write event', 'warning')
! def handle_connect(self):
! self.log_info('unhandled connect event', 'warning')
! def handle_accept(self):
! self.log_info('unhandled accept event', 'warning')
! def handle_close(self):
! self.log_info('unhandled close event', 'warning')
self.close()
***************
*** 450,472 ****
# ---------------------------------------------------------------------------
! class dispatcher_with_send (dispatcher):
! def __init__ (self, sock=None):
! dispatcher.__init__ (self, sock)
self.out_buffer = ''
! def initiate_send (self):
num_sent = 0
! num_sent = dispatcher.send (self, self.out_buffer[:512])
self.out_buffer = self.out_buffer[num_sent:]
! def handle_write (self):
self.initiate_send()
! def writable (self):
return (not self.connected) or len(self.out_buffer)
! def send (self, data):
if self.debug:
! self.log_info ('sending %s' % repr(data))
self.out_buffer = self.out_buffer + data
self.initiate_send()
--- 441,464 ----
# ---------------------------------------------------------------------------
! class dispatcher_with_send(dispatcher):
!
! def __init__(self, sock=None):
! dispatcher.__init__(self, sock)
self.out_buffer = ''
! def initiate_send(self):
num_sent = 0
! num_sent = dispatcher.send(self, self.out_buffer[:512])
self.out_buffer = self.out_buffer[num_sent:]
! def handle_write(self):
self.initiate_send()
! def writable(self):
return (not self.connected) or len(self.out_buffer)
! def send(self, data):
if self.debug:
! self.log_info('sending %s' % repr(data))
self.out_buffer = self.out_buffer + data
self.initiate_send()
***************
*** 476,484 ****
# ---------------------------------------------------------------------------
! def compact_traceback ():
! t,v,tb = sys.exc_info()
tbinfo = []
! while 1:
! tbinfo.append ((
tb.tb_frame.f_code.co_filename,
tb.tb_frame.f_code.co_name,
--- 468,477 ----
# ---------------------------------------------------------------------------
! def compact_traceback():
! t, v, tb = sys.exc_info()
tbinfo = []
! assert tb # Must have a traceback
! while tb:
! tbinfo.append((
tb.tb_frame.f_code.co_filename,
tb.tb_frame.f_code.co_name,
***************
*** 486,491 ****
))
tb = tb.t...
[truncated message content] |