-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 28/09/10 18:00, Antoine Pitrou wrote: > By "fails" you mean "crashes the interpreter". > While the deprecation warning can be discussed, bsddb shouldn't crash > when PyCObject_FromVoidPtr() returns NULL, but instead bail out > cleanly (or perhaps even ignore the error and simply display a warning > that the C API won't be available).
I plan to deploy two patches for this issue. One, bsddb surviving the warning->error flag. The other, changing the deprecation warning in "CObject" to a py3k warning. While doing this, I think would be useful if bsddb could intercept the exception and provide sensible feedback without raising an exception at import time. I have checked <http://docs.python.org/c-api/exceptions.html>. "PyErr_Fetch" is a bit overkill, it seems. My idea is to convert the CObject exception in bsddb to print a warning like "CObject creation failed. The bsddb.cAPI will be not available. Reason is: XXXX". Is there a "canonical way" of doing this?. Sorry if the answer is trivial... - -- Jesus Cea Avion _/_/ _/_/_/ _/_/_/ j...@jcea.es - http://www.jcea.es/ _/_/ _/_/ _/_/ _/_/ _/_/ jabber / xmpp:j...@jabber.org _/_/ _/_/ _/_/_/_/_/ . _/_/ _/_/ _/_/ _/_/ _/_/ "Things are not so easy" _/_/ _/_/ _/_/ _/_/ _/_/ _/_/ "My name is Dump, Core Dump" _/_/_/ _/_/_/ _/_/ _/_/ "El amor es poner tu felicidad en la felicidad de otro" - Leibniz -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQCVAwUBTKeSpJlgi5GaxT1NAQIMkgP9FCFewuhLHzExwi+aMSuevb56aoFOrBSE q/XKN+9JxE59n2BwxgaJtUBrBdUraLe17SswgVgjxzReHKI+eNgC1fTwvDV+KqGa 9AMvlNGBfNCLP/TcSRzIGc9w0MsZaS8MvBKJWw+4hINclcp4a/AgxkCxc9sbm/dM ATijPsG0RPY= =qAIG -----END PGP SIGNATURE----- _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com