Kurt McKee

lessons learned in production

Hey there! This article was written in 2011.

It might not have aged well for any number of reasons, so keep that in mind when reading (or clicking outgoing links!).

Announcing feedparser 5.1

Posted 3 December 2011 in feedparser and release

I'm pleased to announce the release of feedparser 5.1! This release
includes a boatload of bug fixes, support for Python 3.2 and partial
support for Jython, extensive unit test refactoring, and a massive
documentation conversion to ReST format. You can download the release
at one of the following locations:

http://pypi.python.org/pypi/feedparser/
https://code.google.com/p/feedparser/downloads/list

After downloading the package you can run python setup.py install.
You can also run easy_install feedparser on your system and the
latest and greatest will be downloaded and installed. Best of all,
these commands will now work for Python 3 installations as well.

Unit tests

Earlier this year I began improving the unit tests. I found duplicated
tests, mislabeled tests, and tests that literally only verified that
1 == True! In addition, there were always two versions of each file:
one for the strict XML parser and another for the loose sgmllib-based
parser.

By modifying the test harness so that both parsers used the same files
I was able to almost halve the number of unit test files! As a result,
adding test cases is significantly easier and less error prone.

Documentation

Previously, feedparser's documentation was contained in a monolithic
XML file. After one or two encounters it became apparent that the
format was too daunting to maintain. Because of my familiarity with
ReST (the reStructuredText format) and Sphinx (the same engine that
generates the official Python documentation from ReST documents) I
chose to migrate to the ReST format. You can now find the official
documentation at:

http://packages.python.org/feedparser/

Please note that the documentation may be converted, but it is not
fully updated! If you find areas in which it can be improved, please
don't hesitate to report the problem at the issue tracker.

Other changes

There were lots and lots of changes to the source code since the 5.0.1
release. Most of them were bug fixes that you're going to love, but
some of them were efforts to prune untestable code and questionable
features. As an example, the Zope compatibility hack has been removed.
Additionally, "Hot RSS" support has been removed, since the format
doesn't actually exist (Mark sardonically added support when CNET
accidentally published an XML file that resembled an RSS feed -- their
file remains the only example in existence).

Of special note, Mark shuttered the feedparser.org domain a couple of
months ago. When linking to the project or the documentation, please
use the following links:

https://code.google.com/p/feedparser/
http://packages.python.org/feedparser/

As always, bug reports and patches are welcome. Happy holidays!