diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 9cc76709b..24169944b 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -73,6 +73,7 @@ Pierre-Luc Tessier Gagné Ronald Evers Ronny Pfannschmidt Selim Belhaouane +Sorin Sbarnea Sridhar Ratnakumar Stephen Finucane Sviatoslav Sydorenko diff --git a/docs/changelog/1437.bugfix.rst b/docs/changelog/1437.bugfix.rst new file mode 100644 index 000000000..0c12646ec --- /dev/null +++ b/docs/changelog/1437.bugfix.rst @@ -0,0 +1 @@ +Adds ``CURL_CA_BUNDLE``, ``REQUESTS_CA_BUNDLE``, ``SSL_CERT_FILE`` to the default passenv values. - by :user:`ssbarnea` diff --git a/docs/config.rst b/docs/config.rst index 5b35d50e8..8d9dbb74a 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -385,8 +385,10 @@ Complete list of settings that you can put into ``testenv*`` sections: Some variables are always passed through to ensure the basic functionality of standard library functions or tooling like pip: - * passed through on all platforms: ``PATH``, ``LANG``, ``LANGUAGE``, - ``LD_LIBRARY_PATH``, ``PIP_INDEX_URL`` + * passed through on all platforms: ``CURL_CA_BUNDLE`, ``PATH``, + ``LANG``, ``LANGUAGE``, + ``LD_LIBRARY_PATH``, ``PIP_INDEX_URL``, + ``REQUESTS_CA_BUNDLE``, ``SSL_CERT_FILE`` * Windows: ``SYSTEMDRIVE``, ``SYSTEMROOT``, ``PATHEXT``, ``TEMP``, ``TMP`` ``NUMBER_OF_PROCESSORS``, ``USERPROFILE``, ``MSYSTEM`` * Others (e.g. UNIX, macOS): ``TMPDIR`` diff --git a/src/tox/config/__init__.py b/src/tox/config/__init__.py index 76df09e6d..fe93d25ce 100644 --- a/src/tox/config/__init__.py +++ b/src/tox/config/__init__.py @@ -664,11 +664,14 @@ def passenv(testenv_config, value): value = list(itertools.chain.from_iterable([x.split(" ") for x in value])) passenv = { - "PATH", - "PIP_INDEX_URL", + "CURL_CA_BUNDLE", "LANG", "LANGUAGE", "LD_LIBRARY_PATH", + "PATH", + "PIP_INDEX_URL", + "REQUESTS_CA_BUNDLE", + "SSL_CERT_FILE", "TOX_WORK_DIR", str(REPORTER_TIMESTAMP_ON_ENV), str(PARALLEL_ENV_VAR_KEY_PUBLIC), diff --git a/tests/unit/config/test_config.py b/tests/unit/config/test_config.py index 0d31974e0..7fad51aea 100644 --- a/tests/unit/config/test_config.py +++ b/tests/unit/config/test_config.py @@ -1069,8 +1069,11 @@ def test_passenv_as_multiline_list(self, newconfig, monkeypatch, plat): assert "MSYSTEM" in envconfig.passenv else: assert "TMPDIR" in envconfig.passenv + assert "CURL_CA_BUNDLE" in envconfig.passenv assert "PATH" in envconfig.passenv assert "PIP_INDEX_URL" in envconfig.passenv + assert "REQUESTS_CA_BUNDLE" in envconfig.passenv + assert "SSL_CERT_FILE" in envconfig.passenv assert "LANG" in envconfig.passenv assert "LANGUAGE" in envconfig.passenv assert "LD_LIBRARY_PATH" in envconfig.passenv diff --git a/tox.ini b/tox.ini index fcb1418cf..af9a4ca5d 100644 --- a/tox.ini +++ b/tox.ini @@ -19,7 +19,14 @@ description = run the tests with pytest under {basepython} setenv = PIP_DISABLE_VERSION_CHECK = 1 COVERAGE_FILE = {env:COVERAGE_FILE:{toxworkdir}/.coverage.{envname}} VIRTUALENV_NO_DOWNLOAD = 1 -passenv = http_proxy https_proxy no_proxy SSL_CERT_FILE PYTEST_* +passenv = + CURL_CA_BUNDLE + http_proxy + https_proxy + no_proxy + REQUESTS_CA_BUNDLE + SSL_CERT_FILE + PYTEST_* deps = pip == 19.1.1 extras = testing commands = pytest \