Skip to content
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

Use imporlib.metadata on python >=3.10 #3373

Closed

Conversation

jenshnielsen
Copy link
Contributor

Description

This api is no longer provisional in 3.10 and this reduces the number of dependencies for any instrumented code on >= 3.10

Changed in version 3.10: importlib.metadata is no longer provisional.

See the official docs

This was suggested in #3234 but never implemented.

Fixes #3234

and avoids issues such as #3333 on those versions in the future.

In my opinion it's a really nice feature of opentelemetry (compared to opencensus) that the api only has
very light dependencies. Currently it has 5 dependencies. Of these one is setuptools which can be dropped (#3372)
and 2 are importlib-metadata and iss dependency zipp. Both or these are std lib backports so with these changes they
are dropped.

(The remaining dependencies are Deprecated and its dependency wrapt)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

The used importlib functionality is well tested within the codebase. These tests are

Does This PR Require a Contrib Repo Change?

Answer the following question based on these examples of changes that would require a Contrib Repo Change:

  • The OTel specification has changed which prompted this PR to update the method interfaces of opentelemetry-api/ or opentelemetry-sdk/

  • The method interfaces of test/util have changed

  • Scripts in scripts/ that were copied over to the Contrib repo have changed

  • Configuration files that were copied over to the Contrib repo have changed (when consistency between repositories is applicable) such as in

    • pyproject.toml
    • isort.cfg
    • .flake8
  • When a new .github/CODEOWNER is added

  • Major changes to project information, such as in:

    • README.md
    • CONTRIBUTING.md
  • Yes. - Link to PR:

  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added (N/A)
  • Documentation has been updated (N/A)

This api is no longer provisional in 3.10 and this reduces
the number of dependencies for any instrumented code
on >= 3.10

Fixes open-telemetry#3234
@jenshnielsen jenshnielsen requested a review from a team July 6, 2023 13:50
@jenshnielsen
Copy link
Contributor Author

Seems like these is a an api difference so I will close until I had a change to investigate

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.

importlib-metadata breaks code
1 participant