[PR #13502/01dce85a backport][8.4.x] Fix compatibility with Twisted 25#13531
Merged
nicoddemus merged 1 commit into8.4.xfrom Jun 17, 2025
Conversation
As discussed in #13502, the fix for compatibility with Twisted 25+ is simpler. Therefore, it makes sense to implement both fixes (for Twisted 24 and Twisted 25) in parallel. This way, we can eventually drop support for Twisted <25 and keep only the simpler workaround. In addition, the `unittestextras` tox environment has been replaced with dedicated test environments for `asynctest`, `Twisted 24`, and `Twisted 25`. Fixes #13497 (cherry picked from commit 01dce85)
nicoddemus
approved these changes
Jun 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a backport of PR #13502 as merged into main (01dce85).
The issue arises because
Failure.__init__in Twisted 25 can receive a non-Noneexc_valuewhileexc_tbisNone. In such cases,ExceptionInfo[BaseException].from_exc_infofails, as it expects a traceback to be present whensys.exc_info()returns a tuple. This leads to the error message'NoneType' object is not iterable.Implemented separate workarounds for Twisted 24 and Twisted 25, the later one being simpler and less intrusive in the long run, as it does not require monkeypatching
Failure.__init__.We can drop suppor for Twisted 24 and keep the simpler patch in a later release.
Fixes #13497