[Python-checkins] CVS: python/dist/src/Lib HTMLParser.py,1.7,1.8 hmac.py,1.1,1.2 posixpath.py,1.44,1.45 smtplib.py,1.42,1.43 threading.py,1.18,1.19 zipfile.py,1.16,1.17
Tim Peters
tim_one@users.sourceforge.net
Mon, 17 Sep 2001 19:26:41 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv9419/python/Lib
Modified Files:
HTMLParser.py hmac.py posixpath.py smtplib.py threading.py
zipfile.py
Log Message:
Whitespace normalization.
Index: HTMLParser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/HTMLParser.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** HTMLParser.py 2001/09/04 16:26:03 1.7
--- HTMLParser.py 2001/09/18 02:26:38 1.8
***************
*** 440,444 ****
# all done
return j + 1
!
def parse_doctype_notation(self, i, declstartpos):
name, j = self.scan_name(i, declstartpos)
--- 440,444 ----
# all done
return j + 1
!
def parse_doctype_notation(self, i, declstartpos):
name, j = self.scan_name(i, declstartpos)
Index: hmac.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/hmac.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** hmac.py 2001/09/11 15:54:00 1.1
--- hmac.py 2001/09/18 02:26:39 1.2
***************
*** 10,19 ****
"""
return "".join(map(lambda x, y: chr(ord(x) ^ ord(y)), s1, s2))
!
class HMAC:
"""RFC2104 HMAC class.
This (mostly) supports the API for Cryptographic Hash Functions (PEP 247).
! """
def __init__(self, key, msg = None, digestmod = None):
--- 10,19 ----
"""
return "".join(map(lambda x, y: chr(ord(x) ^ ord(y)), s1, s2))
!
class HMAC:
"""RFC2104 HMAC class.
This (mostly) supports the API for Cryptographic Hash Functions (PEP 247).
! """
def __init__(self, key, msg = None, digestmod = None):
***************
*** 81,85 ****
key: The starting key for the hash.
msg: if available, will immediately be hashed into the object's starting
! state.
You can now feed arbitrary strings into the object using its update()
--- 81,85 ----
key: The starting key for the hash.
msg: if available, will immediately be hashed into the object's starting
! state.
You can now feed arbitrary strings into the object using its update()
Index: posixpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/posixpath.py,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** posixpath.py 2001/09/17 15:16:09 1.44
--- posixpath.py 2001/09/18 02:26:39 1.45
***************
*** 399,402 ****
newpath = join(*([resolved] + bits[i:]))
return realpath(newpath)
!
return filename
--- 399,402 ----
newpath = join(*([resolved] + bits[i:]))
return realpath(newpath)
!
return filename
Index: smtplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/smtplib.py,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** smtplib.py 2001/09/14 16:08:14 1.42
--- smtplib.py 2001/09/18 02:26:39 1.43
***************
*** 127,131 ****
class SSLFakeSocket:
"""A fake socket object that really wraps a SSLObject.
!
It only supports what is needed in smtplib.
"""
--- 127,131 ----
class SSLFakeSocket:
"""A fake socket object that really wraps a SSLObject.
!
It only supports what is needed in smtplib.
"""
***************
*** 143,147 ****
class SSLFakeFile:
"""A fake file like object that really wraps a SSLObject.
!
It only supports what is needed in smtplib.
"""
--- 143,147 ----
class SSLFakeFile:
"""A fake file like object that really wraps a SSLObject.
!
It only supports what is needed in smtplib.
"""
***************
*** 525,529 ****
break
if self.debuglevel > 0: print "AuthMethod:", authmethod
!
if authmethod == AUTH_CRAM_MD5:
(code, resp) = self.docmd("AUTH", AUTH_CRAM_MD5)
--- 525,529 ----
break
if self.debuglevel > 0: print "AuthMethod:", authmethod
!
if authmethod == AUTH_CRAM_MD5:
(code, resp) = self.docmd("AUTH", AUTH_CRAM_MD5)
***************
*** 533,537 ****
(code, resp) = self.docmd(encode_cram_md5(resp, user, password))
elif authmethod == AUTH_PLAIN:
! (code, resp) = self.docmd("AUTH",
AUTH_PLAIN + " " + encode_plain(user, password))
elif authmethod == None:
--- 533,537 ----
(code, resp) = self.docmd(encode_cram_md5(resp, user, password))
elif authmethod == AUTH_PLAIN:
! (code, resp) = self.docmd("AUTH",
AUTH_PLAIN + " " + encode_plain(user, password))
elif authmethod == None:
***************
*** 545,549 ****
def starttls(self, keyfile = None, certfile = None):
"""Puts the connection to the SMTP server into TLS mode.
!
If the server supports TLS, this will encrypt the rest of the SMTP
session. If you provide the keyfile and certfile parameters,
--- 545,549 ----
def starttls(self, keyfile = None, certfile = None):
"""Puts the connection to the SMTP server into TLS mode.
!
If the server supports TLS, this will encrypt the rest of the SMTP
session. If you provide the keyfile and certfile parameters,
***************
*** 552,556 ****
certificates.
"""
! (resp, reply) = self.docmd("STARTTLS")
if resp == 220:
sslobj = socket.ssl(self.sock, keyfile, certfile)
--- 552,556 ----
certificates.
"""
! (resp, reply) = self.docmd("STARTTLS")
if resp == 220:
sslobj = socket.ssl(self.sock, keyfile, certfile)
***************
*** 558,562 ****
self.file = SSLFakeFile(sslobj)
return (resp, reply)
!
def sendmail(self, from_addr, to_addrs, msg, mail_options=[],
rcpt_options=[]):
--- 558,562 ----
self.file = SSLFakeFile(sslobj)
return (resp, reply)
!
def sendmail(self, from_addr, to_addrs, msg, mail_options=[],
rcpt_options=[]):
Index: threading.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/threading.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** threading.py 2001/09/05 13:44:54 1.18
--- threading.py 2001/09/18 02:26:39 1.19
***************
*** 490,499 ****
class _Timer(Thread):
"""Call a function after a specified number of seconds:
!
t = Timer(30.0, f, args=[], kwargs={})
t.start()
t.cancel() # stop the timer's action if it's still waiting
"""
!
def __init__(self, interval, function, args=[], kwargs={}):
Thread.__init__(self)
--- 490,499 ----
class _Timer(Thread):
"""Call a function after a specified number of seconds:
!
t = Timer(30.0, f, args=[], kwargs={})
t.start()
t.cancel() # stop the timer's action if it's still waiting
"""
!
def __init__(self, interval, function, args=[], kwargs={}):
Thread.__init__(self)
***************
*** 503,511 ****
self.kwargs = kwargs
self.finished = Event()
!
def cancel(self):
"""Stop the timer if it hasn't finished yet"""
self.finished.set()
!
def run(self):
self.finished.wait(self.interval)
--- 503,511 ----
self.kwargs = kwargs
self.finished = Event()
!
def cancel(self):
"""Stop the timer if it hasn't finished yet"""
self.finished.set()
!
def run(self):
self.finished.wait(self.interval)
Index: zipfile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/zipfile.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** zipfile.py 2001/09/05 18:40:33 1.16
--- zipfile.py 2001/09/18 02:26:39 1.17
***************
*** 418,422 ****
zinfo.file_size = file_size
# Seek backwards and write CRC and file sizes
! position = self.fp.tell() # Preserve current position in file
self.fp.seek(zinfo.header_offset + 14, 0)
self.fp.write(struct.pack("<lll", zinfo.CRC, zinfo.compress_size,
--- 418,422 ----
zinfo.file_size = file_size
# Seek backwards and write CRC and file sizes
! position = self.fp.tell() # Preserve current position in file
self.fp.seek(zinfo.header_offset + 14, 0)
self.fp.write(struct.pack("<lll", zinfo.CRC, zinfo.compress_size,