pythoncapi-compat icon indicating copy to clipboard operation
pythoncapi-compat copied to clipboard

upgrade_pythoncapi.py: disable "coding style" operations

Open vstinner opened this issue 4 years ago • 1 comments

By default, upgrade_pythoncapi.py enables all operations. Some operations are not strictly required to support Python 3.10 and Python 3.11 and can introduce many "unwanted" changes:

  • PyMem_MALLOC, PyObject_MALLOC, PyObject_NEW
  • PyFrame_GetBack, PyFrame_GetCode
  • PyThreadState_GetInterpreter, PyThreadState_GetFrame
  • Py_TYPE, Py_SIZE, Py_REFCNT

Maybe keeping them by default is fine, there should be an easy way to only apply required changes. For example, Python 3.10 requires Py_SET_REFCNT and Python 3.11 requires Py_SET_SIZE.

vstinner avatar Feb 11 '22 14:02 vstinner

Sounds good. Do you have a list of required changes, or do we need to assemble one?

erlend-aasland avatar Feb 11 '22 22:02 erlend-aasland

I lost track of the issue, I prefer to close it for now.

vstinner avatar Sep 03 '24 12:09 vstinner