classification
Title: Modules needing PY_SSIZE_T_CLEAN
Type: behavior Stage: needs patch
Components: Extension Modules Versions: Python 3.2
process
Status: open Resolution:
Dependencies: audioop module needs an int -> Py_ssize_t upgrade
View: 8675
Superseder:
Assigned To: Nosy List: Arfrever, loewis, mark.dickinson, pitrou, terry.reedy
Priority: normal Keywords:

Created on 2010-05-10 19:59 by pitrou, last changed 2010-05-14 21:32 by pitrou.

Messages (7)
msg105461 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-05-10 19:59
This is a list of extension modules making use of one of the "#" format codes ("s#", "y#", etc.) without defining PY_SSIZE_T_CLEAN, and therefore being 64-bit unclean:

Modules/audioop.c
Modules/_cursesmodule.c
Modules/_elementtree.c
Modules/_gdbmmodule.c
Modules/nismodule.c
Modules/ossaudiodev.c
Modules/pyexpat.c
Modules/socketmodule.c
Modules/_ssl.c
Modules/unicodedata.c
msg105462 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-05-10 20:09
The documentation says that sometimes in the future Py_ssize_t will be the default, so we may also need some kind of transition period for non-complying third-party extensions; first with warnings and then with errors perhaps.
msg105464 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2010-05-10 20:23
I personally don't think that a transition period would be a useful thing to have, in particular not if it goes like this:
- in version A, require use of PY_SSIZE_T_CLEAN
- in version A+1, make use of PY_SSIZE_T_CLEAN redundant

So I'd rather drop PY_SSIZE_T clean altogether from 3.2, and risk any breakage that this may cause.
msg105739 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-05-14 18:51
Mark just fixed audioop in #8675
msg105741 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2010-05-14 18:58
And the curses module was made PY_SSIZE_T_CLEAN in r81085 (a very simple change).
msg105755 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-05-14 20:12
Is there any reason why you reported zlibmodule.c separately in #8650 (other than maybe finding that first), and for 4 versions there versus 1 here? Should this supersede that?
msg105767 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-05-14 21:32
> Is there any reason why you reported zlibmodule.c separately in #8650
> (other than maybe finding that first),

Because zlibmodule.c has more 64-bitness issues than just PY_SSIZE_T_CLEAN (see bug description).

> Should this supersede that?

No.
History
Date User Action Args
2010-05-14 21:32:38pitrousetmessages: + msg105767
2010-05-14 20:12:36terry.reedysetmessages: + msg105755
2010-05-14 18:58:23mark.dickinsonsetmessages: + msg105741
2010-05-14 18:51:09terry.reedysetnosy: + terry.reedy
messages: + msg105739
2010-05-10 20:45:29Arfreversetnosy: + Arfrever
2010-05-10 20:23:29loewissetmessages: + msg105464
2010-05-10 20:09:00pitrousetnosy: + loewis
messages: + msg105462
2010-05-10 20:00:39pitrousetnosy: + mark.dickinson
dependencies: + audioop module needs an int -> Py_ssize_t upgrade
2010-05-10 19:59:39pitroucreate