[Bug 1877297] Re: python3 requests reports RequestsDependencyWarning on import

Christian Ehrhardt  1877297 at bugs.launchpad.net
Mon May 11 10:54:28 UTC 2020


Works fine on Bionic (18.04) as well for me:

root at b:~# python3
Python 3.6.9 (default, Apr 18 2020, 01:56:04) 
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests

Lets check your python3-request - 2.18.4-2ubuntu0.1 should be fine (it
is for me).

Most likely you have another python3-request  installed (e.g. through
pip or a 3rd party package) that is incompatible.

There might be nicer versions, but the following does the trick:
$ python3 -c "import sys, requests; print(sys.modules.values())" | tr ',' '\n' | grep requests

That should on a bionic system produce a list like:
 <module 'requests' from '/usr/lib/python3/dist-packages/requests/__init__.py'>
 <module 'requests.exceptions' from '/usr/lib/python3/dist-packages/requests/exceptions.py'>
 <module 'requests.__version__' from '/usr/lib/python3/dist-packages/requests/__version__.py'>
 <module 'requests.utils' from '/usr/lib/python3/dist-packages/requests/utils.py'>
 <module 'requests.certs' from '/usr/lib/python3/dist-packages/requests/certs.py'>
 <module 'requests._internal_utils' from '/usr/lib/python3/dist-packages/requests/_internal_utils.py'>
 <module 'requests.compat' from '/usr/lib/python3/dist-packages/requests/compat.py'>
 <module 'requests.cookies' from '/usr/lib/python3/dist-packages/requests/cookies.py'>
 <module 'requests.structures' from '/usr/lib/python3/dist-packages/requests/structures.py'>
 <module 'requests.packages' from '/usr/lib/python3/dist-packages/requests/packages.py'>
 <module 'requests.models' from '/usr/lib/python3/dist-packages/requests/models.py'>
 <module 'requests.hooks' from '/usr/lib/python3/dist-packages/requests/hooks.py'>
 <module 'requests.auth' from '/usr/lib/python3/dist-packages/requests/auth.py'>
 <module 'requests.status_codes' from '/usr/lib/python3/dist-packages/requests/status_codes.py'>
 <module 'requests.api' from '/usr/lib/python3/dist-packages/requests/api.py'>
 <module 'requests.sessions' from '/usr/lib/python3/dist-packages/requests/sessions.py'>
 <module 'requests.adapters' from '/usr/lib/python3/dist-packages/requests/adapters.py'>])

If your list points at different sources for the requests module you
need to remove it or otherwise sort this out.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to requests in Ubuntu.
https://bugs.launchpad.net/bugs/1877297

Title:
  python3 requests reports RequestsDependencyWarning on import

Status in requests package in Ubuntu:
  Fix Released
Status in requests source package in Bionic:
  New

Bug description:
  Importing requests in the system python3 results in an dependency
  warning,

  
  python3
  Python 3.6.9 (default, Apr 18 2020, 01:56:04) 
  [GCC 8.4.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import requests
  /usr/lib/python3/dist-packages/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.25.8) or chardet (3.0.4) doesn't match a supported version!
    RequestsDependencyWarning)
  >>>

  This impacts vim-nox when enabling the distribution supplied vim-
  youcompleteme plugin as it attempts to make use of the requests
  library during it's setup.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/requests/+bug/1877297/+subscriptions



More information about the foundations-bugs mailing list