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

Add setuptools runtime requirement #2334

Merged
merged 3 commits into from
Dec 25, 2021
Merged

Conversation

mattoberle
Copy link
Contributor

@mattoberle mattoberle commented Dec 15, 2021

Description

The pkg_resources module is provided by setuptools.
The setuptools package is not part of the Python stdlib but is often available in the system environment as a build-time requirement.

Explicitly listing setuptools as a requirement protects opentelemetry-python from breaking with import errors in cases where setuptools is not available system-wide.

This commit pins the version to setuptools >= 16.0 which is the first release that includes the required imports (2015).
A similar change was adopted in opentelemetry-python-contrib.

Fixes #2282

Type of change

Please delete options that are not relevant.

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

How Has This Been Tested?

  • mkdir /tmp/pkg && pip install -t /tmp/pkg {modified-pkg} && test -f /tmp/pkg/pkg_resources

Does This PR Require a Contrib Repo Change?

  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated

@mattoberle mattoberle requested a review from a team December 15, 2021 17:15
The `pkg_resources` module is provided by `setuptools`.
The `setuptools` package is not part of the Python stdlib but is often
available in the system environment as a build-time requirement.

Explicitly listing `setuptools` as a requirement protects
`opentelemetry-python` from breaking with import errors in cases where
`setuptools` is not available system-wide.

This commit pins the version to `setuptools >= 16.0` which is the first
release that includes the required imports (2015).
@owais owais enabled auto-merge (squash) December 25, 2021 21:24
@owais owais merged commit d432153 into open-telemetry:main Dec 25, 2021
jenshnielsen added a commit to jenshnielsen/opentelemetry-python that referenced this pull request Jul 6, 2023
This was originally added in open-telemetry#2334 but the runtime dependency
on pkg_resources was since dropped in open-telemetry#3047 so the dependency
can be dropped
jenshnielsen added a commit to jenshnielsen/opentelemetry-python that referenced this pull request Jul 6, 2023
This was originally added in open-telemetry#2334 but the runtime dependency
on pkg_resources was since dropped in open-telemetry#3047 so the dependency
can be dropped
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.

Should "setuptools" be a runtime dependency of opentelemetry-api and opentelemetry-sdk?
3 participants