Issue2997
Created on 2008-05-29 07:55 by scoder, last changed 2022-04-11 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| pynumbermethods-cleanup.patch | scoder, 2008-05-29 07:55 | Patch that removes the fields from the struct | ||
| Messages (9) | |||
|---|---|---|---|
| msg67477 - (view) | Author: Stefan Behnel (scoder) * ![]() |
Date: 2008-05-29 07:55 | |
Here is a patch that removes three unused fields from the PyNumberMethods struct in Py3. Since two fields were already removed (one even before the ones this patch removes), there is no way existing Py2 C code that uses this struct can work in Py3 without changes, so it doesn't add any problems. |
|||
| msg67593 - (view) | Author: Stefan Behnel (scoder) * ![]() |
Date: 2008-06-01 14:20 | |
This seems to have been applied in current SVN. |
|||
| msg67630 - (view) | Author: Georg Brandl (georg.brandl) * ![]() |
Date: 2008-06-02 06:05 | |
Not to me... |
|||
| msg67753 - (view) | Author: Stefan Behnel (scoder) * ![]() |
Date: 2008-06-06 07:59 | |
:) sorry, that's the problem when you don't have commit rights and leave the changes in your local copy. So this is still an open issue that should be fixed before beta1, thanks. |
|||
| msg67761 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * ![]() |
Date: 2008-06-06 11:45 | |
Let me quote a comment from GvR about the similar issue1185: """ 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. """ OTOH, it's python 3.0, and we are allowed to break things... |
|||
| msg67762 - (view) | Author: Stefan Behnel (scoder) * ![]() |
Date: 2008-06-06 11:52 | |
I would accept that if this had been done in all cases, but as I wrote in my first comment, the previously existing slot "nb_divide", which comes *before* the named ones, has already been removed, so there is no way existing Py2 code can work unchanged in Py3, even if we leave the three fields in. |
|||
| msg67903 - (view) | Author: Stefan Behnel (scoder) * ![]() |
Date: 2008-06-10 13:05 | |
The change that removed the nb_divide and nb_inplace_divide members is here: http://svn.python.org/view?rev=43285&view=rev http://svn.python.org/view/python/branches/p3yk/Include/object.h?rev=43285&view=diff&r1=43285&r2=43284 It dates back to March 2006. (changing issue type to "compile error" as that's what you currently get for Py2 code due to this change) |
|||
| msg68000 - (view) | Author: Guido van Rossum (gvanrossum) * ![]() |
Date: 2008-06-11 17:26 | |
I say let's go with the cleanup. Extensions that want to be compiled under 2.x and 3.0 will need lots of #ifdef code anyway. |
|||
| msg68014 - (view) | Author: Benjamin Peterson (benjamin.peterson) * ![]() |
Date: 2008-06-11 20:22 | |
Applied in r64149. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:35 | admin | set | github: 47247 |
| 2008-06-11 20:22:25 | benjamin.peterson | set | status: open -> closed resolution: accepted -> fixed messages: + msg68014 |
| 2008-06-11 18:19:03 | benjamin.peterson | set | assignee: benjamin.peterson nosy: + benjamin.peterson |
| 2008-06-11 17:55:41 | barry | set | resolution: accepted |
| 2008-06-11 17:26:35 | gvanrossum | set | nosy:
+ gvanrossum messages: + msg68000 |
| 2008-06-11 12:14:41 | barry | set | priority: critical -> release blocker |
| 2008-06-10 13:17:04 | georg.brandl | set | priority: critical |
| 2008-06-10 13:05:46 | scoder | set | type: compile error messages: + msg67903 |
| 2008-06-06 11:52:11 | scoder | set | messages: + msg67762 |
| 2008-06-06 11:45:18 | amaury.forgeotdarc | set | nosy:
+ amaury.forgeotdarc messages: + msg67761 |
| 2008-06-06 07:59:30 | scoder | set | messages: + msg67753 |
| 2008-06-02 06:05:09 | georg.brandl | set | status: closed -> open resolution: out of date -> (no value) messages: + msg67630 nosy: + georg.brandl |
| 2008-06-01 21:44:00 | benjamin.peterson | set | status: open -> closed resolution: out of date |
| 2008-06-01 14:20:22 | scoder | set | messages: + msg67593 |
| 2008-05-29 07:55:57 | scoder | create | |
