dd-trace-py
dd-trace-py copied to clipboard
chore(internal): resolve incorrect import resolution from Cython
Description
This change is a follow-up to #4085 to provide a more long term solution to the problem and reverting the pinning of setuptools versions.
setuptools==64.0.0 changed the way editable modules are linked to in
site-packages (from .egg-link to .pth + a loader). This exposed
and issue with the import of ddtrace.constants from within a Cython module.
Cython was loading the ddtrace.internal.constants module instead.
See #4085 and https://github.com/brettlangdon/shadow-import-issue for more details.
Checklist
- [x] Title must conform to conventional commit.
- [x] Add additional sections for
featandfixpull requests. - [x] Ensure tests are passing for affected code.
- [x] Library documentation and/or Datadog's documentation site is updated. Link to doc PR in description.
Reviewer Checklist
- [ ] Title is accurate.
- [ ] Description motivates each change.
- [ ] No unnecessary changes were introduced in this PR.
- [ ] PR cannot be broken up into smaller PRs.
- [ ] Avoid breaking API changes unless absolutely necessary.
- [ ] Tests provided or description of manual testing performed is included in the code or PR.
- [ ] Release note has been added for fixes and features, or else
changelog/no-changeloglabel added. - [ ] All relevant GitHub issues are correctly linked.
- [ ] Backports are identified and tagged with Mergifyio.
- [ ] Add to milestone.