This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Py_tp_dictoffset / Py_tp_finalize are unsettable in stable API
Type: Stage: resolved
Components: Interpreter Core Versions: Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: dino.viehland Nosy List: dino.viehland, eelizondo, eric.snow, petr.viktorin, shihai1991
Priority: normal Keywords: patch

Created on 2019-09-12 14:04 by dino.viehland, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 16076 merged eelizondo, 2019-09-13 05:16
PR 16354 merged petr.viktorin, 2019-09-24 12:58
Messages (9)
msg352167 - (view) Author: Dino Viehland (dino.viehland) * (Python committer) Date: 2019-09-12 14:04
This makes it impossible to port certain types to the stable ABI and remove statics from the interpreter.
msg352805 - (view) Author: Dino Viehland (dino.viehland) * (Python committer) Date: 2019-09-19 16:29
New changeset 3368f3c6ae4140a0883e19350e672fd09c9db616 by Dino Viehland (Eddie Elizondo) in branch 'master':
bpo-38140: Make dict and weakref offsets opaque for C heap types (#16076)
https://github.com/python/cpython/commit/3368f3c6ae4140a0883e19350e672fd09c9db616
msg353089 - (view) Author: Petr Viktorin (petr.viktorin) * (Python committer) Date: 2019-09-24 12:54
Thanks for the feature!
This still needs documentation, however.
msg353171 - (view) Author: Petr Viktorin (petr.viktorin) * (Python committer) Date: 2019-09-25 11:06
New changeset 468f8a6ee0d83e36795bbab6f20037b0e380f493 by Petr Viktorin in branch 'master':
bpo-38140: Document offsets in PyMemberDef (GH-16354)
https://github.com/python/cpython/commit/468f8a6ee0d83e36795bbab6f20037b0e380f493
msg353179 - (view) Author: Hai Shi (shihai1991) * (Python triager) Date: 2019-09-25 11:28
Got an compile error, i have not check the detail for now:

python: Objects/typeobject.c:2867: PyType_FromSpecWithBases: Assertion `memb->type == 19' failed.

i report it in bpo 38273
msg353191 - (view) Author: Petr Viktorin (petr.viktorin) * (Python committer) Date: 2019-09-25 12:53
This line in _tesctcapimodule.c:
    {"__dictoffset__", T_PYSSIZET, -sizeof(void*), READONLY},

gives a legitimate-sounding warning on a Windows buildbot:

         d:\buildarea\3.x.ware-win81-release.nondebug\build\modules\_testcapimodule.c(6409): warning C4146: unary minus operator applied to unsigned type, result still unsigned [D:\buildarea\3.x.ware-win81-release.nondebug\build\PCbuild\_testcapi.vcxproj]
msg353345 - (view) Author: Eddie Elizondo (eelizondo) * Date: 2019-09-27 06:14
Hey Petr, I'll get to document this and fix the windows warning over the weekend. I'll ping you on Github once it's ready
msg353876 - (view) Author: Eddie Elizondo (eelizondo) * Date: 2019-10-03 20:58
Woops, just realized that you already documented this, thanks! Btw, Victor already merged a fix for the windows compiler warning. This issue can be closed now
msg354195 - (view) Author: Petr Viktorin (petr.viktorin) * (Python committer) Date: 2019-10-08 12:18
Thank you all!
History
Date User Action Args
2022-04-11 14:59:20adminsetgithub: 82321
2019-10-08 12:18:12petr.viktorinsetstatus: open -> closed
resolution: fixed
messages: + msg354195

stage: patch review -> resolved
2019-10-03 20:58:15eelizondosetmessages: + msg353876
2019-09-27 06:14:25eelizondosetnosy: + eelizondo
messages: + msg353345
2019-09-25 12:53:42petr.viktorinsetmessages: + msg353191
2019-09-25 11:28:21shihai1991setnosy: + shihai1991
messages: + msg353179
2019-09-25 11:06:21petr.viktorinsetmessages: + msg353171
2019-09-24 12:58:08petr.viktorinsetstage: resolved -> patch review
pull_requests: + pull_request15934
2019-09-24 12:54:27petr.viktorinsetstatus: closed -> open
resolution: fixed -> (no value)
messages: + msg353089
2019-09-19 17:55:59dino.viehlandsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-09-19 16:29:08dino.viehlandsetmessages: + msg352805
2019-09-14 13:37:39dino.viehlandsetnosy: + petr.viktorin
2019-09-13 05:16:29eelizondosetkeywords: + patch
stage: patch review
pull_requests: + pull_request15697
2019-09-12 14:04:20dino.viehlandcreate