1

I know this has been asked and answered many times: Reenable urllib3 warnings, How to suppress warnings about lack of cert verification in a requests HTTPS call?

Even I had it working as well previously with below solution:

import requests

requests.packages.urllib3.disable_warnings()

But since I had enabled extension for pyLint in VSCode it stopped working.(I know pyLint may not have impacted it but I have started facing this only after enabling pyLint extension)

So pyLint started complaining about "packages" is not there in "requests"

I have tried another solution being discussed in above posts, which is:

import urllib3

urllib3.disable_warnings()

Which doesn't work as well.

Someone also suggested to use

requests.urllib3.disable_warnings()

instead of

requests.packages.urllib3.disable_warnings()

but in my case it seems "requests" doesn't have "urllib3" inside it.

So is there any other way to ignore these warnings.

I am having below setup:

Python - 3.10.6 requests - 2.28.1 urllib3 - 1.26.12 pyLint extension for VSCode - v2022.4.0

kwick
  • 333
  • 3
  • 9

0 Answers0