Issue 1185: py3k: Completely remove nb_coerce slot (original) (raw)

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/45526

classification

Title: py3k: Completely remove nb_coerce slot
Type: enhancement Stage:
Components: Interpreter Core Versions: Python 3.0

process

Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, gvanrossum, nas, scoder
Priority: normal Keywords: patch

Created on 2007-09-20 22:51 by amaury.forgeotdarc, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
nocoerce.diff amaury.forgeotdarc,2007-09-20 22:51
Messages (5)
msg56067 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2007-09-20 22:51
Arguments coercion has been removed in py3k for a while, but there are still some traces of it. This patch removes the nb_coerce slot and the last usages of __coerce__. Documentation is also updated: Py_TPFLAGS_CHECKTYPES does not exists anymore. Note: I ran the testsuite on Windows only.
msg56076 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-09-21 16:45
Can you redo the patch while keeping the slot *position* (though not the name or type)? The wasted space is minimal (4-8 bytes per type or class object) and it means a lot for third party code if the positional struct initialization never breaks due to insertion or removal of a slot. Since everyone has a zero here anyway, I propose to name the slot nb_reserved and make its type int.
msg56081 - (view) Author: Neil Schemenauer (nas) Date: 2007-09-21 20:20
I made the changes as suggest by Guido. Commited as SVN rev 58226. Thanks for the patch.
msg56082 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-09-21 20:21
Thanks Neil!
msg67764 - (view) Author: Stefan Behnel (scoder) * (Python committer) Date: 2008-06-06 12:01
As noted in , the nb_divide slot (4th field!) has already been removed, so Py2 code has to be adapted anyway. I therefore recommend to just remove all unused fields to get a clean struct for Py3.
History
Date User Action Args
2022-04-11 14:56:27 admin set github: 45526
2008-06-06 12:01:57 scoder set nosy: + scodermessages: +
2007-09-21 20:21:42 gvanrossum set status: open -> closedresolution: acceptedmessages: +
2007-09-21 20:20:22 nas set nosy: + nasmessages: +
2007-09-21 16:45:54 gvanrossum set nosy: + gvanrossummessages: +
2007-09-21 07:56:13 loewis set keywords: - py3k
2007-09-21 02:20:16 jafo set priority: normalkeywords: + py3k, patch
2007-09-20 22:51:45 amaury.forgeotdarc create