Title: `asyncio.iscoroutinefunction` usage in integrations raises deprecation warning on 3.14 · Issue #6085 · getsentry/sentry-python · GitHub
Open Graph Title: `asyncio.iscoroutinefunction` usage in integrations raises deprecation warning on 3.14 · Issue #6085 · getsentry/sentry-python
X Title: `asyncio.iscoroutinefunction` usage in integrations raises deprecation warning on 3.14 · Issue #6085 · getsentry/sentry-python
Description: How do you use Sentry? Sentry Saas (sentry.io) Version 2.58.0 Steps to Reproduce On Python 3.14.4, asyncio.iscoroutinefunction is deprecated in favour of inspect.iscoroutinefunction. https://github.com/python/cpython/blob/2fdccb3f88603cb...
Open Graph Description: How do you use Sentry? Sentry Saas (sentry.io) Version 2.58.0 Steps to Reproduce On Python 3.14.4, asyncio.iscoroutinefunction is deprecated in favour of inspect.iscoroutinefunction. https://github...
X Description: How do you use Sentry? Sentry Saas (sentry.io) Version 2.58.0 Steps to Reproduce On Python 3.14.4, asyncio.iscoroutinefunction is deprecated in favour of inspect.iscoroutinefunction. https://github...
Opengraph URL: https://github.com/getsentry/sentry-python/issues/6085
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`asyncio.iscoroutinefunction` usage in integrations raises deprecation warning on 3.14","articleBody":"### How do you use Sentry?\n\nSentry Saas (sentry.io)\n\n### Version\n\n2.58.0\n\n### Steps to Reproduce\n\nOn Python 3.14.4, `asyncio.iscoroutinefunction` is deprecated in favour of `inspect.iscoroutinefunction`.\n\nhttps://github.com/python/cpython/blob/2fdccb3f88603cb72d311ca304ab7fcf9df12d00/Lib/asyncio/coroutines.py#L20-L27\n\nThis raises a warning when using FastAPI's integration, in both `sentry_sdk/integrations/starlette.py` and `sentry_sdk/integrations/fastapi.py`\n\nI manually converted them to use `inspect` in my `venv`s site package and the warning disappeared as expected. I have not checked for all usage of `asyncio.iscoroutinefunction`.\n\nReproduction using `pytest`\n\n```python\n# main.py\nfrom fastapi import FastAPI\nimport sentry_sdk\nfrom sentry_sdk.integrations.fastapi import FastApiIntegration\n\nsentry_sdk.init(\n dsn=\"valid-dsn\",\n integrations=[FastApiIntegration()],\n)\n\napp = FastAPI()\n\n@app.get(\"/\")\nasync def root():\n return {\"message\": \"Hello World\"}\n\n# test_main.py\nfrom main import app\nfrom fastapi.testclient import TestClient\n\nclient = TestClient(app)\n\ndef test_app():\n response = client.get(\"/\")\n assert response.status_code == 200\n```\n\n```\nPackage Version\n-------------------- ---------\nannotated-doc 0.0.4\nannotated-types 0.7.0\nanyio 4.13.0\ncertifi 2026.2.25\nclick 8.3.2\ndnspython 2.8.0\nemail-validator 2.3.0\nfastapi 0.136.0\nfastapi-cli 0.0.24\nfastapi-cloud-cli 0.17.0\nfastar 0.11.0\nh11 0.16.0\nhttpcore 1.0.9\nhttptools 0.7.1\nhttpx 0.28.1\nidna 3.11\niniconfig 2.3.0\njinja2 3.1.6\nmarkdown-it-py 4.0.0\nmarkupsafe 3.0.3\nmdurl 0.1.2\npackaging 26.1\npluggy 1.6.0\npydantic 2.13.1\npydantic-core 2.46.1\npydantic-extra-types 2.11.1\npydantic-settings 2.13.1\npygments 2.20.0\npytest 9.0.3\npython-dotenv 1.2.2\npython-multipart 0.0.26\npyyaml 6.0.3\nrich 15.0.0\nrich-toolkit 0.19.7\nrignore 0.7.6\nsentry-sdk 2.58.0\nshellingham 1.5.4\nstarlette 1.0.0\ntyper 0.24.1\ntyping-extensions 4.15.0\ntyping-inspection 0.4.2\nurllib3 2.6.3\nuvicorn 0.44.0\nuvloop 0.22.1\nwatchfiles 1.1.1\nwebsockets 16.0\n```\n\n### Expected Result\n\nNo warnings when using integrations.\n\n### Actual Result\n\n```\n================================================== warnings summary ==================================================\n.venv/lib/python3.14/site-packages/sentry_sdk/integrations/starlette.py:427\n.venv/lib/python3.14/site-packages/sentry_sdk/integrations/starlette.py:427\n.venv/lib/python3.14/site-packages/sentry_sdk/integrations/starlette.py:427\n.venv/lib/python3.14/site-packages/sentry_sdk/integrations/starlette.py:427\n /home/cooper/scratch/sentry-python-repro/.venv/lib/python3.14/site-packages/sentry_sdk/integrations/starlette.py:427: DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead\n return asyncio.iscoroutinefunction(obj) or (\n\n.venv/lib/python3.14/site-packages/sentry_sdk/integrations/fastapi.py:76\n /home/cooper/scratch/sentry-python-repro/.venv/lib/python3.14/site-packages/sentry_sdk/integrations/fastapi.py:76: DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead\n and not asyncio.iscoroutinefunction(dependant.call)\n```","author":{"url":"https://github.com/cooperoptigrid","@type":"Person","name":"cooperoptigrid"},"datePublished":"2026-04-16T23:13:42Z","url":"https://github.com/getsentry/sentry-python/issues/6085"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f4ad888e-80ad-9648-f0a8-ec87e3473ae5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8242:19F5F4:95BE6:CD95C:6B007F27 |
| html-safe-nonce | 79b052ce71d28a7d0f9d9a6b3c9d8954a0840350274c735b9c3e08d788b83053 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MjQyOjE5RjVGNDo5NUJFNjpDRDk1Qzo2QjAwN0YyNyIsInZpc2l0b3JfaWQiOiI2MDAyNDczODU2MDQyODI3NTU5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 921a385157175e66caf6c5ddca46209fbd99baa2ca057852a1a8e433ac688b65 |
| hovercard-subject-tag | issue:4279051158 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-python/6085/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8a1080ad1a742eec0e6cf1b237e428047dbe0c2d235f7a3cb521e6d11f5c30bf/getsentry/sentry-python/issues/6085 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8a1080ad1a742eec0e6cf1b237e428047dbe0c2d235f7a3cb521e6d11f5c30bf/getsentry/sentry-python/issues/6085 |
| og:image:alt | How do you use Sentry? Sentry Saas (sentry.io) Version 2.58.0 Steps to Reproduce On Python 3.14.4, asyncio.iscoroutinefunction is deprecated in favour of inspect.iscoroutinefunction. https://github... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cooperoptigrid |
| hostname | github.com |
| expected-hostname | github.com |
| None | 82c186f13e104004ab7bdb779f3195e59dd38bfde531aaa74b76470fc2462b83 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-python git https://github.com/getsentry/sentry-python.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 137814779 |
| octolytics-dimension-repository_nwo | getsentry/sentry-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 137814779 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d1bc2aa1939001689f5ce935982c10a6138f745c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width