bzr: ERROR: exceptions.RuntimeError: maximum recursion depth exceeded in cmp

John Arbash Meinel john at arbash-meinel.com
Thu Oct 26 15:39:29 BST 2006


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

Bob Tanner wrote:
> bzr 0.13.0dev0 on python 2.4.3.final.0 (cygwin)
> 
> Output to stdout/stderr attached: bzr-error.txt.bz2
> My bzr.log.bz2 attached
> 
> I bzip'd them because they are over 100k, let me know if that appropriate for 
> this list or if I should attach the raw files.
> 

This was reported as this bug:
https://launchpad.net/products/bzr/+bug/6373

This is a bug in python's difflib library. At one point we had patched
our SequenceMatcher to change __helper to not be recursive (instead it
keeps a stack).

At some point, I guess someone patch Ubuntu's difflib to fix this same
bug, so we changed how we did it. (They got rid of __helper, so we had
to attach at a different point).

*I* thought this was a change to stock python 2.4.3, but I just looked
at cygwin and FC5, which both report python 2.4.3, and both of them are
using __helper.

Now, we have discussed changing from using KnitSequenceMatcher (which is
a small optimization around difflib.SequenceMatcher), to using
PatienceSequenceMatcher, which uses a different algorithm for computing
the difference between 2 texts. (It uses more of a longest-common-subset
rather than longest-common-string, and a patience sort to find that).

Maybe someone can shed light as to why Ubuntu has a patched difflib, but
upstream python doesn't.

Maybe python 2.4.4 has the fix for this bug, and Ubuntu back-ported it.

Regardless, *I* would like to see us switch to using
PatienceSequenceMatcher, because I think it gives better diffs. (It is
what we use when you type 'bzr diff'). The fact that it would fix bugs
like this is just a side benefit.

This is also related to this bug:
https://launchpad.net/products/bzr/+bug/65714

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFQMigJdeBCYSNAAMRAl0uAKCe4ohk1bY7kT1drXXUx884C3uBCgCfSngq
A4q6zDrVJmm6zQN9n20htME=
=Qkj8
-----END PGP SIGNATURE-----




More information about the bazaar mailing list