◐ Shell
clean mode source ↗

gh-108494: Fix AC limited C API for kwargs by vstinner · Pull Request #108516 · python/cpython

Currently it can produce invalid code which is compiled. There are two opposite approaches:

  1. Raise an exception or ensure that the compiling the generated code will get a compilation error.
  2. Try to use the limited API if possible, but fallback to private API otherwise.

I am currently trying the second approach. It allows to re-generate all clinic code using the limited API and test that at least it works (I found many cases in which the current code does not generate working code). Please hold this PR, the current code is more suitable for this experiment. After testing it will be easy to switch to the first approach.