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.

Author loewis
Recipients loewis, petere
Date 2011-02-02.08:58:48
SpamBayes Score 1.8937185e-11
Marked as misclassified No
Message-id <1296637129.65.0.786752104807.issue11067@psf.upfronthosting.co.za>
In-reply-to
Content
The fast subtype checks cannot be supported in the limited API, as the layout of type objects is intentionally not exposed. It would be possible to expose a getter for the type flags; the individual flag values *are* part of the ABI.

I propose the attached patch, which replaces the fast subtype check with a slow one in the limited API. The patch would need to be extended to all subtype checks.

It's not strictly necessary to include this patch into the 3.2 release; users could also explicitly call PyObject_IsSubclass as a work-around. The patch could then be added for 3.2.1.

As another work-around, users can also use PyUnicode_CheckExact, which is even faster and might be correct in many cases as well.
History
Date User Action Args
2011-02-02 08:58:49loewissetrecipients: + loewis, petere
2011-02-02 08:58:49loewissetmessageid: <1296637129.65.0.786752104807.issue11067@psf.upfronthosting.co.za>
2011-02-02 08:58:48loewislinkissue11067 messages
2011-02-02 08:58:48loewiscreate