psf / requests

A simple, yet elegant, HTTP library.
https://requests.readthedocs.io/en/latest/
Apache License 2.0
52.19k stars 9.33k forks source link

Cannot close the proxy #6793

Open invisifire opened 2 months ago

invisifire commented 2 months ago

In windows pycharm jupyterlab when i open windows system proxy requests will use the proxy i set on windows system. but cannot close this proxy direct to the internet . I try

response = requests.post(url, headers=headers, json=data, proxies=None)
response = requests.post(url, headers=headers, json=data, proxies={})
response = requests.post(url, headers=headers, json=data, proxies="")

can't work

Expected Result

don't use proxy I set on windows

Actual Result

I can check this connection on clash

Reproduction Steps

windows requests 2.31.0 use pycharm and jupyter

import requests
response = requests.post(url, headers=headers, json=data, proxies=None)# I try None {} "" []

System Information

$ python -m requests.help
{
  "chardet": {
    "version": null
  },
  "charset_normalizer": {
    "version": "2.0.4"
  },
  "cryptography": {
    "version": "41.0.7"
  },
  "idna": {
    "version": "3.4"
  },
  "implementation": {
    "name": "CPython",
    "version": "3.11.5"
  },
  "platform": {
    "release": "10",
    "system": "Windows"
  },
  "pyOpenSSL": {
    "openssl_version": "300000c0",
    "version": "23.2.0"
  },
  "requests": {
    "version": "2.31.0"
  },
  "system_ssl": {
    "version": "300000c0"
  },
  "urllib3": {
    "version": "1.26.18"
  },
  "using_charset_normalizer": true,
  "using_pyopenssl": true
}