Allow instances of SFTPFile to be used in with statements by turning it into a context manager.
Turn SFTPFile into a context manager
Verify Python version >= 2.6 before running context manager test
Hmm, but as the build failure points out, just checking for Python version in the tests isn't sufficient since it's a syntax in 2.5 without:
from __future__ import with_statement
And presumably it'll just always fail in Python 2.4. Should it be possible to run the tests successfully on Python 2.4? The actual code should still work fine since it's just adding two methods that'll never get called.
Replace useless version check with import from __future__
If the tests need to pass on Python 2.4, then one possibility is to have a separate module for testing this feature, and conditionally import that module in test.py.
At this point I'm not supporting Paramiko on anything older than 2.5, so no worries about that.
Thanks for the submission, will take a look soon hopefully. Also, noting for linkage that this is related to #38.
LGTM. Thanks again!
Changelog + docs re #127