[Bug 1974182] Re: Autopkgtest fails when HTTP proxy is used

Olivier Gayot 1974182 at bugs.launchpad.net
Thu May 19 16:47:46 UTC 2022


Opened two PR upstream:

* https://github.com/psf/requests/pull/6137 to override the HTTP proxy variables when running the test suite.
* https://github.com/psf/requests/pull/6136 to make timeout failures more obvious. I encountered the issue while debugging the issue with HTTP proxy. Tests were failing because of a timeout but the output would only show:

E           urllib3.exceptions.NewConnectionError:
<urllib3.connection.HTTPConnection object at 0x7fc3a3e30a90>: Failed to
establish a new connection: [Errno 111] Connection refused

/usr/lib/python3/dist-packages/urllib3/connection.py:181:
NewConnectionError

-- 
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/1974182

Title:
  Autopkgtest fails when HTTP proxy is used

Status in requests package in Ubuntu:
  Confirmed
Status in requests package in Debian:
  Unknown

Bug description:
  The following tests fail because either of the following environment variables is set:
  * http_proxy
  * https_proxy
  * no_proxy

  The requests package supports these variables and the tests override
  their to test the behavior. However, the test suite does not expect
  these variables to already be set.

  FAILED tests/test_requests.py::TestRequests::test_errors[http://doesnotexist.google.com-ConnectionError]
  FAILED tests/test_requests.py::TestRequests::test_respect_proxy_env_on_send_self_prepared_request
  FAILED tests/test_requests.py::TestRequests::test_respect_proxy_env_on_send_session_prepared_request
  FAILED tests/test_requests.py::TestRequests::test_respect_proxy_env_on_send_with_redirects
  FAILED tests/test_requests.py::TestRequests::test_respect_proxy_env_on_get - ...
  FAILED tests/test_requests.py::TestRequests::test_respect_proxy_env_on_request

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




More information about the foundations-bugs mailing list