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 larry
Recipients benjamin.peterson, brian.curtin, flox, jcea, larry, lemburg, pitrou, vstinner
Date 2010-04-02.21:06:15
SpamBayes Score 2.6800324e-09
Marked as misclassified No
Message-id <1270242377.79.0.346700559997.issue7992@psf.upfronthosting.co.za>
In-reply-to
Content
The patch is a bit more involved than that.  Capsules didn't exist in 3.0, and the bsddb module published a CObject in 3.1.  So bsddb must continue to use CObject for those two releases.

Therefore the patch to the line you were addressing looks like this:

-#if (PY_VERSION_HEX < 0x03020000)
+#if (PY_VERSION_HEX < ((PY_MAJOR_VERSION < 3) ? 0x02070000 : 0x03020000))

However, Jesus's use of capsules has a bug.  The capsule API requires that the string passed in to PyCapsule_New() must "outlive" the capsule; he's passing in a stack buffer.  So my patch also fixes that.

Finally my bsddb patch adds the appropriate text to the header file where it describes how to import the _bsddb C API object (CObject vs capsule).

FWIW, I want to close this issue soon.  How about I close it after 2.7b1 has been out for a week or so--assuming there aren't any new concerns regarding the capsule backport.
History
Date User Action Args
2010-04-02 21:06:17larrysetrecipients: + larry, lemburg, jcea, pitrou, vstinner, benjamin.peterson, brian.curtin, flox
2010-04-02 21:06:17larrysetmessageid: <1270242377.79.0.346700559997.issue7992@psf.upfronthosting.co.za>
2010-04-02 21:06:16larrylinkissue7992 messages
2010-04-02 21:06:16larrycreate