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.

classification
Title: bsddb/weakref error
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: fdrake Nosy List: fdrake, mwh, skip.montanaro
Priority: normal Keywords:

Created on 2004-07-07 11:51 by skip.montanaro, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (7)
msg21427 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2004-07-07 11:51
After a cvs up and reinstall of Python, Spambayes is giving 
me this traceback:

Traceback (most recent call last):
  File "/Users/skip/local/bin/sb_filter.py", line 257, in ?
    main()
  File "/Users/skip/local/bin/sb_filter.py", line 248, in main
    action(msg)
  File "/Users/skip/local/bin/sb_filter.py", line 192, in 
train_spam
    self.open('c')
  File "/Users/skip/local/bin/sb_filter.py", line 163, in open
    self.h = hammie.open(self.dbname, self.usedb, 
self.mode)
  File "/Users/skip/local/lib/python2.4/site-packages/
spambayes/hammie.py", line 275, in open
    return Hammie(storage.open_storage(filename, useDB, 
mode))
  File "/Users/skip/local/lib/python2.4/site-packages/
spambayes/storage.py", line 679, in open_storage
    return klass(data_source_name, mode)
  File "/Users/skip/local/lib/python2.4/site-packages/
spambayes/storage.py", line 164, in __init__
    self.load()
  File "/Users/skip/local/lib/python2.4/site-packages/
spambayes/storage.py", line 189, in load
    self.dbm = dbmstorage.open(self.db_name, self.mode)
  File "/Users/skip/local/lib/python2.4/site-packages/
spambayes/dbmstorage.py", line 65, in open
    return f(db_name, mode)
  File "/Users/skip/local/lib/python2.4/site-packages/
spambayes/dbmstorage.py", line 19, in open_dbhash
    import bsddb
  File "/Users/skip/local/lib/python2.4/bsddb/__init__.py", 
line 68, in ?
    exec """
  File "<string>", line 3, in ?
  File "/Users/skip/local/lib/python2.4/weakref.py", line 152, 
in ?
    class KeyedRef(ref):
TypeError: cannot create 'builtin_function_or_method' 
instances

I don't know what it means, but it wasn't happening before 
the cvs up.  I suspect something changed in the bsddb3 
stuff, so I'm provisionally giving it to Greg.

msg21428 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2004-07-09 14:08
Logged In: YES 
user_id=44345

Further inspection of recent python-checkins activity shows
a large change to the weakref stuff by Fred on July 2nd
(more recent than Greg's change to bsddb on June 28th), so
reassigning to him in case it's a weakref problem.
I've been so-far unable to back out the change in my
repository (subsequent changes to some of the files make
that difficult), so I can't verify the weakref changes are
the root of my problems, but they seem pretty wide-ranging,
so that's my guess.
msg21429 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2004-07-09 14:14
Logged In: YES 
user_id=6656

Are you sure your build is completely up to date?  For
whatever reason, it looks like _weakref.ref in the traceback
above is a 'builtin_function_or_method', not a 'type' which
is what Fred's checkins turned it into.
msg21430 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2004-07-09 14:31
Logged In: YES 
user_id=44345

Yes.  My sandbox has no tags.  I generally just blindly do a
"cvs up ; configure ; make install" and start using the
result as my day-to-day Python interpreter.

I just reverted Fred's changes from July 2 to the relevant
.c, .py and .h files in my sandbox and confirmed that the
traceback disappeared.

Maybe there's nothing wrong with what Fred checked in, but
that it had an unintended effect on the bsddb package, and
that's where the problem needs to be resolved.
msg21431 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2004-07-09 15:12
Logged In: YES 
user_id=3066

What version of Spambayes are you using?

Is there a Spambayes test suite I can run with a given
Python, without screwing with my own Spambayes installation?
 I don't know anything about Spambayes development.

Is this running on Mac OS X of some flavor?  (Guessing from
the weird /Users directory.)

mwh's comment is right on target; something fishy is going
on here.  It looks like you're getting the CVS version of
weakref.py, but you _weakref.so is out of date.
msg21432 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2004-07-14 11:00
Logged In: YES 
user_id=6656

Have we worked out how Skip has hosed his install yet <wink>?  
IOW, if there's no evidence of a Python bug (and IMO there isn't) 
we should close this.
msg21433 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2004-07-14 13:02
Logged In: YES 
user_id=44345

No we haven't. ;-)  The only thing I can think of is I did a
cvs up right when
the changes were going into cvs and thus missed one of the
changed files.
History
Date User Action Args
2022-04-11 14:56:05adminsetgithub: 40516
2004-07-07 11:51:12skip.montanarocreate