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: Implemented PyType_FromSpecWithBases
Type: enhancement Stage: resolved
Components: Interpreter Core Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Robin.Schreiber, loewis, ncoghlan, pitrou, python-dev
Priority: normal Keywords: patch

Created on 2012-06-22 22:34 by Robin.Schreiber, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
PyType_FromSpecWithBases.patch Robin.Schreiber, 2012-06-22 22:34
Messages (6)
msg163502 - (view) Author: Robin Schreiber (Robin.Schreiber) * (Python triager) Date: 2012-06-22 22:34
Enhancement to the currently existing PyType_FromSpec() which creates and returns a heap type from a given spec. PyType_FromSpecWithBases() works similar to PyType_FromSpec(), however it sets the bases of the newly created heap type to the types contained inside the passed bases-tuple.
This allows the programmer to reference other heap-types as base types of  a new heap type. This is necessary as the slot-API, which is used for static declarations of the type-spec, currently relies on statically declared type objects as tp_base or tp_bases entries.
msg163678 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-06-23 21:21
New changeset bb6df3781edb by Martin v. Löwis in branch 'default':
Issue #15146: Add PyType_FromSpecWithBases. Patch by Robin Schreiber.
http://hg.python.org/cpython/rev/bb6df3781edb
msg163679 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2012-06-23 21:23
Thanks for the patch. Committed with slight modifications: if the spec contained a tp_base/tp_bases pointer, that needed to be considered.
msg163682 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-06-23 21:47
There was a crash here:
http://www.python.org/dev/buildbot/all/builders/x86%20OpenIndiana%203.x/builds/4014/steps/test/logs/stdio
msg163687 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2012-06-23 22:16
I have no clue what might have caused this. My guess is that there is a refcounting bug *somewhere*.
msg163690 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-06-23 22:59
Ok, 33737210c906 seems to have fixed it.
History
Date User Action Args
2022-04-11 14:57:31adminsetgithub: 59351
2012-06-23 22:59:16pitrousetmessages: + msg163690
stage: resolved
2012-06-23 22:16:21loewissetmessages: + msg163687
2012-06-23 21:47:53pitrousetnosy: + pitrou
messages: + msg163682
2012-06-23 21:23:08loewissetstatus: open -> closed
resolution: fixed
messages: + msg163679
2012-06-23 21:21:55python-devsetnosy: + python-dev
messages: + msg163678
2012-06-23 09:00:48ncoghlansetnosy: + ncoghlan
2012-06-22 22:35:17Robin.Schreibersetnosy: + loewis
2012-06-22 22:34:40Robin.Schreibercreate