Identify automatic str/unicode coercions

Martin von Gagern Martin.vGagern at gmx.net
Tue Jun 17 01:54:17 BST 2008


Martin Pool wrote:
> Could you post a small sample of the reports here and we'll have a look?

Sure. The attached report is the result of a simple "bzr init foo" on a 
machine called "server".

Most of these implicit conversions seem to decode fixed literals, so 
that's harmless. The most likely part here to cause real trouble would 
probably be that part about the nonce, although I guess this simple 
operation is still well away from causing any harm.

The format is grouped by source lines where the transformation actually 
occurs. For each such line, the most common backtrace leading up to it 
is given, in something that resembles a python backtrace (come to think 
of it, I could probably use a library method for formatting here). Also 
given are the (up to ten) most common values belonging to the given 
backtrace, along with the coercion direction (encode/decode). A grand 
total at the end of the file allows you to see your progress.

This is nothing final, of course, but I'd guess a useful tool 
nonetheless. Maybe some dev wants to adopt the branch, to keep the tool 
around and improve on it as need arises?

Greetings,
  Martin
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: str-unicode.log
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20080617/81ef1f3c/attachment-0001.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080617/81ef1f3c/attachment-0001.pgp 


More information about the bazaar mailing list