diff --git a/src/twisted/internet/defer.py b/src/twisted/internet/defer.py
index d311adda5b..f3ae97060b 100644
--- a/src/twisted/internet/defer.py
+++ b/src/twisted/internet/defer.py
@@ -1919,6 +1919,33 @@ class _CancellationStatus(Generic[_SelfResultT]):
     waitingOn: Optional[Deferred[_SelfResultT]] = None
 
 
+def _gotResultInlineCallbacks(
+    r: object,
+    waiting: List[Any],
+    gen: Union[
+        Generator[Deferred[object], object, _T],
+        Coroutine[Deferred[object], object, _T],
+    ],
+    status: _CancellationStatus[_T],
+    context: _Context,
+) -> None:
+    """
+    Helper for L{_inlineCallbacks} to handle a nested L{Deferred} firing.
+
+    @param r: The result of the L{Deferred}
+    @param waiting: Whether the L{_inlineCallbacks} was waiting, and the result.
+    @param gen: a generator object returned by calling a function or method
+        decorated with C{@}L{inlineCallbacks}
+    @param status: a L{_CancellationStatus} tracking the current status of C{gen}
+    @param context: the contextvars context to run `gen` in
+    """
+    if waiting[0]:
+        waiting[0] = False
+        waiting[1] = r
+    else:
+        _inlineCallbacks(r, gen, status, context)
+
+
 @_extraneous
 def _inlineCallbacks(
     result: object,
@@ -2060,14 +2087,7 @@ def _inlineCallbacks(
 
         if isinstance(result, Deferred):
             # a deferred was yielded, get the result.
-            def gotResult(r: object) -> None:
-                if waiting[0]:
-                    waiting[0] = False
-                    waiting[1] = r
-                else:
-                    _inlineCallbacks(r, gen, status, context)
-
-            result.addBoth(gotResult)
+            result.addBoth(_gotResultInlineCallbacks, waiting, gen, status, context)
             if waiting[0]:
                 # Haven't called back yet, set flag so that we get reinvoked
                 # and return from the loop
@@ -2085,6 +2105,48 @@ def _inlineCallbacks(
             waiting[1] = None
 
 
+def _addCancelCallbackToDeferred(
+    it: Deferred[_T], status: _CancellationStatus[_T]
+) -> None:
+    """
+    Helper for L{_cancellableInlineCallbacks} to add
+    L{_handleCancelInlineCallbacks} as the first errback.
+
+    @param it: The L{Deferred} to add the errback to.
+    @param status: a L{_CancellationStatus} tracking the current status of C{gen}
+    """
+    it.callbacks, tmp = [], it.callbacks
+    it.addErrback(_handleCancelInlineCallbacks, status)
+    it.callbacks.extend(tmp)
+    it.errback(_InternalInlineCallbacksCancelledError())
+
+
+def _handleCancelInlineCallbacks(
+    result: Failure,
+    status: _CancellationStatus[_T],
+) -> Deferred[_T]:
+    """
+    Propagate the cancellation of an C{@}L{inlineCallbacks} to the
+    L{Deferred} it is waiting on.
+
+    @param result: An L{_InternalInlineCallbacksCancelledError} from
+        C{cancel()}.
+    @param status: a L{_CancellationStatus} tracking the current status of C{gen}
+    @return: A new L{Deferred} that the C{@}L{inlineCallbacks} generator
+        can callback or errback through.
+    """
+    result.trap(_InternalInlineCallbacksCancelledError)
+    status.deferred = Deferred(lambda d: _addCancelCallbackToDeferred(d, status))
+
+    # We would only end up here if the inlineCallback is waiting on
+    # another Deferred.  It needs to be cancelled.
+    awaited = status.waitingOn
+    assert awaited is not None
+    awaited.cancel()
+
+    return status.deferred
+
+
 def _cancellableInlineCallbacks(
     gen: Union[
         Generator["Deferred[object]", object, _T],
@@ -2100,36 +2162,9 @@ def _cancellableInlineCallbacks(
     @return: L{Deferred} for the C{@}L{inlineCallbacks} that is cancellable.
     """
 
-    def cancel(it: Deferred[_T]) -> None:
-        it.callbacks, tmp = [], it.callbacks
-        it.addErrback(handleCancel)
-        it.callbacks.extend(tmp)
-        it.errback(_InternalInlineCallbacksCancelledError())
-
-    deferred: Deferred[_T] = Deferred(cancel)
+    deferred: Deferred[_T] = Deferred(lambda d: _addCancelCallbackToDeferred(d, status))
     status = _CancellationStatus(deferred)
 
-    def handleCancel(result: Failure) -> Deferred[_T]:
-        """
-        Propagate the cancellation of an C{@}L{inlineCallbacks} to the
-        L{Deferred} it is waiting on.
-
-        @param result: An L{_InternalInlineCallbacksCancelledError} from
-            C{cancel()}.
-        @return: A new L{Deferred} that the C{@}L{inlineCallbacks} generator
-            can callback or errback through.
-        """
-        result.trap(_InternalInlineCallbacksCancelledError)
-        status.deferred = Deferred(cancel)
-
-        # We would only end up here if the inlineCallback is waiting on
-        # another Deferred.  It needs to be cancelled.
-        awaited = status.waitingOn
-        assert awaited is not None
-        awaited.cancel()
-
-        return status.deferred
-
     _inlineCallbacks(None, gen, status, _copy_context())
 
     return deferred
diff --git a/src/twisted/newsfragments/11885.feature b/src/twisted/newsfragments/11885.feature
new file mode 100644
index 0000000000..6b2dfb6b86
--- /dev/null
+++ b/src/twisted/newsfragments/11885.feature
@@ -0,0 +1,1 @@
+When using `CPython`, functions wrapped by `twisted.internet.defer.inlineCallbacks` can have their arguments and return values freed immediately after completion (due to there no longer being circular references).

diff --git a/src/twisted/test/test_defer.py b/src/twisted/test/test_defer.py
index f29a31ae00..f1debc6821 100644
--- a/src/twisted/test/test_defer.py
+++ b/src/twisted/test/test_defer.py
@@ -32,6 +32,7 @@ from typing import (
     Mapping,
     NoReturn,
     Optional,
+    Set,
     Tuple,
     Type,
     TypeVar,
@@ -1684,57 +1685,6 @@ class DeferredTests(unittest.SynchronousTestCase, ImmediateFailureMixin):
         self.assertNotEqual([], localz)
         self.assertNotEqual([], globalz)
 
-    def test_inlineCallbacksTracebacks(self) -> None:
-        """
-        L{defer.inlineCallbacks} that re-raise tracebacks into their deferred
-        should not lose their tracebacks.
-        """
-        f = getDivisionFailure()
-        d: Deferred[None] = Deferred()
-        try:
-            f.raiseException()
-        except BaseException:
-            d.errback()
-
-        def ic(d: object) -> Generator[Any, Any, None]:
-            yield d
-
-        defer.inlineCallbacks(ic)
-        newFailure = self.failureResultOf(d)
-        tb = traceback.extract_tb(newFailure.getTracebackObject())
-
-        self.assertEqual(len(tb), 3)
-        self.assertIn("test_defer", tb[2][0])
-        self.assertEqual("getDivisionFailure", tb[2][2])
-        self.assertEqual("1 / 0", tb[2][3])
-
-        self.assertIn("test_defer", tb[0][0])
-        self.assertEqual("test_inlineCallbacksTracebacks", tb[0][2])
-        self.assertEqual("f.raiseException()", tb[0][3])
-
-    def test_fromCoroutineRequiresCoroutine(self) -> None:
-        """
-        L{Deferred.fromCoroutine} requires a coroutine object or a generator,
-        and will reject things that are not that.
-        """
-        thingsThatAreNotCoroutines = [
-            # Lambda
-            lambda x: x,
-            # Int
-            1,
-            # Boolean
-            True,
-            # Function
-            self.test_fromCoroutineRequiresCoroutine,
-            # None
-            None,
-            # Module
-            defer,
-        ]
-
-        for thing in thingsThatAreNotCoroutines:
-            self.assertRaises(defer.NotACoroutineError, Deferred.fromCoroutine, thing)
-
     @pyunit.skipIf(_PYPY, "GC works differently on PyPy.")
     def test_canceller_circular_reference_callback(self) -> None:
         """
@@ -3950,3 +3900,176 @@ class CoroutineContextVarsTests(unittest.TestCase):
         clock.advance(1)
 
         self.assertEqual(self.successResultOf(d), True)
+
+
+class InlineCallbackTests(unittest.SynchronousTestCase):
+    def test_inlineCallbacksTracebacks(self) -> None:
+        """
+        L{defer.inlineCallbacks} that re-raise tracebacks into their deferred
+        should not lose their tracebacks.
+        """
+        f = getDivisionFailure()
+        d: Deferred[None] = Deferred()
+        try:
+            f.raiseException()
+        except BaseException:
+            d.errback()
+
+        def ic(d: object) -> Generator[Any, Any, None]:
+            yield d
+
+        defer.inlineCallbacks(ic)
+        newFailure = self.failureResultOf(d)
+        tb = traceback.extract_tb(newFailure.getTracebackObject())
+
+        self.assertEqual(len(tb), 3)
+        self.assertIn("test_defer", tb[2][0])
+        self.assertEqual("getDivisionFailure", tb[2][2])
+        self.assertEqual("1 / 0", tb[2][3])
+
+        self.assertIn("test_defer", tb[0][0])
+        self.assertEqual("test_inlineCallbacksTracebacks", tb[0][2])
+        self.assertEqual("f.raiseException()", tb[0][3])
+
+    def test_fromCoroutineRequiresCoroutine(self) -> None:
+        """
+        L{Deferred.fromCoroutine} requires a coroutine object or a generator,
+        and will reject things that are not that.
+        """
+        thingsThatAreNotCoroutines = [
+            # Lambda
+            lambda x: x,
+            # Int
+            1,
+            # Boolean
+            True,
+            # Function
+            self.test_fromCoroutineRequiresCoroutine,
+            # None
+            None,
+            # Module
+            defer,
+        ]
+
+        for thing in thingsThatAreNotCoroutines:
+            self.assertRaises(defer.NotACoroutineError, Deferred.fromCoroutine, thing)
+
+    def test_inlineCallbacksCancelCaptured(self) -> None:
+        """
+        Cancelling an L{defer.inlineCallbacks} correctly handles the function
+        catching the L{defer.CancelledError}.
+
+        The desired behavior is:
+            1. If the function is waiting on an inner deferred, that inner
+               deferred is cancelled, and a L{defer.CancelledError} is raised
+               within the function.
+            2. If the function catches that exception, execution continues, and
+               the deferred returned by the function is not resolved.
+            3. Cancelling the deferred again cancels any deferred the function
+               is waiting on, and the exception is raised.
+        """
+        canceller1Calls: List[Deferred[object]] = []
+        canceller2Calls: List[Deferred[object]] = []
+        d1: Deferred[object] = Deferred(canceller1Calls.append)
+        d2: Deferred[object] = Deferred(canceller2Calls.append)
+
+        @defer.inlineCallbacks
+        def testFunc() -> Generator[Deferred[object], object, None]:
+            try:
+                yield d1
+            except Exception:
+                pass
+
+            yield d2
+
+        # Call the function, and ensure that none of the deferreds have
+        # completed or been cancelled yet.
+        funcD = testFunc()
+
+        self.assertNoResult(d1)
+        self.assertNoResult(d2)
+        self.assertNoResult(funcD)
+        self.assertEqual(canceller1Calls, [])
+        self.assertEqual(canceller1Calls, [])
+
+        # Cancel the deferred returned by the function, and check that the first
+        # inner deferred has been cancelled, but the returned deferred has not
+        # completed (as the function catches the raised exception).
+        funcD.cancel()
+
+        self.assertEqual(canceller1Calls, [d1])
+        self.assertEqual(canceller2Calls, [])
+        self.assertNoResult(funcD)
+
+        # Cancel the returned deferred again, this time the returned deferred
+        # should have a failure result, as the function did not catch the cancel
+        # exception raised by `d2`.
+        funcD.cancel()
+        failure = self.failureResultOf(funcD)
+        self.assertEqual(failure.type, defer.CancelledError)
+        self.assertEqual(canceller2Calls, [d2])
+
+    @pyunit.skipIf(_PYPY, "GC works differently on PyPy.")
+    def test_inlineCallbacksNoCircularReference(self) -> None:
+        """
+        When using L{defer.inlineCallbacks}, after the function exits, it will
+        not keep references to the function itself or the arguments.
+
+        This ensures that the machinery gets deallocated immediately rather than
+        waiting for a GC, on CPython.
+
+        The GC on PyPy works differently (del doesn't immediately deallocate the
+        object), so we skip the test.
+        """
+
+        # Create an object and weak reference to track if its gotten freed.
+        obj: Set[Any] = set()
+        objWeakRef = weakref.ref(obj)
+
+        @defer.inlineCallbacks
+        def func(a: Any) -> Any:
+            yield a
+            return a
+
+        # Run the function
+        funcD = func(obj)
+        self.assertEqual(obj, self.successResultOf(funcD))
+
+        funcDWeakRef = weakref.ref(funcD)
+
+        # Delete the local references to obj and funcD.
+        del obj
+        del funcD
+
+        # The object has been freed if the weak reference returns None.
+        self.assertIsNone(objWeakRef())
+        self.assertIsNone(funcDWeakRef())
+
+    @pyunit.skipIf(_PYPY, "GC works differently on PyPy.")
+    def test_coroutineNoCircularReference(self) -> None:
+        """
+        Tests that there is no circular dependency when using
+        L{Deferred.fromCoroutine}, so that the machinery gets cleaned up
+        immediately rather than waiting for a GC.
+        """
+
+        # Create an object and weak reference to track if its gotten freed.
+        obj: Set[Any] = set()
+        objWeakRef = weakref.ref(obj)
+
+        async def func(a: Any) -> Any:
+            return a
+
+        # Run the function
+        funcD = Deferred.fromCoroutine(func(obj))
+        self.assertEqual(obj, self.successResultOf(funcD))
+
+        funcDWeakRef = weakref.ref(funcD)
+
+        # Delete the local references to obj and funcD.
+        del obj
+        del funcD
+
+        # The object has been freed if the weak reference returns None.
+        self.assertIsNone(objWeakRef())
+        self.assertIsNone(funcDWeakRef())
diff --git a/src/twisted/test/test_twistd.py b/src/twisted/test/test_twistd.py
index d90689c2a2..7817452b19 100644
--- a/src/twisted/test/test_twistd.py
+++ b/src/twisted/test/test_twistd.py
@@ -1013,6 +1013,12 @@ class UnixApplicationRunnerStartApplicationTests(TestCase):
         If the specified UID is the same as the current UID of the process,
         then a warning is displayed.
         """
+
+        # FIXME:https://github.com/twisted/twisted/issues/10332
+        # Assert that there were no existing warnings.
+        existing_warnings = self.flushWarnings()
+        self.assertEqual([], existing_warnings)
+
         currentUid = os.getuid()
         self._setUID("morefoo", currentUid, "morebar", 4343)
 

`_inlineCallbacks` machinery has a circular reference
The `_inlineCallbacks` machinery currently causes a circular reference to be made, which stops Python from freeing the deferreds etc immediately. 

This is caused by usages of inline functions. The fix is to move those functions out into standalone ones. (PR incoming).

Similar to https://github.com/twisted/twisted/issues/10310.
src/twisted/test/test_defer.py::InlineCallbackTests::test_coroutineNoCircularReference src/twisted/test/test_defer.py::InlineCallbackTests::test_inlineCallbacksNoCircularReference
src/twisted/test/test_defer.py::UtilTests::test_logErrorLogsError src/twisted/test/test_defer.py::UtilTests::test_logErrorLogsErrorNoRepr src/twisted/test/test_defer.py::UtilTests::test_logErrorReturnsError src/twisted/test/test_defer.py::DeferredTests::testCallbackErrors src/twisted/test/test_defer.py::DeferredTests::testCallbackWithArgs src/twisted/test/test_defer.py::DeferredTests::testCallbackWithKwArgs src/twisted/test/test_defer.py::DeferredTests::testCallbackWithoutArgs src/twisted/test/test_defer.py::DeferredTests::testDeferredList src/twisted/test/test_defer.py::DeferredTests::testDeferredListConsumeErrors src/twisted/test/test_defer.py::DeferredTests::testDeferredListDontConsumeErrors src/twisted/test/test_defer.py::DeferredTests::testDeferredListFireOnOneError src/twisted/test/test_defer.py::DeferredTests::testDeferredListFireOnOneErrorWithAlreadyFiredDeferreds src/twisted/test/test_defer.py::DeferredTests::testDeferredListWithAlreadyFiredDeferreds src/twisted/test/test_defer.py::DeferredTests::testEmptyDeferredList src/twisted/test/test_defer.py::DeferredTests::testImmediateFailure src/twisted/test/test_defer.py::DeferredTests::testImmediateSuccess src/twisted/test/test_defer.py::DeferredTests::testPausedFailure src/twisted/test/test_defer.py::DeferredTests::testTwoCallbacks src/twisted/test/test_defer.py::DeferredTests::testUnpauseBeforeCallback src/twisted/test/test_defer.py::DeferredTests::test_addCallbacksNoneCallbackArgs src/twisted/test/test_defer.py::DeferredTests::test_addCallbacksNoneErrback src/twisted/test/test_defer.py::DeferredTests::test_addCallbacksNoneErrbackArgs src/twisted/test/test_defer.py::DeferredTests::test_asynchronousImplicitChain src/twisted/test/test_defer.py::DeferredTests::test_asynchronousImplicitErrorChain src/twisted/test/test_defer.py::DeferredTests::test_boundedStackDepth src/twisted/test/test_defer.py::DeferredTests::test_callbackMaybeReturnsFailure src/twisted/test/test_defer.py::DeferredTests::test_callbackOrderPreserved src/twisted/test/test_defer.py::DeferredTests::test_callbackReturnsDeferred src/twisted/test/test_defer.py::DeferredTests::test_cancelDeferredList src/twisted/test/test_defer.py::DeferredTests::test_cancelDeferredListCallback src/twisted/test/test_defer.py::DeferredTests::test_cancelDeferredListWithException src/twisted/test/test_defer.py::DeferredTests::test_cancelDeferredListWithFireOnOneCallback src/twisted/test/test_defer.py::DeferredTests::test_cancelDeferredListWithFireOnOneCallbackAndDeferredCallback src/twisted/test/test_defer.py::DeferredTests::test_cancelDeferredListWithFireOnOneErrback src/twisted/test/test_defer.py::DeferredTests::test_cancelDeferredListWithFireOnOneErrbackAllDeferredsCallback src/twisted/test/test_defer.py::DeferredTests::test_cancelDeferredListWithOriginalDeferreds src/twisted/test/test_defer.py::DeferredTests::test_cancelFiredOnOneCallbackDeferredList src/twisted/test/test_defer.py::DeferredTests::test_cancelFiredOnOneErrbackDeferredList src/twisted/test/test_defer.py::DeferredTests::test_cancelGatherResults src/twisted/test/test_defer.py::DeferredTests::test_cancelGatherResultsWithAllDeferredsCallback src/twisted/test/test_defer.py::DeferredTests::test_canceller_circular_reference_callback src/twisted/test/test_defer.py::DeferredTests::test_canceller_circular_reference_errback src/twisted/test/test_defer.py::DeferredTests::test_canceller_circular_reference_non_final src/twisted/test/test_defer.py::DeferredTests::test_chainDeferredRecordsExplicitChain src/twisted/test/test_defer.py::DeferredTests::test_chainDeferredRecordsImplicitChain src/twisted/test/test_defer.py::DeferredTests::test_chainedPausedDeferredWithResult src/twisted/test/test_defer.py::DeferredTests::test_circularChainException src/twisted/test/test_defer.py::DeferredTests::test_circularChainWarning src/twisted/test/test_defer.py::DeferredTests::test_continueCallbackNotFirst src/twisted/test/test_defer.py::DeferredTests::test_doubleAsynchronousImplicitChaining src/twisted/test/test_defer.py::DeferredTests::test_errbackReturnsDeferred src/twisted/test/test_defer.py::DeferredTests::test_errbackWithNoArgs src/twisted/test/test_defer.py::DeferredTests::test_errbackWithNoArgsNoDebug src/twisted/test/test_defer.py::DeferredTests::test_errorInCallbackCapturesVarsWhenDebugging src/twisted/test/test_defer.py::DeferredTests::test_errorInCallbackDoesNotCaptureVars src/twisted/test/test_defer.py::DeferredTests::test_explicitChainClearedWhenResolved src/twisted/test/test_defer.py::DeferredTests::test_gatherResults src/twisted/test/test_defer.py::DeferredTests::test_gatherResultsWithConsumeErrors src/twisted/test/test_defer.py::DeferredTests::test_innerCallbacksPreserved src/twisted/test/test_defer.py::DeferredTests::test_maybeDeferredAsync src/twisted/test/test_defer.py::DeferredTests::test_maybeDeferredAsyncError src/twisted/test/test_defer.py::DeferredTests::test_maybeDeferredCoroutineFailure src/twisted/test/test_defer.py::DeferredTests::test_maybeDeferredCoroutineSuccess src/twisted/test/test_defer.py::DeferredTests::test_maybeDeferredSync src/twisted/test/test_defer.py::DeferredTests::test_maybeDeferredSyncException src/twisted/test/test_defer.py::DeferredTests::test_maybeDeferredSyncFailure src/twisted/test/test_defer.py::DeferredTests::test_maybeDeferredSyncWithArgs src/twisted/test/test_defer.py::DeferredTests::test_nestedAsynchronousChainedDeferreds src/twisted/test/test_defer.py::DeferredTests::test_nestedAsynchronousChainedDeferredsWithExtraCallbacks src/twisted/test/test_defer.py::DeferredTests::test_nonReentrantCallbacks src/twisted/test/test_defer.py::DeferredTests::test_pausedDeferredChained src/twisted/test/test_defer.py::DeferredTests::test_reentrantRunCallbacks src/twisted/test/test_defer.py::DeferredTests::test_reentrantRunCallbacksWithFailure src/twisted/test/test_defer.py::DeferredTests::test_repr src/twisted/test/test_defer.py::DeferredTests::test_reprWithChaining src/twisted/test/test_defer.py::DeferredTests::test_reprWithResult src/twisted/test/test_defer.py::DeferredTests::test_resultOfDeferredResultOfDeferredOfFiredDeferredCalled src/twisted/test/test_defer.py::DeferredTests::test_synchronousImplicitChain src/twisted/test/test_defer.py::DeferredTests::test_synchronousImplicitErrorChain src/twisted/test/test_defer.py::RaceTests::test_cancel src/twisted/test/test_defer.py::RaceTests::test_failure src/twisted/test/test_defer.py::RaceTests::test_resultAfterCancel src/twisted/test/test_defer.py::RaceTests::test_resultFromCancel src/twisted/test/test_defer.py::RaceTests::test_success src/twisted/test/test_defer.py::FirstErrorTests::test_comparison src/twisted/test/test_defer.py::FirstErrorTests::test_repr src/twisted/test/test_defer.py::FirstErrorTests::test_str src/twisted/test/test_defer.py::AlreadyCalledTests::testAlreadyCalledDebug_CC src/twisted/test/test_defer.py::AlreadyCalledTests::testAlreadyCalledDebug_CE src/twisted/test/test_defer.py::AlreadyCalledTests::testAlreadyCalledDebug_EC src/twisted/test/test_defer.py::AlreadyCalledTests::testAlreadyCalledDebug_EE src/twisted/test/test_defer.py::AlreadyCalledTests::testAlreadyCalled_CC src/twisted/test/test_defer.py::AlreadyCalledTests::testAlreadyCalled_CE src/twisted/test/test_defer.py::AlreadyCalledTests::testAlreadyCalled_EC src/twisted/test/test_defer.py::AlreadyCalledTests::testAlreadyCalled_EE src/twisted/test/test_defer.py::AlreadyCalledTests::testNoDebugging src/twisted/test/test_defer.py::AlreadyCalledTests::testSwitchDebugging src/twisted/test/test_defer.py::DeferredCancellerTests::test_cancelAfterCallback src/twisted/test/test_defer.py::DeferredCancellerTests::test_cancelAfterErrback src/twisted/test/test_defer.py::DeferredCancellerTests::test_cancelNestedDeferred src/twisted/test/test_defer.py::DeferredCancellerTests::test_cancellerArg src/twisted/test/test_defer.py::DeferredCancellerTests::test_cancellerMultipleCancel src/twisted/test/test_defer.py::DeferredCancellerTests::test_cancellerThatCallbacks src/twisted/test/test_defer.py::DeferredCancellerTests::test_cancellerThatErrbacks src/twisted/test/test_defer.py::DeferredCancellerTests::test_noCanceller src/twisted/test/test_defer.py::DeferredCancellerTests::test_noCancellerMultipleCancel src/twisted/test/test_defer.py::DeferredCancellerTests::test_noCancellerMultipleCancelsAfterCancelAndCallback src/twisted/test/test_defer.py::DeferredCancellerTests::test_noCancellerMultipleCancelsAfterCancelAndErrback src/twisted/test/test_defer.py::DeferredCancellerTests::test_raisesAfterCancelAndCallback src/twisted/test/test_defer.py::DeferredCancellerTests::test_raisesAfterCancelAndErrback src/twisted/test/test_defer.py::DeferredCancellerTests::test_simpleCanceller src/twisted/test/test_defer.py::LogTests::test_chainedErrorCleanup src/twisted/test/test_defer.py::LogTests::test_errorClearedByChaining src/twisted/test/test_defer.py::LogTests::test_errorLog src/twisted/test/test_defer.py::LogTests::test_errorLogDebugInfo src/twisted/test/test_defer.py::LogTests::test_errorLogNoRepr src/twisted/test/test_defer.py::LogTests::test_errorLogWithInnerFrameCycle src/twisted/test/test_defer.py::LogTests::test_errorLogWithInnerFrameRef src/twisted/test/test_defer.py::DeferredListEmptyTests::testDeferredListEmpty src/twisted/test/test_defer.py::OtherPrimitivesTests::testLock src/twisted/test/test_defer.py::OtherPrimitivesTests::testQueue src/twisted/test/test_defer.py::OtherPrimitivesTests::testSemaphore src/twisted/test/test_defer.py::OtherPrimitivesTests::test_cancelLockAfterAcquired src/twisted/test/test_defer.py::OtherPrimitivesTests::test_cancelLockBeforeAcquired src/twisted/test/test_defer.py::OtherPrimitivesTests::test_cancelQueueAfterGet src/twisted/test/test_defer.py::OtherPrimitivesTests::test_cancelQueueAfterSynchronousGet src/twisted/test/test_defer.py::OtherPrimitivesTests::test_cancelSemaphoreAfterAcquired src/twisted/test/test_defer.py::OtherPrimitivesTests::test_cancelSemaphoreBeforeAcquired src/twisted/test/test_defer.py::OtherPrimitivesTests::test_semaphoreInvalidTokens src/twisted/test/test_defer.py::DeferredFilesystemLockTests::test_cancelDeferUntilLocked src/twisted/test/test_defer.py::DeferredFilesystemLockTests::test_cancelDeferUntilLockedWithTimeout src/twisted/test/test_defer.py::DeferredFilesystemLockTests::test_concurrentUsage src/twisted/test/test_defer.py::DeferredFilesystemLockTests::test_defaultScheduler src/twisted/test/test_defer.py::DeferredFilesystemLockTests::test_multipleUsages src/twisted/test/test_defer.py::DeferredFilesystemLockTests::test_waitUntilLockedWithNoLock src/twisted/test/test_defer.py::DeferredFilesystemLockTests::test_waitUntilLockedWithTimeoutLocked src/twisted/test/test_defer.py::DeferredFilesystemLockTests::test_waitUntilLockedWithTimeoutUnlocked src/twisted/test/test_defer.py::DeferredAddTimeoutTests::test_callbackAddedToCancelerBeforeTimeout src/twisted/test/test_defer.py::DeferredAddTimeoutTests::test_callbackAddedToCancelerBeforeTimeoutCustom src/twisted/test/test_defer.py::DeferredAddTimeoutTests::test_cancelBeforeTimeout src/twisted/test/test_defer.py::DeferredAddTimeoutTests::test_cancelBeforeTimeoutCustom src/twisted/test/test_defer.py::DeferredAddTimeoutTests::test_errbackAddedBeforeTimeout src/twisted/test/test_defer.py::DeferredAddTimeoutTests::test_errbackAddedBeforeTimeoutCustom src/twisted/test/test_defer.py::DeferredAddTimeoutTests::test_errbackAddedBeforeTimeoutSuppressesCancellation src/twisted/test/test_defer.py::DeferredAddTimeoutTests::test_errbackAddedBeforeTimeoutSuppressesCancellationCustom src/twisted/test/test_defer.py::DeferredAddTimeoutTests::test_failureBeforeTimeout src/twisted/test/test_defer.py::DeferredAddTimeoutTests::test_failureBeforeTimeoutCustom src/twisted/test/test_defer.py::DeferredAddTimeoutTests::test_providedCancelCalledBeforeTimeoutCustom src/twisted/test/test_defer.py::DeferredAddTimeoutTests::test_successResultBeforeTimeout src/twisted/test/test_defer.py::DeferredAddTimeoutTests::test_successResultBeforeTimeoutCustom src/twisted/test/test_defer.py::DeferredAddTimeoutTests::test_timedOut src/twisted/test/test_defer.py::DeferredAddTimeoutTests::test_timedOutCustom src/twisted/test/test_defer.py::DeferredAddTimeoutTests::test_timedOutProvidedCancelFailure src/twisted/test/test_defer.py::DeferredAddTimeoutTests::test_timedOutProvidedCancelSuccess src/twisted/test/test_defer.py::DeferredAddTimeoutTests::test_timeoutChainable src/twisted/test/test_defer.py::EnsureDeferredTests::test_ensureDeferredCoroutine src/twisted/test/test_defer.py::EnsureDeferredTests::test_ensureDeferredGenerator src/twisted/test/test_defer.py::EnsureDeferredTests::test_passesThroughDeferreds src/twisted/test/test_defer.py::EnsureDeferredTests::test_willNotAllowNonDeferredOrCoroutine src/twisted/test/test_defer.py::TimeoutErrorTests::test_deprecatedTimeout src/twisted/test/test_defer.py::DeferredFutureAdapterTests::test_asFuture src/twisted/test/test_defer.py::DeferredFutureAdapterTests::test_asFutureCancelFuture src/twisted/test/test_defer.py::DeferredFutureAdapterTests::test_asFutureFailure src/twisted/test/test_defer.py::DeferredFutureAdapterTests::test_asFutureSuccessCancel src/twisted/test/test_defer.py::DeferredFutureAdapterTests::test_fromFuture src/twisted/test/test_defer.py::DeferredFutureAdapterTests::test_fromFutureDeferredCancelled src/twisted/test/test_defer.py::DeferredFutureAdapterTests::test_fromFutureFutureCancelled src/twisted/test/test_defer.py::CoroutineContextVarsTests::test_asyncWithLock src/twisted/test/test_defer.py::CoroutineContextVarsTests::test_asyncWithLockException src/twisted/test/test_defer.py::CoroutineContextVarsTests::test_asyncWithSemaphore src/twisted/test/test_defer.py::CoroutineContextVarsTests::test_contextvarsWithAsyncAwait src/twisted/test/test_defer.py::CoroutineContextVarsTests::test_resetWithInlineCallbacks src/twisted/test/test_defer.py::CoroutineContextVarsTests::test_withInlineCallbacks src/twisted/test/test_defer.py::InlineCallbackTests::test_fromCoroutineRequiresCoroutine src/twisted/test/test_defer.py::InlineCallbackTests::test_inlineCallbacksCancelCaptured src/twisted/test/test_defer.py::InlineCallbackTests::test_inlineCallbacksTracebacks src/twisted/test/test_twistd.py::ServerOptionsTests::test_badAttributeWithConfiguredLogObserver src/twisted/test/test_twistd.py::ServerOptionsTests::test_defaultUmask src/twisted/test/test_twistd.py::ServerOptionsTests::test_invalidUmask src/twisted/test/test_twistd.py::ServerOptionsTests::test_listAllProfilers src/twisted/test/test_twistd.py::ServerOptionsTests::test_postOptionsNoSubCommandSavesAsUsual src/twisted/test/test_twistd.py::ServerOptionsTests::test_postOptionsSubCommandCausesNoSave src/twisted/test/test_twistd.py::ServerOptionsTests::test_printSubCommandForUsageError src/twisted/test/test_twistd.py::ServerOptionsTests::test_sortedReactorHelp src/twisted/test/test_twistd.py::ServerOptionsTests::test_subCommands src/twisted/test/test_twistd.py::ServerOptionsTests::test_umask src/twisted/test/test_twistd.py::ServerOptionsTests::test_unimportableConfiguredLogObserver src/twisted/test/test_twistd.py::ServerOptionsTests::test_version src/twisted/test/test_twistd.py::CheckPIDTests::test_anotherRunning src/twisted/test/test_twistd.py::CheckPIDTests::test_nonNumeric src/twisted/test/test_twistd.py::CheckPIDTests::test_notExists src/twisted/test/test_twistd.py::CheckPIDTests::test_stale src/twisted/test/test_twistd.py::CheckPIDTests::test_unexpectedOSError src/twisted/test/test_twistd.py::TapFileTests::test_createOrGetApplicationWithTapFile src/twisted/test/test_twistd.py::ApplicationRunnerTests::test_applicationRunnerCapturesSignal src/twisted/test/test_twistd.py::ApplicationRunnerTests::test_applicationRunnerChoosesReactorIfNone src/twisted/test/test_twistd.py::ApplicationRunnerTests::test_applicationRunnerGetsCorrectApplication src/twisted/test/test_twistd.py::ApplicationRunnerTests::test_applicationRunnerIgnoresNoSignal src/twisted/test/test_twistd.py::ApplicationRunnerTests::test_applicationStartsWithConfiguredNameIDs src/twisted/test/test_twistd.py::ApplicationRunnerTests::test_applicationStartsWithConfiguredNumericIDs src/twisted/test/test_twistd.py::ApplicationRunnerTests::test_preAndPostApplication src/twisted/test/test_twistd.py::ApplicationRunnerTests::test_startReactorRunsTheReactor src/twisted/test/test_twistd.py::UnixApplicationRunnerSetupEnvironmentTests::test_changeWorkingDirectory src/twisted/test/test_twistd.py::UnixApplicationRunnerSetupEnvironmentTests::test_chroot src/twisted/test/test_twistd.py::UnixApplicationRunnerSetupEnvironmentTests::test_daemonPIDFile src/twisted/test/test_twistd.py::UnixApplicationRunnerSetupEnvironmentTests::test_daemonize src/twisted/test/test_twistd.py::UnixApplicationRunnerSetupEnvironmentTests::test_daemonizedNoUmask src/twisted/test/test_twistd.py::UnixApplicationRunnerSetupEnvironmentTests::test_noChroot src/twisted/test/test_twistd.py::UnixApplicationRunnerSetupEnvironmentTests::test_noDaemonize src/twisted/test/test_twistd.py::UnixApplicationRunnerSetupEnvironmentTests::test_noDaemonizeNoUmask src/twisted/test/test_twistd.py::UnixApplicationRunnerSetupEnvironmentTests::test_nonDaemonPIDFile src/twisted/test/test_twistd.py::UnixApplicationRunnerSetupEnvironmentTests::test_umask src/twisted/test/test_twistd.py::UnixApplicationRunnerStartApplicationTests::test_setUidSameAsCurrentUid src/twisted/test/test_twistd.py::UnixApplicationRunnerStartApplicationTests::test_setUidWithoutGid src/twisted/test/test_twistd.py::UnixApplicationRunnerStartApplicationTests::test_setupEnvironment src/twisted/test/test_twistd.py::UnixApplicationRunnerStartApplicationTests::test_shedPrivileges src/twisted/test/test_twistd.py::UnixApplicationRunnerStartApplicationTests::test_shedPrivilegesError src/twisted/test/test_twistd.py::UnixApplicationRunnerRemovePIDTests::test_removePID src/twisted/test/test_twistd.py::UnixApplicationRunnerRemovePIDTests::test_removePIDErrors src/twisted/test/test_twistd.py::AppProfilingTests::test_cProfile src/twisted/test/test_twistd.py::AppProfilingTests::test_cProfileSaveStats src/twisted/test/test_twistd.py::AppProfilingTests::test_defaultProfiler src/twisted/test/test_twistd.py::AppProfilingTests::test_profile src/twisted/test/test_twistd.py::AppProfilingTests::test_profilePrintStatsError src/twisted/test/test_twistd.py::AppProfilingTests::test_profileSaveStats src/twisted/test/test_twistd.py::AppProfilingTests::test_profilerNameCaseInsentive src/twisted/test/test_twistd.py::AppProfilingTests::test_unknownProfiler src/twisted/test/test_twistd.py::AppProfilingTests::test_withoutCProfile src/twisted/test/test_twistd.py::AppProfilingTests::test_withoutProfile src/twisted/test/test_twistd.py::AppLoggerTests::test_configuredLogObserverBeatsComponent src/twisted/test/test_twistd.py::AppLoggerTests::test_configuredLogObserverBeatsLegacyComponent src/twisted/test/test_twistd.py::AppLoggerTests::test_configuredLogObserverBeatsLogfile src/twisted/test/test_twistd.py::AppLoggerTests::test_configuredLogObserverBeatsSyslog src/twisted/test/test_twistd.py::AppLoggerTests::test_getLogObserverFile src/twisted/test/test_twistd.py::AppLoggerTests::test_getLogObserverStdout src/twisted/test/test_twistd.py::AppLoggerTests::test_legacyObservers src/twisted/test/test_twistd.py::AppLoggerTests::test_loggerComponentBeatsLegacyLoggerComponent src/twisted/test/test_twistd.py::AppLoggerTests::test_start src/twisted/test/test_twistd.py::AppLoggerTests::test_startUsesApplicationLogObserver src/twisted/test/test_twistd.py::AppLoggerTests::test_startUsesConfiguredLogObserver src/twisted/test/test_twistd.py::AppLoggerTests::test_stop src/twisted/test/test_twistd.py::AppLoggerTests::test_unmarkedObserversDeprecated src/twisted/test/test_twistd.py::UnixAppLoggerTests::test_getLogObserverDefaultFile src/twisted/test/test_twistd.py::UnixAppLoggerTests::test_getLogObserverDontOverrideSignalHandler src/twisted/test/test_twistd.py::UnixAppLoggerTests::test_getLogObserverFile src/twisted/test/test_twistd.py::UnixAppLoggerTests::test_getLogObserverStdout src/twisted/test/test_twistd.py::UnixAppLoggerTests::test_getLogObserverStdoutDaemon src/twisted/test/test_twistd.py::UnixAppLoggerTests::test_getLogObserverSyslog src/twisted/test/test_twistd.py::DaemonizeTests::test_error src/twisted/test/test_twistd.py::DaemonizeTests::test_errorInParent src/twisted/test/test_twistd.py::DaemonizeTests::test_errorInParentWithTruncatedUnicode src/twisted/test/test_twistd.py::DaemonizeTests::test_errorMessageTruncated src/twisted/test/test_twistd.py::DaemonizeTests::test_hooksCalled src/twisted/test/test_twistd.py::DaemonizeTests::test_hooksNotCalled src/twisted/test/test_twistd.py::DaemonizeTests::test_nonASCIIErrorInParent src/twisted/test/test_twistd.py::DaemonizeTests::test_success src/twisted/test/test_twistd.py::DaemonizeTests::test_successEINTR src/twisted/test/test_twistd.py::DaemonizeTests::test_successInParent src/twisted/test/test_twistd.py::DaemonizeTests::test_successInParentEINTR src/twisted/test/test_twistd.py::DaemonizeTests::test_unicodeError src/twisted/test/test_twistd.py::DaemonizeTests::test_unicodeErrorMessageTruncated src/twisted/test/test_twistd.py::ExitWithSignalTests::test_exitWithSignal src/twisted/test/test_twistd.py::ExitWithSignalTests::test_normalExit src/twisted/test/test_twistd.py::ExitWithSignalTests::test_runnerExitsWithSignal