The Wayback Machine - https://web.archive.org/web/20220206071242/https://github.com/psf/requests/pull/6035
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

Adding missing dependancies for testing #6035

Merged
merged 2 commits into from Jan 6, 2022
Merged

Conversation

@marwanpro
Copy link
Contributor

@marwanpro marwanpro commented Jan 6, 2022

Pygments is mandatory for the Flask server. If Pygments is missing PyTest will not run :

=== ERRORS ===
___ ERROR collecting docs/_themes/flask_theme_support.py ___
docs\_themes\flask_theme_support.py:2: in <module>
    from pygments.style import Style
E   ModuleNotFoundError: No module named 'pygments'
=== short test summary info ===
ERROR docs/_themes/flask_theme_support.py - ModuleNotFoundError: No module named 'pygments'

PySocks is mandatory for test_lowlevel.py, if PySocks is missing 8 tests could fail:

FAILED tests/test_lowlevel.py::test_use_proxy_from_environment[http_proxy-http] - requests.exceptions.InvalidSchema: Missing dependencies for SOCKS support.
FAILED tests/test_lowlevel.py::test_use_proxy_from_environment[https_proxy-https] - requests.exceptions.InvalidSchema: Missing dependencies for SOCKS support.
FAILED tests/test_lowlevel.py::test_use_proxy_from_environment[all_proxy-http] - requests.exceptions.InvalidSchema: Missing dependencies for SOCKS support.
FAILED tests/test_lowlevel.py::test_use_proxy_from_environment[all_proxy-https] - requests.exceptions.InvalidSchema: Missing dependencies for SOCKS support.
FAILED tests/test_lowlevel.py::test_use_proxy_from_environment[HTTP_PROXY-http] - requests.exceptions.InvalidSchema: Missing dependencies for SOCKS support.
FAILED tests/test_lowlevel.py::test_use_proxy_from_environment[HTTPS_PROXY-https] - requests.exceptions.InvalidSchema: Missing dependencies for SOCKS support.
FAILED tests/test_lowlevel.py::test_use_proxy_from_environment[ALL_PROXY-http] - requests.exceptions.InvalidSchema: Missing dependencies for SOCKS support.
FAILED tests/test_lowlevel.py::test_use_proxy_from_environment[ALL_PROXY-https] - requests.exceptions.InvalidSchema: Missing dependencies for SOCKS support.
Pygments is mandatory for the Flask server
PySocks is mandatory for test_lowlevel.py
@nateprewitt
Copy link
Member

@nateprewitt nateprewitt commented Jan 6, 2022

Hi @marwanpro, these dependencies are brought into our test environment from the socks extra. Our standard testing workflow is make followed by make ci. This will install the required dependencies and run the test suite.

Rather than duplicating our dependency requirements, I'd be willing to accept a PR adding -e .[socks] to the top of the requirements file. That will allow us to collapse this statement in the Makefile to a single call.

Regarding pygments, that file should not be being used anywhere in the docs and is mostly there as a legacy artifact. Could you provide more info on what is actually producing the error?

@marwanpro
Copy link
Contributor Author

@marwanpro marwanpro commented Jan 6, 2022

Hi @nateprewitt

Regarding pygments, that file should not be being used anywhere in the docs and is mostly there as a legacy artifact. Could you provide more info on what is actually producing the error?

It's my fault, I run the command pytest without specifying tests

@marwanpro
Copy link
Contributor Author

@marwanpro marwanpro commented Jan 6, 2022

Hi @marwanpro, these dependencies are brought into our test environment from the socks extra. Our standard testing workflow is make followed by make ci. This will install the required dependencies and run the test suite.

Rather than duplicating our dependency requirements, I'd be willing to accept a PR adding -e .[socks] to the top of the requirements file. That will allow us to collapse this statement in the Makefile to a single call.

Done in 4b0fa7e

Copy link
Member

@nateprewitt nateprewitt left a comment

Thanks @marwanpro!

@nateprewitt nateprewitt merged commit 620ed4f into psf:main Jan 6, 2022
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants