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 alexandre.vassalotti
Recipients alexandre.vassalotti, gregory.p.smith, jcea
Date 2008-05-16.05:27:39
SpamBayes Score 0.0034498908
Marked as misclassified No
Message-id <1210915662.48.0.494614370174.issue2887@psf.upfronthosting.co.za>
In-reply-to
Content
The recent updates to bsddb (r63207, r63210 and r63218) needs to
forward-ported to the py3k branch.

At first glance, here is the things that needs to be done in the test suite:

  - Change the import:

      from test_all import ...

    into a relative import:

      from .test_all import ...

  - Replace code incompatible with 3.0, such as changing
    ``dict.has_key(key)`` to ``key in dict``.

  - Change str literals to bytes literals where appropriate.

  - Optional: change code like ``type([])`` or ``type(())`` to 
    respectively ``list`` and ``tuple``.

  - Change print statements into print() calls.

  - Change ``x != None`` to ``x is not None``.

In the modules:

  - Change PyInt__* to PyLong_*.
  - Update the PyTypeObject declaration:

       statichere PyTypeObject DB_Type = {
           PyObject_HEAD_INIT(NULL)
           0,                  /*ob_size*/
           "DB",               /*tp_name*/
           sizeof(DBObject),   /*tp_basicsize*/
           ...

    to:

       static PyTypeObject DB_Type = {
           PyVarObject_HEAD_INIT(NULL, 0)
           "DB",               /*tp_name*/
           sizeof(DBObject),   /*tp_basicsize*/
           ...

  - Update module init declaration:

       DL_EXPORT(void) init_bsddb(void)
       {
          ...

    to:

      PyMODINIT_FUNC init_bsddb(void)
      {
          ...

  - Remove Py_TPFLAGS_HAVE_WEAKREFS.
  - Change PyString_* calls to PyUnicode_* where appropriate.

There probably other things that I missed, but that should give you a
good start.
History
Date User Action Args
2008-05-16 05:27:43alexandre.vassalottisetspambayes_score: 0.00344989 -> 0.0034498908
recipients: + alexandre.vassalotti, gregory.p.smith, jcea
2008-05-16 05:27:42alexandre.vassalottisetspambayes_score: 0.00344989 -> 0.00344989
messageid: <1210915662.48.0.494614370174.issue2887@psf.upfronthosting.co.za>
2008-05-16 05:27:41alexandre.vassalottilinkissue2887 messages
2008-05-16 05:27:39alexandre.vassalotticreate