ref(tornado): Remove unused compat code - #7043
Merged
Merged
Conversation
sentrivana
marked this pull request as ready for review
August 5, 2026 11:54
Contributor
Codecov Results 📊✅ 92339 passed | ⏭️ 5436 skipped | Total: 97775 | Pass Rate: 94.44% | Execution Time: 322m 58s 📊 Comparison with Base Branch
All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 2325 uncovered lines. Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 89.91% 90.18% +0.27%
==========================================
Files 193 186 -7
Lines 24828 23673 -1155
Branches 8930 8538 -392
==========================================
+ Hits 22322 21348 -974
- Misses 2506 2325 -181
- Partials 1416 1360 -56Generated by Codecov Action |
alexander-alderman-webb
approved these changes
Aug 5, 2026
Chenghao999
reviewed
Aug 6, 2026
Chenghao999
left a comment
There was a problem hiding this comment.
Verified this removal is safe and consistent:
- The
tornadoextra insetup.pyis pinned totornado>=6, and the runtime floor check already enforces it via_MIN_VERSIONS["tornado"] = (6, 0)insentry_sdk/integrations/__init__.py. SoRequestHandler._executeis guaranteed to be a native coroutine whenever this integration can run: theiscoroutinefunctionbranch was always True and the generator path was dead code. tests/integrations/tornado/test_tornado.pycontains no references to the removed path, which is consistent with it being unreachable, and patch coverage is 100%.- The import removals are complete — nothing else in the file references
iscoroutinefunctionortornado.gen.
Optional nit: the "Starting Tornado 6 ..." comment disappeared together with the branch. A one-liner on the now-unconditional async def wrapper explaining that Tornado >= 6 (enforced both in the extras and at runtime) makes the compat path unnecessary would help future readers.
LGTM — nice small cleanup.
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.
We're now enforcing Tornado > 6, so compat code for older versions is not needed anymore