Index: twisted/test/test_compat.py
===================================================================
--- twisted/test/test_compat.py	(revision 34350)
+++ twisted/test/test_compat.py	(working copy)
@@ -80,12 +80,13 @@
         self.assertEqual(lst1, lst2)
 
     def testIsinstance(self):
-        self.assert_(isinstance(u'hi', types.StringTypes))
-        self.assert_(isinstance(self, unittest.TestCase))
-        # I'm pretty sure it's impossible to implement this
-        # without replacing isinstance on 2.2 as well :(
-        # self.assert_(isinstance({}, dict))
+        """
+        The current object is an instance of
+        unittest.TestCase.
+        """
+        self.assertTrue(isinstance(self, unittest.TestCase))
 
+
     def testStrip(self):
         self.assertEqual(' x '.lstrip(' '), 'x ')
         self.assertEqual(' x x'.lstrip(' '), 'x x')
Index: twisted/test/test_defgen.py
===================================================================
--- twisted/test/test_defgen.py	(revision 34350)
+++ twisted/test/test_defgen.py	(working copy)
@@ -1,5 +1,12 @@
-from __future__ import generators, nested_scopes
+"""
+__future__.nested_scopes is not imported anymore. nested_scopes was used to add
+Python 2.1 support (see http://www.python.org/dev/peps/pep-0227/). Twisted does
+not support Python 2.1.
 
+__future__.generators is not imported anymore as it is Python 2.2 specific.
+Twisted no longer supports Python 2.2.
+"""
+
 import sys
 
 from twisted.internet import reactor
Index: twisted/python/filepath.py
===================================================================
--- twisted/python/filepath.py	(revision 34350)
+++ twisted/python/filepath.py	(working copy)
@@ -873,7 +873,7 @@
 
     def getInodeNumber(self):
         """
-        Retrieve the file serial number, also called inode number, which 
+        Retrieve the file serial number, also called inode number, which
         distinguishes this file from all other files on the same device.
 
         @raise: NotImplementedError if the platform is Windows, since the
@@ -1046,7 +1046,7 @@
         """
         Returns whether the underlying path is a block device.
 
-        @return: C{True} if it is a block device, C{False} otherwise 
+        @return: C{True} if it is a block device, C{False} otherwise
         @rtype: C{bool}
         @since: 11.1
         """
@@ -1063,7 +1063,7 @@
         """
         Returns whether the underlying path is a socket.
 
-        @return: C{True} if it is a socket, C{False} otherwise 
+        @return: C{True} if it is a socket, C{False} otherwise
         @rtype: C{bool}
         @since: 11.1
         """
@@ -1254,8 +1254,6 @@
         os.rename(sib.path, self.path)
 
 
-    # new in 2.2.0
-
     def __cmp__(self, other):
         if not isinstance(other, FilePath):
             return NotImplemented
Index: twisted/protocols/ident.py
===================================================================
--- twisted/protocols/ident.py	(revision 34350)
+++ twisted/protocols/ident.py	(working copy)
@@ -5,11 +5,12 @@
 """
 Ident protocol implementation.
 
+__future__.generators is not imported anymore as it is Python 2.2 specific.
+Twisted no longer supports Python 2.2.
+
 @author: Jean-Paul Calderone
 """
 
-from __future__ import generators
-
 import struct
 
 from twisted.internet import defer
Index: twisted/protocols/htb.py
===================================================================
--- twisted/protocols/htb.py	(revision 34350)
+++ twisted/protocols/htb.py	(working copy)
@@ -9,6 +9,10 @@
 Patterned after U{Martin Devera's Hierarchical Token Bucket traffic
 shaper for the Linux kernel<http://luxik.cdi.cz/~devik/qos/htb/>}.
 
+__future__.nested_scopes is not imported anymore. nested_scopes was used to add
+Python 2.1 support (see http://www.python.org/dev/peps/pep-0227/). Twisted does
+not support Python 2.1.
+
 @seealso: U{HTB Linux queuing discipline manual - user guide
   <http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm>}
 @seealso: U{Token Bucket Filter in Linux Advanced Routing & Traffic Control
@@ -16,7 +20,6 @@
 @author: Kevin Turner
 """
 
-from __future__ import nested_scopes
 
 __version__ = '$Revision: 1.5 $'[11:-2]
 
Index: twisted/topfiles/5385.misc
===================================================================
--- twisted/topfiles/5385.misc	(revision 0)
+++ twisted/topfiles/5385.misc	(revision 0)
@@ -0,0 +1 @@
+twisted no longer supports Python 2.2.
Index: twisted/scripts/tkunzip.py
===================================================================
--- twisted/scripts/tkunzip.py	(revision 34350)
+++ twisted/scripts/tkunzip.py	(working copy)
@@ -3,11 +3,12 @@
 # See LICENSE for details.
 
 """
-Post-install GUI to compile to pyc and unpack twisted doco
+Post-install GUI to compile to pyc and unpack twisted doco.
+
+__future__.generators is not imported anymore as it is Python 2.2 specific.
+Twisted no longer supports Python 2.2.
 """
 
-from __future__ import generators
-
 import sys
 import zipfile
 import py_compile
@@ -15,7 +16,7 @@
 # we're going to ignore failures to import tkinter and fall back
 # to using the console if the required dll is not found
 
-# Scary kludge to work around tk84.dll bug: 
+# Scary kludge to work around tk84.dll bug:
 # https://sourceforge.net/tracker/index.php?func=detail&aid=814654&group_id=5470&atid=105470
 # Without which(): you get a windows missing-dll popup message
 from twisted.python.procutils import which
@@ -71,7 +72,7 @@
 
     def pack(self, *args, **kwargs):
         self.frame.pack(*args, **kwargs)
-    
+
     def updateProgress(self, newValue, newMax=None):
         if newMax:
             self.max = newMax
@@ -91,7 +92,7 @@
               float(value) / self.max * self.width, self.height)
         else:
             self.canvas.coords(self.scale, 0,
-                               self.height - (float(value) / 
+                               self.height - (float(value) /
                                               self.max*self.height),
                                self.width, self.height)
         # Now update the colors
@@ -101,7 +102,7 @@
         if self.doLabel:
             if value:
                 if value >= 0:
-                    pvalue = int((float(value) / float(self.max)) * 
+                    pvalue = int((float(value) / float(self.max)) *
                                    100.0)
                 else:
                     pvalue = 0
@@ -133,7 +134,7 @@
     def setIterator(self, iterator):
         self.iterator=iterator
         return self
-    
+
     def updateBar(self, deferred):
         b=self.bar
         try:
@@ -156,14 +157,14 @@
         if self.stopping:
             deferred.callback(self.root)
             return
-        
+
         try:
             self.remaining=self.iterator.next()
         except StopIteration:
-            self.stopping=1            
+            self.stopping=1
         except:
             deferred.errback(failure.Failure())
-        
+
         if self.remaining%10==0:
             reactor.callLater(0, self.updateBar, deferred)
         if self.remaining%100==0:
@@ -218,7 +219,7 @@
 
     if opt['use-console']:
         # this should come before shell-exec to prevent infinite loop
-        return doItConsolicious(opt)              
+        return doItConsolicious(opt)
     if opt['shell-exec'] or not 'Tkinter' in sys.modules:
         from distutils import sysconfig
         from twisted.scripts import tkunzip
@@ -240,7 +241,7 @@
             if n % 1000 == 0:
                 print
         print 'Done unpacking.'
-        
+
     if opt['compiledir']:
         print 'Compiling to pyc...'
         import compileall
@@ -253,7 +254,7 @@
     root.title('One Moment.')
     root.protocol('WM_DELETE_WINDOW', reactor.stop)
     tksupport.install(root)
-    
+
     prog=ProgressBar(root, value=0, labelColor="black", width=200)
     prog.pack()
 
@@ -265,7 +266,7 @@
         return root
 
     d.addCallback(deiconify)
-    
+
     if opt['zipfile']:
         uz=Progressor('Unpacking documentation...')
         max=zipstream.countZipFileChunks(opt['zipfile'], 4096)
Index: twisted/internet/_threadedselect.py
===================================================================
--- twisted/internet/_threadedselect.py	(revision 34350)
+++ twisted/internet/_threadedselect.py	(working copy)
@@ -3,8 +3,6 @@
 # Copyright (c) Twisted Matrix Laboratories.
 # See LICENSE for details.
 
-from __future__ import generators
-
 """
 Threaded select reactor
 
@@ -54,6 +52,9 @@
 loop.  Shutdown functions that could be used in place of
 "foreignEventloopStop" would be the ExitMainLoop method of the wxApp instance
 with wxPython, or the PyObjCTools.AppHelper.stopEventLoop function.
+
+__future__.generators is not imported anymore as it is Python 2.2 specific.
+Twisted no longer supports Python 2.2.
 """
 
 from threading import Thread
Index: twisted/conch/scripts/tkconch.py
===================================================================
--- twisted/conch/scripts/tkconch.py	(revision 34350)
+++ twisted/conch/scripts/tkconch.py	(working copy)
@@ -5,10 +5,13 @@
 #
 # $Id: tkconch.py,v 1.6 2003/02/22 08:10:15 z3p Exp $
 
-""" Implementation module for the `tkconch` command.
 """
+Implementation module for the `tkconch` command.
 
-from __future__ import nested_scopes
+__future__.nested_scopes is not imported anymore. nested_scopes was used to add
+Python 2.1 support (see http://www.python.org/dev/peps/pep-0227/). Twisted does
+not support Python 2.1.
+"""
 
 import Tkinter, tkFileDialog, tkFont, tkMessageBox, string
 from twisted.conch.ui import tkvt100
@@ -86,8 +89,8 @@
         self.grid_columnconfigure(2, weight=1, minsize=2)
 
         self.master.protocol("WM_DELETE_WINDOW", sys.exit)
-        
 
+
     def getIdentityFile(self):
         r = tkFileDialog.askopenfilename()
         if r:
@@ -160,7 +163,7 @@
             finished = 0
         if finished:
             self.master.quit()
-            self.master.destroy()        
+            self.master.destroy()
             if options['log']:
                 realout = sys.stdout
                 log.startLogging(sys.stderr)
@@ -337,7 +340,7 @@
     raise
 
 class SSHClientFactory(protocol.ClientFactory):
-    noisy = 1 
+    noisy = 1
 
     def stopFactory(self):
         reactor.stop()
@@ -379,15 +382,15 @@
                 host = options['host']
                 khHost = options['host']
             else:
-                host = '%s (%s)' % (options['host'], 
+                host = '%s (%s)' % (options['host'],
                                     self.transport.getPeer()[1])
-                khHost = '%s,%s' % (options['host'], 
+                khHost = '%s,%s' % (options['host'],
                                     self.transport.getPeer()[1])
             keyType = common.getNS(pubKey)[0]
             ques = """The authenticity of host '%s' can't be established.\r
-%s key fingerprint is %s.""" % (host, 
-                                {'ssh-dss':'DSA', 'ssh-rsa':'RSA'}[keyType], 
-                                fingerprint) 
+%s key fingerprint is %s.""" % (host,
+                                {'ssh-dss':'DSA', 'ssh-rsa':'RSA'}[keyType],
+                                fingerprint)
             ques+='\r\nAre you sure you want to continue connecting (yes/no)? '
             return deferredAskFrame(ques, 1).addCallback(self._cbVerifyHostKey, pubKey, khHost, keyType)
 
@@ -405,7 +408,7 @@
             known_hosts.close()
         except:
             log.deferr()
-            raise error.ConchError 
+            raise error.ConchError
 
     def connectionSecure(self):
         if options['user']:
@@ -420,7 +423,7 @@
     def getPassword(self, prompt = None):
         if not prompt:
             prompt = "%s@%s's password: " % (self.user, options['host'])
-        return deferredAskFrame(prompt,0) 
+        return deferredAskFrame(prompt,0)
 
     def getPublicKey(self):
         files = [x for x in options.identitys if x not in self.usedFiles]
@@ -429,15 +432,15 @@
         file = files[0]
         log.msg(file)
         self.usedFiles.append(file)
-        file = os.path.expanduser(file) 
+        file = os.path.expanduser(file)
         file += '.pub'
         if not os.path.exists(file):
             return
         try:
-            return keys.Key.fromFile(file).blob() 
+            return keys.Key.fromFile(file).blob()
         except:
             return self.getPublicKey() # try again
-    
+
     def getPrivateKey(self):
         file = os.path.expanduser(self.usedFiles[-1])
         if not os.path.exists(file):
@@ -467,7 +470,7 @@
         if options.localForwards:
             for localPort, hostport in options.localForwards:
                 reactor.listenTCP(localPort,
-                            forwarding.SSHListenForwardingFactory(self, 
+                            forwarding.SSHListenForwardingFactory(self,
                                 hostport,
                                 forwarding.SSHListenClientForwardingChannel))
         if options.remoteForwards:
@@ -482,7 +485,7 @@
 class SSHSession(channel.SSHChannel):
 
     name = 'session'
-    
+
     def channelOpen(self, foo):
         #global globalSession
         #globalSession = self
@@ -505,7 +508,7 @@
                 #winsz = fcntl.ioctl(fd, tty.TIOCGWINSZ, '12345678')
                 winSize = (25,80,0,0) #struct.unpack('4H', winsz)
                 ptyReqData = session.packRequest_pty_req(term, winSize, '')
-                self.conn.sendRequest(self, 'pty-req', ptyReqData)                
+                self.conn.sendRequest(self, 'pty-req', ptyReqData)
             self.conn.sendRequest(self, 'exec', \
                 common.NS(options['command']))
         else:
Index: twisted/words/im/pbsupport.py
===================================================================
--- twisted/words/im/pbsupport.py	(revision 34350)
+++ twisted/words/im/pbsupport.py	(working copy)
@@ -2,9 +2,13 @@
 # See LICENSE for details.
 
 
-"""L{twisted.words} support for Instance Messenger."""
+"""
+L{twisted.words} support for Instance Messenger.
 
-from __future__ import nested_scopes
+__future__.nested_scopes is not imported anymore. nested_scopes was used to add
+Python 2.1 support (see http://www.python.org/dev/peps/pep-0227/). Twisted does
+not support Python 2.1.
+"""
 
 from twisted.internet import defer
 from twisted.internet import error
Index: twisted/trial/test/detests.py
===================================================================
--- twisted/trial/test/detests.py	(revision 34350)
+++ twisted/trial/test/detests.py	(working copy)
@@ -1,4 +1,8 @@
-from __future__ import generators
+"""
+__future__.generators is not imported anymore as it is Python 2.2 specific.
+Twisted no longer supports Python 2.2.
+"""
+
 from twisted.trial import unittest
 from twisted.internet import defer, threads, reactor
 
@@ -18,7 +22,7 @@
 
 class DeferredSetUpFail(unittest.TestCase):
     testCalled = False
-    
+
     def setUp(self):
         return defer.fail(unittest.FailTest('i fail'))
 
@@ -29,7 +33,7 @@
 
 class DeferredSetUpCallbackFail(unittest.TestCase):
     testCalled = False
-    
+
     def setUp(self):
         d = defer.succeed('value')
         d.addCallback(self._cb_setUpCalled)
@@ -41,10 +45,10 @@
     def test_ok(self):
         DeferredSetUpCallbackFail.testCalled = True
 
-    
+
 class DeferredSetUpError(unittest.TestCase):
     testCalled = False
-    
+
     def setUp(self):
         return defer.fail(RuntimeError('deliberate error'))
 
@@ -54,7 +58,7 @@
 
 class DeferredSetUpNeverFire(unittest.TestCase):
     testCalled = False
-    
+
     def setUp(self):
         return defer.Deferred()
 
@@ -64,7 +68,7 @@
 
 class DeferredSetUpSkip(unittest.TestCase):
     testCalled = False
-    
+
     def setUp(self):
         d = defer.succeed('value')
         d.addCallback(self._cb1)
@@ -79,7 +83,7 @@
 
 class DeferredTests(unittest.TestCase):
     touched = False
-    
+
     def _cb_fail(self, reason):
         self.fail(reason)
 
@@ -134,7 +138,7 @@
 
 class TimeoutTests(unittest.TestCase):
     timedOut = None
-    
+
     def test_pass(self):
         d = defer.Deferred()
         reactor.callLater(0, d.callback, 'hoorj!')
@@ -159,7 +163,7 @@
         return defer.Deferred()
     test_expectedFailure.timeout = 0.1
     test_expectedFailure.todo = "i will get it right, eventually"
-    
+
     def test_skip(self):
         return defer.Deferred()
     test_skip.timeout = 0.1
Index: twisted/spread/ui/gtk2util.py
===================================================================
--- twisted/spread/ui/gtk2util.py	(revision 34350)
+++ twisted/spread/ui/gtk2util.py	(working copy)
@@ -2,9 +2,12 @@
 # Copyright (c) Twisted Matrix Laboratories.
 # See LICENSE for details.
 
+"""
+__future__.nested_scopes is not imported anymore. nested_scopes was used to add
+Python 2.1 support (see http://www.python.org/dev/peps/pep-0227/). Twisted does
+not support Python 2.1.
+"""
 
-from __future__ import nested_scopes
-
 import gtk
 
 from twisted import copyright
Index: doc/core/examples/threadedselect/pygamedemo.py
===================================================================
--- doc/core/examples/threadedselect/pygamedemo.py	(revision 34350)
+++ doc/core/examples/threadedselect/pygamedemo.py	(working copy)
@@ -1,4 +1,7 @@
-from __future__ import generators
+"""
+__future__.generators is not imported anymore as it is Python 2.2 specific.
+Twisted no longer supports Python 2.2.
+"""
 
 # import Twisted and install
 from twisted.internet import _threadedselect
@@ -71,7 +74,7 @@
             reactor.stop()
         elif event.type == KEYDOWN and event.key == K_ESCAPE:
             reactor.stop()
-                
+
     pygame.quit()
 
 if __name__ == '__main__':
Index: doc/core/examples/pbgtk2.py
===================================================================
--- doc/core/examples/pbgtk2.py	(revision 34350)
+++ doc/core/examples/pbgtk2.py	(working copy)
@@ -1,9 +1,12 @@
 # Copyright (c) Twisted Matrix Laboratories.
 # See LICENSE for details.
 
+"""
+__future__.nested_scopes is not imported anymore. nested_scopes was used to add
+Python 2.1 support (see http://www.python.org/dev/peps/pep-0227/). Twisted does
+not support Python 2.1.
+"""
 
-from __future__ import nested_scopes
-
 from twisted.internet import gtk2reactor
 gtk2reactor.install()
 
@@ -67,7 +70,7 @@
         reactor.connectTCP(host, port, client_factory)
         creds = UsernamePassword(userName, password)
         client_factory.login(creds).addCallbacks(self._cbGotPerspective, self._ebFailedLogin)
-        
+
         self.statusMsg("Contacting server...")
 
     def _cbGotPerspective(self, perspective):
@@ -80,7 +83,7 @@
             text = str(reason.value)
         else:
             text = str(reason)
-            
+
         self.statusMsg(text)
         msg = gtk.MessageDialog(self._loginDialog,
                                 gtk.DIALOG_DESTROY_WITH_PARENT,
Index: doc/core/examples/longex2.py
===================================================================
--- doc/core/examples/longex2.py	(revision 34350)
+++ doc/core/examples/longex2.py	(working copy)
@@ -39,8 +39,11 @@
 Multiplying zero numbers is a perfectly sensible operation, and the
 result is 1. In that, this example departs from doc/examples/longex.py,
 which errors out when trying to do this.
+
+__future__.generators is not imported anymore as it is Python 2.2 specific.
+Twisted no longer supports Python 2.2.
 """
-from __future__ import generators
+
 from twisted.protocols import basic
 from twisted.internet import defer, protocol
 
