FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

python-gitlab actually requires requests>=2.4.2 · Issue #441 · python-gitlab/python-gitlab · GitHub

Repository navigation

python-gitlab actually requires requests>=2.4.2 #441

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 "/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:

psf/requests@8f17741

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.

Activity

  1. locked as resolved and limited conversation to collaborators on Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL