Issue 1185: py3k: Completely remove nb_coerce slot
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) * ![]() |
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) * ![]() |
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) * ![]() |
Date: 2007-09-21 20:21 | |
Thanks Neil! |
|||
| msg67764 - (view) | Author: Stefan Behnel (scoder) * ![]() |
Date: 2008-06-06 12:01 | |
As noted in issue2997, 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:
+ scoder messages: + msg67764 |
| 2007-09-21 20:21:42 | gvanrossum | set | status: open -> closed resolution: accepted messages: + msg56082 |
| 2007-09-21 20:20:22 | nas | set | nosy:
+ nas messages: + msg56081 |
| 2007-09-21 16:45:54 | gvanrossum | set | nosy:
+ gvanrossum messages: + msg56076 |
| 2007-09-21 07:56:13 | loewis | set | keywords: - py3k |
| 2007-09-21 02:20:16 | jafo | set | priority: normal keywords: + py3k, patch |
| 2007-09-20 22:51:45 | amaury.forgeotdarc | create | |
