kraiz/hamster-bridge — pull request #7 by dArignac (2013-06-29 13:11:06+00:00)
Title: Fixed dependency problem with oauthlib

jira-python requires oauthlib, when installing hamster-bridge with global python packages into a virtualenv having oauthlib 0.3.7 installed, the following error occurs:

(hamster-bridge-dev)alex@loreley:~/projects/darignac-hamster-bridge$ hamster-bridge redmine
Traceback (most recent call last):
File "/home/alex/virtualenvs/hamster-bridge-dev/bin/hamster-bridge", line 8, in
load_entry_point('hamster-bridge==0.3.1', 'console_scripts', 'hamster-bridge')()
File "/home/alex/projects/darignac-hamster-bridge/hamster_bridge/__init__.py", line 28, in main
(lc.short_name, lc) for lc in [import_listener(l) for l in LISTENERS]
File "/home/alex/projects/darignac-hamster-bridge/hamster_bridge/__init__.py", line 13, in import_listener
mod = __import__(name.rsplit('.', 1)[0])
File "/home/alex/projects/darignac-hamster-bridge/hamster_bridge/listeners/jira.py", line 4, in
from jira.client import JIRA
File "/home/alex/virtualenvs/hamster-bridge-dev/local/lib/python2.7/site-packages/jira/client.py", line 12, in
from requests_oauthlib import OAuth1
File "/home/alex/virtualenvs/hamster-bridge-dev/local/lib/python2.7/site-packages/requests_oauthlib/__init__.py", line 3, in
from .oauth2_auth import OAuth2
File "/home/alex/virtualenvs/hamster-bridge-dev/local/lib/python2.7/site- packages/requests_oauthlib/oauth2_auth.py", line 2, in
from oauthlib.oauth2 import WebApplicationClient, InsecureTransportError
ImportError: cannot import name WebApplicationClient

The 0.3.7 seems to be the default oatuhlib version at least in my Ubuntu 13 global packages. Any future package of oauthlib does not trigger the issue, so I set oauthlib>0.3.7 as a install requirement.