jseutter/ofxparse — pull request #52 by jaraco (2013-06-30 17:59:45+00:00)
Title: Python version fixes and test support

I've been consuming ofxparse for my own personal financial management for a short while now, and very much appreciate it. Recently, I've switched to Python 3, and I'd like to continue to use ofxparse. Despite the work to support Python 3, I found it still had syntactical changes in the tests that prevented the tests from running.

So I set down the road of updating the tests and the whole package to run on Python 3.3. I decided to go the route of supporting a unified code base, since that technique seems to be the most robust and with the fewest gotchas (not to mention it's an easier transition to deprecating support for Python 2 when the time comes).

I also found that much of the code didn't work on Python 2.4-2.6, so I also restored support for Python 2.5+. I decided to drop support for Python 2.4.

I've updated the Travis runner to invoke the tests using setup.py test, which allows the dependencies to be resolved as advertised in the setup.py. The tests are now all running and passing on Python 2.5-3.3 (as github should report with this pull request).

One major change to the public interface (and a fairly necessary one) is that the OFX parser now accepts only 'byte' streams as input. This requirement is now clearly stated in the docstring and reflected in tests. If there are use cases that continue to require construction of OfxFiles from text streams (i.e. already decoded unicode text OFX), then I suggest that two constructors be supplied (one which expects a byte stream and another which expects a text stream).

Please review and send your feedback. A lot of work went into this patch, so I'd like to do whatever you deem necessary to get this pull request accepted.