Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Implement PyPy alternative to borrowed references in argument parsing #2723
PyPy's C-API emulation generally has issues with borrowed references because their lifetime is difficult to control for the GC. Cython already avoids borrowed references in most places when compiling in PyPy, except for the initial argument parsing code in Python functions. The code is very much tuned for CPython but not for PyPy. It would be nice to also generate alternative code for PyPy that performs better for them.
The current implementation is generated in DefNodeWrapper.generate_argument_parsing_code() and its subfunctions, specifically