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

chore(utils): make cache utils `callonce()` compatible with py 3.11

Open Yun-Kim opened this issue 3 years ago • 0 comments

Description

#4302 added a callonce() decorator as a cache utility function. However, this imported inspect.getargspec() was removed as of Python 3.11. This was fixed by importing inspect.getfullargspec(), which is the recommended replacement for getargspec(). Note that getargspec() is still used in Python 2.

Checklist

Motivation

Design

Testing strategy

Relevant issue(s)

Testing strategy

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.

Yun-Kim avatar Oct 14 '22 20:10 Yun-Kim