-
Notifications
You must be signed in to change notification settings - Fork 666
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
Make entry_points behave the same across Python versions #3167
Comments
Do you have an example in which this does not work in 3.8 and 3.9 so we can try to reproduce? |
Ok, so we have 2 issues:
The idea behind this PR is to solve both issues by creating a private module that we can use in OTel components to access entry points that provides an uniform API and allows for selecting entry points by |
@ocelotl I have a high level question. Rather than add our own wrapper library, could we just use the
Once we drop Python 3.9 in the distant future, we could move to stdlib |
* Use importlib-metadata regardless of Python version Fixes #3167 * Fix lint * Add FIXME comment * Constraint importlib-metadata versions
Was there a need to unconditionally use EDIT: I see that |
* Make entry_points behave the same across Python versions Fixes #3167 * Refactor function * Fix mypy * Incorporate resource detectors to auto instrumentation This is an experimental feature. Fixes #3172 * Rename environment variable * Revert previous commits * Refactor to use importlib-metadata library * Use get_aggregate_resources * Fix mypy * Add CHANGELOG entry * Fix typo in environment variable * Add OTELResourceDetector by default * Move to unreleased section * Fix entry point name in the documentation * Update opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py Co-authored-by: Srikanth Chekuri <[email protected]> --------- Co-authored-by: Srikanth Chekuri <[email protected]>
The recently introduced
entry_points
function does not behave the same across Python versions and it is not possible to get all entry points in Python 3.8 and 3.9.The text was updated successfully, but these errors were encountered: