Index: test/test_defgen.py
===================================================================
--- test/test_defgen.py	(revision 33739)
+++ test/test_defgen.py	(working copy)
@@ -175,9 +175,6 @@
 
 
 
-## This has to be in a string so the new yield syntax doesn't cause a
-## syntax error in Python 2.4 and before.
-inlineCallbacksTestsSource = '''
 from twisted.internet.defer import inlineCallbacks, returnValue
 
 class InlineCallbacksTests(BaseDefgenTests, unittest.TestCase):
@@ -295,15 +292,3 @@
 
         self.assertIn("inlineCallbacks",
             str(self.assertRaises(TypeError, _noYield)))
-
-'''
-
-if sys.version_info > (2, 5):
-    # Load tests
-    exec inlineCallbacksTestsSource
-else:
-    # Make a placeholder test case
-    class InlineCallbacksTests(unittest.TestCase):
-        skip = "defer.defgen doesn't run on python < 2.5."
-        def test_everything(self):
-            pass
Index: python/filepath.py
===================================================================
--- python/filepath.py	(revision 33739)
+++ python/filepath.py	(working copy)
@@ -53,20 +53,6 @@
     return False
 
 
-def _stub_urandom(n):
-    """
-    Provide random data in versions of Python prior to 2.4.  This is an
-    effectively compatible replacement for 'os.urandom'.
-
-    @type n: L{int}
-    @param n: the number of bytes of data to return
-    @return: C{n} bytes of random data.
-    @rtype: str
-    """
-    randomData = [random.randrange(256) for n in xrange(n)]
-    return ''.join(map(chr, randomData))
-
-
 def _stub_armor(s):
     """
     ASCII-armor for random data.  This uses a hex encoding, although we will
@@ -76,7 +62,7 @@
     return s.encode('hex')
 
 islink = getattr(os.path, 'islink', _stub_islink)
-randomBytes = getattr(os, 'urandom', _stub_urandom)
+randomBytes = os.urandom # Retained for historic usage.
 armor = getattr(base64, 'urlsafe_b64encode', _stub_armor)
 
 class InsecurePath(Exception):
@@ -132,7 +118,7 @@
     """
     Create a pseudorandom, 16-character string for use in secure filenames.
     """
-    return armor(sha1(randomBytes(64)).digest())[:16]
+    return armor(sha1(os.urandom(64)).digest())[:16]
 
 
 
Index: python/dist.py
===================================================================
--- python/dist.py	(revision 33739)
+++ python/dist.py	(working copy)
@@ -359,10 +359,7 @@
     Checks if this implementation is CPython.
 
     On recent versions of Python, will use C{platform.python_implementation}.
-    On 2.5, it will try to extract the implementation from sys.subversion. On
-    older versions (currently the only supported older version is 2.4), checks
-    if C{__pypy__} is in C{sys.modules}, since PyPy is the implementation we
-    really care about. If it isn't, assumes CPython.
+    On 2.5, it will try to extract the implementation from sys.subversion. 
 
     This takes C{sys} and C{platform} kwargs that by default use the real
     modules. You shouldn't care about these -- they are for testing purposes
Index: topfiles/5387.doc
===================================================================
--- topfiles/5387.doc	(revision 0)
+++ topfiles/5387.doc	(revision 0)
@@ -0,0 +1,3 @@
+twisted.internet.defer.inlineCallbacks, removed Python 2.4 warnings and examples, as no longer supported.
+twisted.python.dist._checkCPython, removed Python 2.4 as only supported older version.
+twisted.trial.test.mockdoctest, Removed Python 2.4 reference.
Index: topfiles/5387.removal
===================================================================
--- topfiles/5387.removal	(revision 0)
+++ topfiles/5387.removal	(revision 0)
@@ -0,0 +1,5 @@
+twisted.python.filepath.randomBytes, no longer falls back to _stub_urandom. Uses os.urandom at all times
+twisted.test.test_defgen, removed hack for preventing yield syntax from breaking test runner.
+twisted.trial.runner.DocTestCase, removed as deprecated since Twisted 8.0
+twisted.trial.unittest.TestSuite, removed over-rides to __call__ and run. No longer needed due to Python 2.4 support drop.
+twisted.trial.util.profiled, removed Python 2.4 hotshot hack. No longer required.
Index: internet/defer.py
===================================================================
--- internet/defer.py	(revision 33739)
+++ internet/defer.py	(working copy)
@@ -1124,19 +1124,9 @@
 
 def inlineCallbacks(f):
     """
-    WARNING: this function will not work in Python 2.4 and earlier!
-
     inlineCallbacks helps you write Deferred-using code that looks like a
-    regular sequential function. This function uses features of Python 2.5
-    generators.  If you need to be compatible with Python 2.4 or before, use
-    the L{deferredGenerator} function instead, which accomplishes the same
-    thing, but with somewhat more boilerplate.  For example::
-
-        @inlineCallBacks
-        def thingummy():
-            thing = yield makeSomeRequestResultingInDeferred()
-            print thing #the result! hoorj!
-
+    regular sequential function.
+    
     When you call anything that results in a L{Deferred}, you can simply yield it;
     your generator will automatically be resumed when the Deferred's result is
     available. The generator will be sent the result of the L{Deferred} with the
Index: trial/test/mockdoctest.py
===================================================================
--- trial/test/mockdoctest.py	(revision 33739)
+++ trial/test/mockdoctest.py	(working copy)
@@ -1,8 +1,7 @@
 # Copyright (c) Twisted Matrix Laboratories.
 # See LICENSE for details.
 
-# this module is a trivial class with doctests and a __test__ attribute
-# to test trial's doctest support with python2.4
+# This module is a trivial class with doctests to test trial's doctest support.
 
 
 class Counter(object):
Index: trial/runner.py
===================================================================
--- trial/runner.py	(revision 33739)
+++ trial/runner.py	(working copy)
@@ -11,7 +11,7 @@
 __all__ = [
     'suiteVisit', 'TestSuite',
 
-    'DestructiveTestSuite', 'DocTestCase', 'DryRunVisitor',
+    'DestructiveTestSuite', 'DryRunVisitor',
     'ErrorHolder', 'LoggedSuite', 'PyUnitTestCase',
     'TestHolder', 'TestLoader', 'TrialRunner', 'TrialSuite',
 
@@ -239,22 +239,6 @@
 
 
 
-class DocTestCase(PyUnitTestCase):
-    """
-    DEPRECATED in Twisted 8.0.
-    """
-
-    def id(self):
-        """
-        In Python 2.4, doctests have correct id() behaviour. In Python 2.3,
-        id() returns 'runit'.
-
-        Here we override id() so that at least it will always contain the
-        fully qualified Python name of the doctest.
-        """
-        return self._test.shortDescription()
-
-
 class TrialSuite(TestSuite):
     """
     Suite to wrap around every single test in a C{trial} run. Used internally
Index: trial/util.py
===================================================================
--- trial/util.py	(revision 33739)
+++ trial/util.py	(working copy)
@@ -208,26 +208,15 @@
 
 def profiled(f, outputFile):
     def _(*args, **kwargs):
-        if sys.version_info[0:2] != (2, 4):
-            import profile
-            prof = profile.Profile()
-            try:
-                result = prof.runcall(f, *args, **kwargs)
-                prof.dump_stats(outputFile)
-            except SystemExit:
-                pass
-            prof.print_stats()
-            return result
-        else: # use hotshot, profile is broken in 2.4
-            import hotshot.stats
-            prof = hotshot.Profile(outputFile)
-            try:
-                return prof.runcall(f, *args, **kwargs)
-            finally:
-                stats = hotshot.stats.load(outputFile)
-                stats.strip_dirs()
-                stats.sort_stats('cum')   # 'time'
-                stats.print_stats(100)
+        import profile
+        prof = profile.Profile()
+        try:
+            result = prof.runcall(f, *args, **kwargs)
+            prof.dump_stats(outputFile)
+        except SystemExit:
+            pass
+        prof.print_stats()
+        return result
     return _
 
 
Index: trial/unittest.py
===================================================================
--- trial/unittest.py	(revision 33739)
+++ trial/unittest.py	(working copy)
@@ -1392,28 +1392,11 @@
 class TestSuite(pyunit.TestSuite):
     """
     Extend the standard library's C{TestSuite} with support for the visitor
-    pattern and a consistently overrideable C{run} method.
+    pattern.
     """
 
     visit = suiteVisit
 
-    def __call__(self, result):
-        return self.run(result)
-
-
-    def run(self, result):
-        """
-        Call C{run} on every member of the suite.
-        """
-        # we implement this because Python 2.3 unittest defines this code
-        # in __call__, whereas 2.4 defines the code in run.
-        for test in self._tests:
-            if result.shouldStop:
-                break
-            test(result)
-        return result
-
-
 
 class TestDecorator(components.proxyForInterface(itrial.ITestCase,
                                                  "_originalTest")):
Index: web/test/test_xmlrpc.py
===================================================================
--- web/test/test_xmlrpc.py	(revision 33739)
+++ web/test/test_xmlrpc.py	(working copy)
@@ -575,15 +575,6 @@
     value = None
 
 
-try:
-    xmlrpclib.loads(xmlrpclib.dumps(({}, {})), use_datetime=True)
-except TypeError:
-    _datetimeSupported = False
-else:
-    _datetimeSupported = True
-
-
-
 class XMLRPCUseDateTimeTestCase(SerializationConfigMixin, unittest.TestCase):
     """
     Tests for passing a C{datetime.datetime} instance when the C{useDateTime}
@@ -592,41 +583,6 @@
     flagName = "useDateTime"
     value = datetime.datetime(2000, 12, 28, 3, 45, 59)
 
-    if not _datetimeSupported:
-        skip = (
-            "Available version of xmlrpclib does not support datetime "
-            "objects.")
-
-
-
-class XMLRPCDisableUseDateTimeTestCase(unittest.TestCase):
-    """
-    Tests for the C{useDateTime} flag on Python 2.4.
-    """
-    if _datetimeSupported:
-        skip = (
-            "Available version of xmlrpclib supports datetime objects.")
-
-    def test_cannotInitializeWithDateTime(self):
-        """
-        L{XMLRPC} raises L{RuntimeError} if passed C{True} for C{useDateTime}.
-        """
-        self.assertRaises(RuntimeError, XMLRPC, useDateTime=True)
-        self.assertRaises(
-            RuntimeError, Proxy, "http://localhost/", useDateTime=True)
-
-
-    def test_cannotSetDateTime(self):
-        """
-        Setting L{XMLRPC.useDateTime} to C{True} after initialization raises
-        L{RuntimeError}.
-        """
-        xmlrpc = XMLRPC(useDateTime=False)
-        self.assertRaises(RuntimeError, setattr, xmlrpc, "useDateTime", True)
-        proxy = Proxy("http://localhost/", useDateTime=False)
-        self.assertRaises(RuntimeError, setattr, proxy, "useDateTime", True)
-
-
 
 class XMLRPCTestAuthenticated(XMLRPCTestCase):
     """
Index: web/topfiles/5387.removal
===================================================================
--- web/topfiles/5387.removal	(revision 0)
+++ web/topfiles/5387.removal	(revision 0)
@@ -0,0 +1,3 @@
+twisted.web.client.FileBodyProducer, removed hard-code default for _SEEK_SET, _SEEK_END. Both available in os in >= 2.5
+twisted.web.xmlrpclib, removed Datetime.decode hack for Python versions < 2.5
+twisted.web.test.text_xmlrpc.XMLRPCDisableUseDateTimeTestCase, removed test specific to Python 2.4 support
Index: web/xmlrpc.py
===================================================================
--- web/xmlrpc.py	(revision 33739)
+++ web/xmlrpc.py	(working copy)
@@ -28,11 +28,6 @@
 Boolean = xmlrpclib.Boolean
 DateTime = xmlrpclib.DateTime
 
-# On Python 2.4 and earlier, DateTime.decode returns unicode.
-if sys.version_info[:2] < (2, 5):
-    _decode = DateTime.decode
-    DateTime.decode = lambda self, value: _decode(self, value.encode('ascii'))
-
 
 def withRequest(f):
     """
@@ -128,8 +123,6 @@
 
 
     def __setattr__(self, name, value):
-        if name == "useDateTime" and value and sys.version_info[:2] < (2, 5):
-            raise RuntimeError("useDateTime requires Python 2.5 or later.")
         self.__dict__[name] = value
 
 
Index: web/client.py
===================================================================
--- web/client.py	(revision 33739)
+++ web/client.py	(working copy)
@@ -720,9 +720,8 @@
     """
     implements(IBodyProducer)
 
-    # Python 2.4 doesn't have these symbolic constants
-    _SEEK_SET = getattr(os, 'SEEK_SET', 0)
-    _SEEK_END = getattr(os, 'SEEK_END', 2)
+    _SEEK_SET = os.SEEK_SET
+    _SEEK_END = os.SEEK_END
 
     def __init__(self, inputFile, cooperator=task, readSize=2 ** 16):
         self._inputFile = inputFile
