cpython icon indicating copy to clipboard operation
cpython copied to clipboard

gh-140550: Update xxlimited with 3.15 limited API & PEP 697

Open encukou opened this issue 1 month ago • 1 comments

  • Copy the existing xxlimited to xxlimited_3_13: this module serves as a rudimentary check that we don't break older Limited API. This is similar to xxlimited_35. (Nowadays we know that it's good to have a separator between the major/minor versions, but renaming to xxlimited_3_5 isn't worth the churn.)
  • Reorganize test_xxlimited to make similar copies easier in the future
  • Switch xxlimited to Limited API 3.15, PyModExport (PEP-793), standalone instance struct with extended basicsize (PEP-697)
  • treat PyObject as opaque, as proposed in PEP-803 and PEP-809, using a private knob (_Py_OPAQUE_PYOBJECT) for now to ensure we don't rely on PyObject layout details accidentally. (I'll replace/remove the private API in 3.15 beta at latest.)
  • Issue: gh-140550

encukou avatar Dec 16 '25 14:12 encukou

I'll mark this draft -- this PR makes some shortcomings quite visible, and I guess it's better to address them before suggesting the new API :)

encukou avatar Dec 16 '25 17:12 encukou