Index: Lib/binhex.py =================================================================== --- Lib/binhex.py (revision 76934) +++ Lib/binhex.py (working copy) @@ -170,7 +170,8 @@ del self.ofp class BinHex: - def __init__(self, (name, finfo, dlen, rlen), ofp): + def __init__(self, ifinfo, ofp): + name, finfo, dlen, rlen = ifinfo if type(ofp) == type(''): ofname = ofp ofp = open(ofname, 'w') Index: Lib/bsddb/__init__.py =================================================================== --- Lib/bsddb/__init__.py (revision 76934) +++ Lib/bsddb/__init__.py (working copy) @@ -44,7 +44,7 @@ if sys.py3kwarning: import warnings - warnings.warnpy3k("in 3.x, bsddb has been removed; " + warnings.warnpy3k("in 3.x, the bsddb module has been removed; " "please use the pybsddb project instead", DeprecationWarning, 2) Index: Lib/dbhash.py =================================================================== --- Lib/dbhash.py (revision 76934) +++ Lib/dbhash.py (working copy) @@ -3,7 +3,7 @@ import sys if sys.py3kwarning: import warnings - warnings.warnpy3k("in 3.x, dbhash has been removed", DeprecationWarning, 2) + warnings.warnpy3k("in 3.x, the dbhash module has been removed", DeprecationWarning, 2) try: import bsddb except ImportError: Index: Lib/formatter.py =================================================================== --- Lib/formatter.py (revision 76934) +++ Lib/formatter.py (working copy) @@ -228,7 +228,8 @@ self.align = None self.writer.new_alignment(None) - def push_font(self, (size, i, b, tt)): + def push_font(self, font): + size, i, b, tt = font if self.softspace: self.hard_break = self.para_end = self.softspace = 0 self.nospace = 1 Index: Lib/imputil.py =================================================================== --- Lib/imputil.py (revision 76934) +++ Lib/imputil.py (working copy) @@ -281,7 +281,8 @@ setattr(parent, modname, module) return module - def _process_result(self, (ispkg, code, values), fqname): + def _process_result(self, result, fqname): + ispkg, code, values = result # did get_code() return an actual module? (rather than a code object) is_module = isinstance(code, _ModuleType) Index: Lib/lib2to3/pgen2/tokenize.py =================================================================== --- Lib/lib2to3/pgen2/tokenize.py (revision 76934) +++ Lib/lib2to3/pgen2/tokenize.py (working copy) @@ -144,7 +144,9 @@ class StopTokenizing(Exception): pass -def printtoken(type, token, (srow, scol), (erow, ecol), line): # for testing +def printtoken(type, token, start, end, line): # for testing + srow, scol = start + erow, ecol = end print "%d,%d-%d,%d:\t%s\t%s" % \ (srow, scol, erow, ecol, tok_name[type], repr(token)) Index: Lib/mailbox.py =================================================================== --- Lib/mailbox.py (revision 76934) +++ Lib/mailbox.py (working copy) @@ -18,7 +18,6 @@ import email import email.message import email.generator -import rfc822 import StringIO try: if sys.platform == 'os2emx': @@ -28,6 +27,13 @@ except ImportError: fcntl = None +import warnings +with warnings.catch_warnings(): + if sys.py3kwarning: + warnings.filterwarnings("ignore", ".*rfc822 has been removed", + DeprecationWarning) + import rfc822 + __all__ = [ 'Mailbox', 'Maildir', 'mbox', 'MH', 'Babyl', 'MMDF', 'Message', 'MaildirMessage', 'mboxMessage', 'MHMessage', 'BabylMessage', 'MMDFMessage', 'UnixMailbox', Index: Lib/pstats.py =================================================================== --- Lib/pstats.py (revision 76934) +++ Lib/pstats.py (working copy) @@ -442,12 +442,12 @@ if nc == 0: print >> self.stream, ' '*8, else: - print >> self.stream, f8(tt/nc), + print >> self.stream, f8(float(tt)/nc), print >> self.stream, f8(ct), if cc == 0: print >> self.stream, ' '*8, else: - print >> self.stream, f8(ct/cc), + print >> self.stream, f8(float(ct)/cc), print >> self.stream, func_std_string(func) class TupleComp: Index: Lib/sets.py =================================================================== --- Lib/sets.py (revision 76934) +++ Lib/sets.py (working copy) @@ -54,29 +54,7 @@ # - Raymond Hettinger added a number of speedups and other # improvements. -from __future__ import generators -try: - from itertools import ifilter, ifilterfalse -except ImportError: - # Code to make the module run under Py2.2 - def ifilter(predicate, iterable): - if predicate is None: - def predicate(x): - return x - for x in iterable: - if predicate(x): - yield x - def ifilterfalse(predicate, iterable): - if predicate is None: - def predicate(x): - return x - for x in iterable: - if not predicate(x): - yield x - try: - True, False - except NameError: - True, False = (0==0, 0!=0) +from itertools import ifilter, ifilterfalse __all__ = ['BaseSet', 'Set', 'ImmutableSet'] Index: Lib/wave.py =================================================================== --- Lib/wave.py (revision 76934) +++ Lib/wave.py (working copy) @@ -384,7 +384,8 @@ def getcompname(self): return self._compname - def setparams(self, (nchannels, sampwidth, framerate, nframes, comptype, compname)): + def setparams(self, params): + nchannels, sampwidth, framerate, nframes, comptype, compname = params if self._datawritten: raise Error, 'cannot change parameters after starting to write' self.setnchannels(nchannels) Index: Lib/webbrowser.py =================================================================== --- Lib/webbrowser.py (revision 76934) +++ Lib/webbrowser.py (working copy) @@ -650,7 +650,7 @@ for o, a in opts: if o == '-n': new_win = 1 elif o == '-t': new_win = 2 - if len(args) <> 1: + if len(args) != 1: print >>sys.stderr, usage sys.exit(1)