[Python-Dev] Deprecating non-Py_ssize_t use of PyArg_ParseTuple
Stefan Behnel
stefan_ml at behnel.de
Mon Mar 21 15:35:01 CET 2011
Victor Stinner, 21.03.2011 15:21:
> Le lundi 21 mars 2011 à 04:09 +0100, "Martin v. Löwis" a écrit :
>> Since Python 2.5, we maintain two versions of PyArg_ParseTuple:
>> one outputting int; the other one outputting Py_ssize_t.
>>
>> The former should have been removed in 3.0, but this was forgotten.
>>
>> Still, I would like people to move over to the new version, so
>> that extension modules will typically support 64-bit collections
>> well. Therefore, I'd like to propose that the int version is deprecated
>> in 3.3.
>
> By the way, what is the status of migration to Py_ssize_t of CPython
> extensions? I suppose that adding a warning will quickly give an answer.
You'll get a series of very visible warnings from the C compiler when
compiling a non-Py_ssize_t extension on a 64bit platform, which is a rather
common platform type these days. So I'd doubt that there are any
still-in-use extensions left that have not migrated.
Stefan
More information about the Python-Dev
mailing list