Improved debugging for failed extension imports
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Medium
|
Unassigned |
Bug Description
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
When failing to import an extension, it can fail in ways that we don't
get a good import error exception.
Specifically, I just ran into a case where we failed to import
_chk_map_pyx.pyx because it depended on zlib1.dll. And while that dll
was in the path, the permissions were set such that it could not be
loaded as a dll (read but not execute).
Under that circumstance, the failure message was simply:
0.812 failed to load extensions: ['DLL load failed: Access is denied.']
There would be a couple possible helpers here:
1) Change the api to be:
- -def failed_
+def failed_
(or we could make name an optional second argument if we wanted
backwards compatibility).
2) Change -Derror (or add a new flag) such that if an extension fails
to load, we either raise the import exception directly, or we give a
quick traceback of the failure.
I actually found the problem because while changing the interface, I got
a clear traceback with the code that was failing to import but had not
been updated yet... :)
Both would be fine for me. I think most cases of an extension failing to
import will include the module, so having to update all the locations is
probably overkill.
John
=:->
affects bzr
status confirmed
importance medium
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkq
OZYAoJLVi3oKplt
=utpJ
-----END PGP SIGNATURE-----