Author anadelonbrin
Recipients
Date 2005-01-30.23:22:44
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
The Python 2.4 Lib/bsddb/__init__.py contains this:

"""
# for backwards compatibility with python versions
older than 2.3, the
# iterator interface is dynamically defined and added
using a mixin
# class.  old python can't tokenize it due to the yield
keyword.
if sys.version >= '2.3':
    exec """
import UserDict
from weakref import ref
class _iter_mixin(UserDict.DictMixin):
...
"""

Because the imports are inside an exec, modulefinder
(e.g. when using bsddb with a py2exe built application)
does not realise that the imports are required.  (The
requirement can be manually specified, of course, if
you know that you need to do so).

There are two options for easy fixes for this:

  1. Move the imports outside the exec.  This wouldn't
effect the code at all, but would let modulefinder know
that they were there.

  2.  If 2.1 compatibility isn't required for the bsddb
module in Python 2.5, then the if and exec portion
could be completely removed.

Patches against today's anon CVS for each of these
options are attached.
History
Date User Action Args
2007-08-23 15:41:31adminlinkissue1112812 messages
2007-08-23 15:41:31admincreate