M.-A. Lemburg wrote: > I don't see a good solution for these other than introducing > a set of new APIs (and maybe doing some macro magic as Martin > did for PyArg_ParseTuple()). Due to the fact that changes in > the types of output parameters require changes in the > extension variable type layout itself, they introduce a large > number of type changes in the extension and make writing > backwards compatible extensions harder than necessary. That's not true. It is very easy to write extensions that receive such values and are still backwards-compatible. Suppose you had int pos; PyObject *k, *v; PyDict_Next(dict, &pos, &k, &v); You just change this to /* beginning of file */ #ifdef Py_HEX_VERSION < 2.5 typedef int Py_ssize_t; #endif /* later */ Py_ssize_t pos; PyObject *k, *v; PyDict_Next(dict, &pos, &k, &v); That's it! > Furthermore, all extensions for Python 2.4 would have to be > ported to the new Python API and porting is not going to > be a simple recompile, but will require C skills. Not all extensions. Only those that call functions that expect int* output parameters - which is fairly uncommon. > Martin, please add the above points to the PEP. I'd also > like to see it published, because it's hard to track a PEP > in the mailing It's very difficult to get a PEP number assigned. I wrote peps at python.org with no response. Regards, Martin
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