dd-trace-py icon indicating copy to clipboard operation
dd-trace-py copied to clipboard

chore(internal): resolve incorrect import resolution from Cython

Open brettlangdon opened this issue 1 year ago • 0 comments

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

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-changelog label added.
  • [ ] All relevant GitHub issues are correctly linked.
  • [ ] Backports are identified and tagged with Mergifyio.
  • [ ] Add to milestone.

brettlangdon avatar Aug 15 '22 19:08 brettlangdon