Closed
Description
This code:
gl = gitlab.Gitlab(
url=get_server_url(),
private_token=get_private_token()
)
gl.auth()
...works with a recent version of requests, resulting in the client being authenticated. When requests<=2.4.2
is installed, it results in a stacktrace ending in (this particular trace came from an environment with requests==1.2.3
):
...
gl.auth()
File "/usr/local/lib/python2.7/site-packages/gitlab/__init__.py", line 211, in auth
self._token_auth()
File "/usr/local/lib/python2.7/site-packages/gitlab/__init__.py", line 233, in _token_auth
self.user = self._objects.CurrentUserManager(self).get()
File "/usr/local/lib/python2.7/site-packages/gitlab/exceptions.py", line 251, in wrapped_f
return f(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/gitlab/mixins.py", line 67, in get
server_data = self.gitlab.http_get(self.path, **kwargs)
File "
5401
/usr/local/lib/python2.7/site-packages/gitlab/__init__.py", line 728, in http_get
streamed=streamed, **kwargs)
File "/usr/local/lib/python2.7/site-packages/gitlab/__init__.py", line 684, in http_request
files=files, **opts)
TypeError: __init__() got an unexpected keyword argument 'json'
The json
argument was added in version 2.4.2:
I don't know that it makes sense to lock requests to a release from 2014, but it appears that the current lock of requests>=1.0
is insufficient.
Metadata
Metadata
Assignees
Labels
No labels