[MERGE][bzr-email] Implement mail sending using smtplib
Marius Gedminas
marius at pov.lt
Fri Jan 26 16:33:48 GMT 2007
On Fri, Jan 26, 2007 at 09:27:25AM -0600, John Arbash Meinel wrote:
> Marius Gedminas wrote:
> >> + # We want a cStringIO because we want an 8-bit string
> >
> > StringIO.StringIO can handle both 8-bit strings and Unicode strings.
> > (It cannot handle mixed content, though). Perhaps rephrase the comment
> > to
> >
> > # We can use cStringIO because we have an 8-bit string
> >
> > ?
> >
> > Or is there some type-based dispatching in bzrlib that chooses Unicode
> > versus 8-bit from the file object?
>
> No, just that 'diff' should be writing 8-bit only, because it is writing
> out the contents of files. So "We can" is more accurate. Also, I want it
> to actually fail if it tries to directly write a Unicode string.
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."
> >> +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.
> >> === 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
--
Professionalism has no place in art, and hacking is art. Software Engineering
might be science; but that's not what I do. I'm a hacker, not an engineer.
-- jwz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070126/8a81ce18/attachment-0001.pgp
More information about the bazaar
mailing list