Issue 15146: Implemented PyType_FromSpecWithBases - Python tracker (original) (raw)

Issue15146

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.

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

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:31 admin set github: 59351
2012-06-23 22:59:16 pitrou set messages: + stage: resolved
2012-06-23 22:16:21 loewis set messages: +
2012-06-23 21:47:53 pitrou set nosy: + pitroumessages: +
2012-06-23 21:23:08 loewis set status: open -> closedresolution: fixedmessages: +
2012-06-23 21:21:55 python-dev set nosy: + python-devmessages: +
2012-06-23 09:00:48 ncoghlan set nosy: + ncoghlan
2012-06-22 22:35:17 Robin.Schreiber set nosy: + loewis
2012-06-22 22:34:40 Robin.Schreiber create