chore(django): Use iscoroutinefunction shim in patch_views() - #7024
Merged
alexander-alderman-webb merged 2 commits intoAug 4, 2026
Conversation
alexander-alderman-webb
marked this pull request as ready for review
August 4, 2026 06:42
Contributor
Codecov Results 📊✅ 95563 passed | ⏭️ 6239 skipped | Total: 101802 | Pass Rate: 93.87% | Execution Time: 341m 16s 📊 Comparison with Base Branch
➖ Removed Tests (1)View removed tests
All tests are passing successfully. ✅ Patch coverage is 83.33%. Project has 2504 uncovered lines. Files with missing lines (1)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 89.90% 89.91% +0.01%
==========================================
Files 193 193 —
Lines 24834 24825 -9
Branches 8912 8912 —
==========================================
+ Hits 22326 22321 -5
- Misses 2508 2504 -4
- Partials 1415 1414 -1Generated by Codecov Action |
sentrivana
approved these changes
Aug 4, 2026
sentrivana
left a comment
Contributor
There was a problem hiding this comment.
Nice! Small suggestion
iscoroutinefunction shim in patch_viewsiscoroutinefunction shim in patch_views()
alexander-alderman-webb
deleted the
webb/django-views-iscoroutinefunction
branch
August 4, 2026 07:57
mgaligniana
pushed a commit
to mgaligniana/sentry-python
that referenced
this pull request
Aug 9, 2026
…sentry#7024) Re-use the existing shim in `django.asgi`. The shim vendors `asgiref.sync.iscoroutinefunction()`, used in Django to determine if a function is considered to be async or sync. Co-authored-by: Digenis <digenishjkl@gmail.com>
6 tasks
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.
Description
Re-use the existing shim in
django.asgithat vendorsasgiref.sync.iscoroutinefunction().The
views.pyandasgi.pyfiles were split to keep Python 2 compatibility in #851.As we no longer support Python 2, we can unconditionally import
asgi.pyinviews.py.Issues
Closes #4900
Reminders
uv run ruff.feat:,fix:,ref:,meta:)