[MERGE][bzr-email] Implement mail sending using smtplib
John Arbash Meinel
john at arbash-meinel.com
Fri Jan 26 17:23:31 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Marius Gedminas wrote:
...
> That's a good reason to say "We want". "And we want it to fail if
> something tries to write a Unicode string into it."
I changed it to:
# We can use a cStringIO because show_diff_trees should only write
# 8-bit strings. It is an error to write a Unicode string here.
>
>>>> +class InstrumentedSMTPConnection(SMTPConnection):
>>>> + """Instrument SMTPConnection.
>>>> +
>>>> + We don't want to actually connect or send messages, so this just
>>>> + fakes it.
>>>> + """
>>>> +
>>> What does bzr's coding style say about trailing whitespace?
>>>
>> I'm not sure what you are calling 'trailing whitespace'.
>
> The last lines I quoted above that remark has four spaces after the '+'.
> In other words, its repr is '+ \n'.
>
>> Are you saying
>> "adding a fully blank line at the end of docstrings"?
>
> No.
>
>> Which we don't do.
>> Or "adding whitespace to the end of a single line"? which we ask not to
>> do, but we are avoiding going through the rest of the codebase to clean
>> it up, as it can cause conflicts in what would otherwise be a trivial merge.
>
> Yes.
>
> Was this also a move of existing code from another place?
>
> I did not want to raise an alarm. I just thought I would point it out
> because my text editor conveniently highlights the trailing whitespace.
>
No. It was just a mistake. I have my editor set to show trailing
whitespace as well, but apparently:
let python_highlight_space_errors = 1
Doesn't show whitespace only lines. It only shows when you have trailing
whitespace at the end of a real line (and I've seen that it doesn't show
trailing whitespace in strings either.
Thanks for the catch, I'll clean it up. I'll sometimes go back with:
grep -rnI "\s+$"
Unfortunately you've now pointed out that my vim setup is incomplete.
Vim itself seems a little schizo as to whether a blank line gets
whitespace indentation or not.
>>>> === modified file README
>>>> --- README
>>>> +++ README
>>> ...
>>>> +Also, if using 'smtplib', the messages will be sent as a utf-8 text message,
>>> Some pedantic people insist that UTF-8 be spelled "UTF-8", with all the
>>> capital letters, as it is an abbreviation for UCS (or Unicode)
>>> Transformation Format.
>> I'm pretty sure we have never been pedantic about UTF-8, especially
>> since capital letters imply stress that isn't meant to be there. I can
>> change it in public documentation, though.
>
> Sometimes I wonder whether I am too pedantic, but I usually manage to
> convince myself that that's a good trait in a programmer, like paranoia
> in a sysadmin. :-)
>
> I've never perceived stress when I see an acronym/abbreviation in
> capital letters. That's an interesting point of view. (I did notice
> that you spelt "RFC" with capital letters.)
>
> Cheers!
> Marius Gedminas
That's just personal inconsistency. :)
Being precise is a good trait. Being pragmatic is another one. Sometimes
they conflict.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFujkTJdeBCYSNAAMRAgofAJ4+WOhMxNldcj74S2dv8LtaButTJgCg2foq
iGNG0lnPNh/4dLUzzOfJ4Po=
=W93k
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list