Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting Environment Proxy (HTTP_PROXY etc.) breaks Some Tests #5554

Closed
scirelli opened this issue Mar 22, 2021 · 4 comments
Closed

Setting Environment Proxy (HTTP_PROXY etc.) breaks Some Tests #5554

scirelli opened this issue Mar 22, 2021 · 4 comments
Assignees
Labels

Comments

@scirelli
Copy link
Contributor

🐞 Describe the bug

Tests break when proxy environment variables (HTTP_PROXY, HTTPS_PROXY, etc.) are set.

💡 To Reproduce

export http_proxy='http://www.example.com,http://proxy.com'
make test

💡 Expected behavior

Tests should pass.

📋 Logs/tracebacks

FAILED tests/test_helpers.py::test_proxies_from_env[https] - AssertionError: assert dict_keys(['http', 'https']) == {'https'}
FAILED tests/test_helpers.py::test_proxies_from_env[ws] - AssertionError: assert dict_keys(['http', 'ws']) == {'ws'}
FAILED tests/test_helpers.py::test_proxies_from_env[wss] - AssertionError: assert dict_keys(['http', 'wss']) == {'wss'}
FAILED tests/test_helpers.py::test_proxies_from_env_skipped[https] - AssertionError: assert {'http': ProxyInfo(proxy=URL('http://www.example.com,http//proxy.com'), proxy_auth=None)} == {}
FAILED tests/test_helpers.py::test_proxies_from_env_skipped[wss] - AssertionError: assert {'http': ProxyInfo(proxy=URL('http://www.example.com,http//proxy.com'), proxy_auth=None)} == {}

📋 Your version of the Python

$ python --version
Python 3.8.7

📋 Your version of the aiohttp/yarl/multidict distributions

$ python -m pip show aiohttp
Name: aiohttp
Version: 4.0.0a1
Summary: Async http client/server framework (asyncio)
Home-page: https://github.com/aio-libs/aiohttp
Author: Nikolay Kim
Author-email: [email protected]
License: Apache 2
Location: /Users/cirelli/Projects/aiohttp
Requires: chardet, multidict, async-timeout, yarl, typing-extensions, frozenlist, aiosignal
Required-by: 
$ python -m pip show multidict
Name: multidict
Version: 5.1.0
Summary: multidict implementation
Home-page: https://github.com/aio-libs/multidict
Author: Andrew Svetlov
Author-email: [email protected]
License: Apache 2
Location: /Users/cirelli/Projects/aiohttp/.venv/lib/python3.8/site-packages
Requires: 
Required-by: yarl, aiohttp
$ python -m pip show yarl
Name: yarl
Version: 1.6.3
Summary: Yet another URL library
Home-page: https://github.com/aio-libs/yarl/
Author: Andrew Svetlov
Author-email: [email protected]
License: Apache 2
Location: /Users/cirelli/Projects/aiohttp/.venv/lib/python3.8/site-packages
Requires: idna, multidict
Required-by: aiohttp

📋 Additional context

Mac OS

@scirelli scirelli added the bug label Mar 22, 2021
@webknjaz
Copy link
Member

That's unfortunate... Mind submitting a PR?

@scirelli
Copy link
Contributor Author

Sure, I mentioned it in my last PR that I'd create a new one to fix it. I figured it required a new PR.

@webknjaz
Copy link
Member

Ah, I somehow missed that.. Thanks!

@webknjaz
Copy link
Member

Implemented by #5557 and #6184.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants