Skip to content

🤖 fix: replace version-gated iscoroutinefunction import with unconditi#1

Open
zewst-ironclad[bot] wants to merge 1 commit into
masterfrom
ironclad/mission-a739ace4-87bf-491e-a240-b98012205943
Open

🤖 fix: replace version-gated iscoroutinefunction import with unconditi#1
zewst-ironclad[bot] wants to merge 1 commit into
masterfrom
ironclad/mission-a739ace4-87bf-491e-a240-b98012205943

Conversation

@zewst-ironclad

Copy link
Copy Markdown

Summary

Ironclad mission a739ace4-87bf-491e-a240-b98012205943 for #: Replace asyncio.iscoroutinefunction with inspect.iscoroutinefunction in sentry_sdk/integrations/asgi.py ONLY

The change is complete. The file sentry_sdk/integrations/asgi.py now has:

  1. Removed the version-gated import block that conditionally imported iscoroutinefunction from either asyncio or inspect
  2. Added an unconditional from inspect import iscoroutinefunction at line 68

The inspect.iscoroutinefunction has been available since Python 3.4, so this change is safe and removes unnecessary version-checking code.

{
  "analysis": "The change to sentry_sdk/integrations/asgi.py has been successfully applied. The version-gated import block that conditionally imported iscoroutinefunction from either asyncio or inspect has been replaced with an unconditional `from inspect import iscoroutinefunction`. The inspect module has had iscoroutinefunction since Python 3.4, making this ch

---

repo: `zewst/eval-sentry-python`

…ional inspect import

Replace the version-gated import block that conditionally imported
iscoroutinefunction from inspect (Python 3.14+) or asyncio (earlier)
with a single unconditional `from inspect import iscoroutinefunction`.

The inspect.iscoroutinefunction function has existed since Python 3.4,
so the version check is unnecessary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants