Message179931
Here's a second path I've done for the current/default branch, using a separate print function for output, as recommended by Berker Peksag. I tried to add it as a separate patch set using the code review tool but every time I did, I just got a screen full of debug output from Django so I'm going to attach it here instead.
The for loop on args inside _print_debug probably isn't ideal, but I've done this to try and make sure that debuglevel 1 output is identical to what it was before my patches. Because args is passed into _print_debug as a tuple, I found that when doing "print(message, args, file=stderr)" it introduced the extra parentheses and quotes inherent with a tuple into the output. By concatenating string representations of this tuple onto the existing string it means the original output format is duplicated exactly. There may be a speed penalty for this, but realistically it seems that a minor speed penalty would be expected when using debugging options and the output consistency trumps raw speed for debugging.
Once I've found a way of achieving the same in 2.7 (i.e. maintaining the original output format when being passed a tuple, the approach I've used for Python 3 doesn't seem to have the desired affect in 2.7) then I'll hopefully submit a patch for that as well. |
|
Date |
User |
Action |
Args |
2013-01-14 10:57:01 | gac | set | recipients:
+ gac, barry, r.david.murray |
2013-01-14 10:57:01 | gac | set | messageid: <1358161021.55.0.14673184928.issue16914@psf.upfronthosting.co.za> |
2013-01-14 10:57:01 | gac | link | issue16914 messages |
2013-01-14 10:57:00 | gac | create | |
|