On 09/13/18 23:34, Neil Schemenauer wrote: > On 2018-09-04, Eddie Elizondo wrote: >> Solution: >> >> * Fix the implementation of PyStructSequence_NewType: >> >> The best solution would be to fix the implementation of this >> function. This can easily be done by dynamically creating a >> PyType_Spec and calling PyType_FromSpec > > Hello Eddie, > > Thank you for spending time to look into this. Without studying the > details of your patch, your approach sounds correct to me. I think > we should be allocating types from the heap and use PyType_FromSpec. > Having static type definitions living in the data segment cause too > many issues. > > We have to assess how 3rd party extension modules would be affected > by this change. Unless it is too hard to do, they should still > compile (perhaps with warnings) after your fix. Do you know if > that's the case? Looking at your changes to structseq.c, I can't > tell easily. > > In any case, this should go into Victor's pythoncapi fork. That > fork includes all the C-API cleanup we are hoping to make to CPython > (assuming we can figure out the backwards and forwards compatibility > issues). Nope, Victor's fork doesn't include all C-API cleanup. There's an older long-term effort (PEP-384, PEP-489, the current contenders 576/579/580, and PEP-573 for the future). Converting things to use PyType_FromSpec falls in there. As long as the old API still works, these changes should go in (but they might need a PEP).
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4