gh-64490: Fix refcount error when arguments are packed to tuple in argument clinic
While Argument Clinic generated code is packing varargs to a tuple, the arguments' refcounts are not increased. So all the packed arguments‘ refcounts are decreased 1 improperly when the tuple is released later.
This bug is found in https://github.com/python/cpython/pull/96178 "Argument Clinic functional test".
- Issue: gh-64490
Most changes to Python require a NEWS entry.
Please add it using the blurb_it web app or the blurb command-line tool.
Added Argument Clinic functional test (#96002). @erlend-aasland @kumaraditya303
Merged, thanks!
Thank you!
GH-100338 is a backport of this pull request to the 3.11 branch.