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

refactor(django): import from psycopg2 lazily

Open P403n1x87 opened this issue 3 years ago • 0 comments

Description

This change refactors the django patch module to avoid cross-importing from the psycopg2 integration, which might cause psycopg2 to be loaded, when available, even if not required by the traced application.

Checklist

Reviewer Checklist

  • [x] Title is accurate.
  • [x] Description motivates each change.
  • [x] No unnecessary changes were introduced in this PR.
  • [x] PR cannot be broken up into smaller PRs.
  • [x] Avoid breaking API changes unless absolutely necessary.
  • [x] Tests provided or description of manual testing performed is included in the code or PR.
  • [x] Release note has been added for fixes and features, or else changelog/no-changelog label added.
  • [x] All relevant GitHub issues are correctly linked.
  • [x] Backports are identified and tagged with Mergifyio.
  • [x] Add to milestone.

P403n1x87 avatar Oct 13 '22 15:10 P403n1x87