[MERGE] Read .kndx files in pyrex

John Arbash Meinel john at arbash-meinel.com
Fri Jun 29 16:31:08 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
> On Thu, 2007-06-28 at 20:13 -0500, John Arbash Meinel wrote:
>>
>> As near as I can tell, this is a bug in python2.5, because the
>> generated C cod
>> is identical. It is using "index_error =
>> __builtin__.get('IndexError')" and
>> then effectively doing "error = index_error(Args); raise error"
>>
>> I don't see how that is wrong, even in python2.5.
>> Anyone have any ideas? (I'm guessing this will be an issue because I
>> think the
>> PQM is using fiesty, which means the test suite will fail there.) 
> 
> PQM is using dapper; I don't have an immediate answer for this, but I've
> seen it before and fixed it in the fast stat fingerprint code I wrote in
> pyrex. HTH.
> 
> -Rob

I've been looking at your "path_info" branch, but I don't see anything
special. I did find this thread:

http://lists.copyleft.no/pipermail/pyrex/2006-June/001876.html

Which basically says that pyrex itself is doing sanity checks on what
you are raising, but it is failing for builtin errors because they have
become new-style classes.

However, that thread ends in June 2006 with "I'll add it to my list".
And looking closer, I can see that pyrex 0.9.5 indeed has a different
definition for __Pyx_Raise().

So my plan is to write the tests such that they check for "TypeError"
instead of KnitCorrupt, and set KnownFailure. I could also import Pyrex
and check Pyrex.Compiler.Version.version, except they may not have pyrex
installed if they are building and testing from a release (since we are
including the .c files).

Is this a reasonable enough workaround? It also means that we should
make sure the released files are generated from 0.9.5 and not 0.9.4.
Since that will avoid these errors.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGhSW8JdeBCYSNAAMRAsB1AJoD3/iQQu+/WZCCbuxyCnNZZkJx7gCgxau9
Qe7DSetqfyWkXOlgVyru4vI=
=6MG6
-----END PGP SIGNATURE-----



More information about the bazaar mailing list