
In addition, I just heard from the SC that they've approved the exception. So we will remove these two APIs from 3.11 without deprecation. Erm, hang on – when I wrote that I'm fine with *changing* them, I wasn't
Guido van Rossum schrieb am 07.09.21 um 00:44: thinking of actually *removing* them. At least not both. PyCode_NewEmpty() isn't a good replacement since it takes low level arguments … char* instead of Python strings. It's good for the simple use case that it was written for (and Cython already uses it for that), but not so great for anything beyond that. What I could try is to create only a single dummy code object and then always call .replace() on it to create new ones. But that seems hackish and requires managing yet another bit of global state across static and generated code parts. I could also switch to _PyCode_New(), though it's not exactly what I would call an attractive option, both for usability reasons and its future API stability. (Cython also still generates C89 code, i.e. no partial struct initialisations.) Any suggestions? Stefan