CHANGELOG: Update with summaries of recent changes

This documents the following changes:
* f01eac2 (email: Make path to sendmail configurable, 2013-02-15)
* 1c97270 (email: Attempt .as_string() if BytesGenerator.flatten()
  fails, 2013-02-16)
* e08e198 (email: Decode headers when checking .as_string() flatten
  fallback, 2013-02-17)
* 3adef87 (config: Use extended interpolation in Config, 2013-02-21)

Signed-off-by: W. Trevor King <wking@tremily.us>
Bump to version 3.2

Signed-off-by: W. Trevor King <wking@tremily.us>
error: Fix inheritance typos for HTTPError (ProcessingError -> FeedError)

Avoid:

     Traceback (most recent call last):
       ...
       File ".../rss2email/feed.py", line 338, in _check_for_errors
         raise _error.HTTPError(status=status, feed=self)
       File ".../rss2email/error.py", line 166, in __init__
         super(FeedError, self).__init__(feed=feed, message=message)
     TypeError: __init__() got an unexpected keyword argument 'feed'

HTTPErrors occur when we're fetching a feed, so we don't have the
parsed feed instance required by ProcessingErrors.  We should use the
more general FeedError instead, and use the HTTPError class name in
the super() call.

Both of changes come from sloppy copy-paste errors while stubbing out
lots of similar error classes during the huge 066602ef (rss2email:
split massive package into modules, 2012-11-13).

Reported-by: Matěj Cepl <mcepl@redhat.com>
Signed-off-by: W. Trevor King <wking@tremily.us>
feed: Drop Google Reader rel-via manipulation

Google Reader will be retired on 2013-07-01, so we should be able to
drop the special rel-via handling it got starting with eb04d97 (Bump
to version 2.67, 2010-09-21).

[1]: http://googlereader.blogspot.com/2013/03/powering-down-google-reader.html

Signed-off-by: W. Trevor King <wking@tremily.us>
feed: Streamline rel-via title extraction in _process_entry_content()

No functional change here, this just tightens up the Python code for
clarity.

Signed-off-by: W. Trevor King <wking@tremily.us>
email: Remove explicit ehlo() call

It won't work before we've connected to the server:

  Traceback (most recent call last):
    ...
    File ".\rss2email\email.py", line 145, in smtp_send
      smtp.ehlo()
    ...
  smtplib.SMTPServerDisconnected: please run connect() first

That makes sense ;).  If we want to call ehlo(), we should certainly
do it after the .connect() call succeeds.  Looking at the docs [1], I
don't think we need to call it at all:

  Unless you wish to use has_extn() before sending mail, it should not
  be necessary to call this method explicitly. It will be implicitly
  called by sendmail() when necessary.

We don't use has_extn(), and the EHLO should happen implicitly in
starttls [2]:

  If there has been no previous EHLO or HELO command this session,
  this method tries ESMTP EHLO first.

and send_message [3]:

  This is a convenience method for calling sendmail()...

via sendmail [4]:

  If there has been no previous EHLO or HELO command this session,
  this method tries ESMTP EHLO first.

[1]: http://docs.python.org/3/library/smtplib.html#smtplib.SMTP.ehlo
[2]: http://docs.python.org/3/library/smtplib.html#smtplib.SMTP.starttls
[3]: http://docs.python.org/3/library/smtplib.html#smtplib.SMTP.send_message
[4]: http://docs.python.org/3/library/smtplib.html#smtplib.SMTP.sendmail

Reported-by: Matt Bordignon <matthew@bordignons.net>
Signed-off-by: W. Trevor King <wking@tremily.us>
email: Change stray SMTP_SERVER to server

This fixes the error below that occurred upon sending a message by SMTP.

NameError: global name 'SMTP_SERVER' is not defined.

Signed-off-by: George Saunders <georgesaunders@gmail.com>
Merge remote-tracking branch 'alienacorn/master'

* alienacorn/master:
  email: Change stray SMTP_SERVER to server

Signed-off-by: W. Trevor King <wking@tremily.us>
error: Fix super calls for SMTPAuthenticationError, etc.

Fix copy/paste errors where super() calls used the wrong class name
(it should match the class in which the method is defined) for:

* SMTPAuthenticationError.__init__
* ProcessingError.__init__
* OPMLReadError.__init__

Reported-by: Matt Bordignon <matthew@bordignons.net>
Signed-off-by: W. Trevor King <wking@tremily.us>
feed: Catch parsing errors during html2text

This avoids crashing with:

  Traceback (most recent call last):
    ...
    File ".../rss2email/feed.py", line 732, in _process_entry_content
      lines = [_html2text.html2text(content['value'])]
    ...
    File "/usr/lib/python3.2/html/parser.py", line 149, in error
      raise HTMLParseError(message, self.getpos())
  html.parser.HTMLParseError: EOF in middle of construct, at line 1, column 262

The troublesome feed was:

  $ wget -S http://www.cell.com/rssFeed/biophysj/rss.NewIssueAndArticles.xml
  --2013-03-20 05:22:08--  http://www.cell.com/rssFeed/biophysj/rss.NewIssueAndArticles.xml
  Resolving www.cell.com... 145.36.42.28
  Connecting to www.cell.com|145.36.42.28|:80... connected.
  HTTP request sent, awaiting response...
    HTTP/1.1 200 OK
    Date: Wed, 20 Mar 2013 09:23:19 GMT
    Server: IBM_HTTP_Server
    Last-Modified: Tue, 19 Mar 2013 22:00:04 GMT
    Accept-Ranges: bytes
    Content-Length: 15362
    Vary: Accept-Encoding
    Keep-Alive: timeout=10, max=100
    Connection: Keep-Alive
    Content-Type: text/xml
  Length: 15362 (15K) [text/xml]
  Saving to: ‘rss.NewIssueAndArticles.xml’

  100%[======================================>] 15,362      94.1KB/s   in 0.2s

  2013-03-20 05:22:08 (94.1 KB/s) - ‘rss.NewIssueAndArticles.xml’ saved [15362/15362]

which contained the poorly split summary:

  <item>
    <title>Synergistic Insertion of Antimicrobial Magainin-Family Peptides in Membranes Depends on the Lipid Spontaneous Curvature</title>
    <link>http://www.cell.com/biophysj/abstract/S0006-3495(13)00153-7</link>
    <description>Erik Strandberg, Jonathan Zerweck, Parvesh Wadhwani, Anne S. Ulrich. PGLa and magainin 2 (MAG2) are amphiphilic antimicrobial peptides from frog skin with known synergistic activity. The orientation of the two helices in membranes was studied using solid-state &lt;sup....</description>
    <pubDate>Tue, 19 Mar 2013 00:00:00 GMT</pubDate>
    <guid>http://www.cell.com/biophysj/abstract/S0006-3495(13)00153-7</guid>
    <dc:date>2013-03-19T00:00:00Z</dc:date>
  </item>

The '<sup....' in the description broke the parser.

Signed-off-by: W. Trevor King <wking@tremily.us>
error: Fix ProcessingError message and logging

We can't check if message is None if message wasn't an argument to
__init__().  Also:

* import sys for sys.version
* explicitly format strings passed to _LOG.warning(), otherwise you'll
  get the following:

    >>> LOG.warning('abc', 'def')
    Traceback (most recent call last):
      ...
    TypeError: not all arguments converted during string formatting

Signed-off-by: W. Trevor King <wking@tremily.us>
feed: Add herror to _SOCKET_ERRORS and remove reason handing

We don't log the reason, so trying to extract it just gives room for
errors to creep in.  Luckily, we'll be able to drop the whole
_SOCKET_ERRORS thing when we move to Python >= 3.3, because following
PEP 3151 the socket errors became subclasses of OSError.

Reported-by: Matt Bordignon <matthew@bordignons.net>
Signed-off-by: W. Trevor King <wking@tremily.us>