-
Notifications
You must be signed in to change notification settings - Fork 809
Replace asyncio.iscoroutinefunction with inspect.iscoroutinefunction #3880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace asyncio.iscoroutinefunction with inspect.iscoroutinefunction #3880
Conversation
3c95d5f to
cb8c198
Compare
cb8c198 to
0d560f9
Compare
...pentelemetry-instrumentation-aiokafka/src/opentelemetry/instrumentation/aiokafka/__init__.py
Show resolved
Hide resolved
|
Hm the failing test is a bug in CPython where an Here's a debug session that shows live variables and illustrates the problem:
I guess we could special case for Python 3.9, but I assume in the near term otel will drop Python 3.9 compatibility since it's EOL? The particularly annoying part is that this only shows up in Our options as I see it:
I kind of think we should do (1) |
|
@xrmx I added what I think is a reasonable fix given the Python 3.9 status, LMK if you'd like a different change! |
instrumentation/opentelemetry-instrumentation-aiokafka/tests/test_instrumentation.py
Outdated
Show resolved
Hide resolved
instrumentation/opentelemetry-instrumentation-aiokafka/tests/test_instrumentation.py
Outdated
Show resolved
Hide resolved
Thanks! |

Description
asyncio.iscoroutinefunctionis officially deprecated in 3.14,inspect.iscoroutinefunctionhas been around since 3.5Fixes #3879
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.