cobralibre/tumblr-api — pull request #2 by curlee (2013-01-12 15:49:10+00:00)
Title: Moved httplib2 import into _fetch

Fixed a bug which was preventing tumblrapi from installing cleanly.

Bug:
When attempting to install tumblrapi from a requirements file (for example when deploying to a heroku server which installs from a requirements.txt file) installation fails with "ImportError: No module named httplib2"

Cause of bug:
setup.py imports __version__ from tumblr.py, tumblr.py imports httplib2 globally. If server does not have httplib2 installed prior to tumblrapi, an import error exception occurs.

Solution:
Moved httplib2 import inside of _fetch as this is the only place it is being used.

A better fix could be implemented, but this was the lowest impact quickest way to fix the bug.