Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/certbot/certbot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Warren <bmw@users.noreply.github.com>2021-01-25 23:59:14 +0300
committerGitHub <noreply@github.com>2021-01-25 23:59:14 +0300
commit00235d3807f298c3cee700ed946a2fc6c3bf8145 (patch)
treed7b2f7eace4aede55550587d2717797cb434a91d /tox.ini
parentadb7e5e62f4c96be678c5af3e55a82ddcc717590 (diff)
Switch oldest tests to Python 3 (#8590)
Fixes https://github.com/certbot/certbot/issues/8580. With this PR, it should now be possible to run the oldest tests natively on Linux, at least when using an older version of Python 3, which hasn't been possible in a long time. Unfortunately, this isn't possible on macOS which I opened https://github.com/certbot/certbot/issues/8589 to track. You can see the full test suite running with these changes at https://dev.azure.com/certbot/certbot/_build/results?buildId=3283&view=results. I took the version numbers for the packages I updated by searching for the oldest version of the dependency I think we should try and support based on the updated comments at the top of `oldest_constraints.txt`. While kind of annoying, I think it'd be a good idea for the reviewer to double check that I didn't make a mistake with the versions I used here. To find these versions, I used https://packages.ubuntu.com, https://packages.debian.org, and a CentOS 7 Docker image with EPEL 7 installed. For the latter, not all packages are available in Python 3 yet (which is something Certbot's EPEL package maintainers are working on) and in that case I didn't worry about the system because I think they can/will package the newest version available. If they end up hitting any issues here when trying to package Certbot on Python 3, we can always work with them to fix it. * remove py27 from oldest name * update min cryptography version * remove run_oldest_tests.sh * upgrade setuptools and pyopenssl * update cffi, pyparsing, and idna * expand oldest_constraints comments * clarify oldest comment * update min configobj version * update min parsedatetime version * quote tox env name * use Python 3.6 in the oldest tests * use Python 3.6 for oldest integration tests * properly pin asn1crypto * update min six version * set basepython for a nicer error message * remove outdated python 2 oldest constraints
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini50
1 files changed, 35 insertions, 15 deletions
diff --git a/tox.ini b/tox.ini
index 212d4ee76..94cd305aa 100644
--- a/tox.ini
+++ b/tox.ini
@@ -77,49 +77,65 @@ setenv =
PYTEST_ADDOPTS = {env:PYTEST_ADDOPTS:--numprocesses auto}
PYTHONHASHSEED = 0
-[testenv:py27-oldest]
+[testenv:oldest]
+# Setting basepython allows the tests to fail fast if that version of Python
+# isn't available instead of potentially trying to use a newer version of
+# Python which is unlikely to work.
+basepython = python3.6
commands =
{[testenv]commands}
setenv =
{[testenv]setenv}
CERTBOT_OLDEST=1
-[testenv:py27-acme-oldest]
+[testenv:acme-oldest]
+basepython =
+ {[testenv:oldest]basepython}
commands =
{[base]install_and_test} acme[dev]
setenv =
- {[testenv:py27-oldest]setenv}
+ {[testenv:oldest]setenv}
-[testenv:py27-apache-oldest]
+[testenv:apache-oldest]
+basepython =
+ {[testenv:oldest]basepython}
commands =
{[base]install_and_test} certbot-apache
setenv =
- {[testenv:py27-oldest]setenv}
+ {[testenv:oldest]setenv}
-[testenv:py27-apache-v2-oldest]
+[testenv:apache-v2-oldest]
+basepython =
+ {[testenv:oldest]basepython}
commands =
{[base]install_and_test} certbot-apache[dev]
setenv =
- {[testenv:py27-oldest]setenv}
+ {[testenv:oldest]setenv}
-[testenv:py27-certbot-oldest]
+[testenv:certbot-oldest]
+basepython =
+ {[testenv:oldest]basepython}
commands =
{[base]install_and_test} certbot[dev]
setenv =
- {[testenv:py27-oldest]setenv}
+ {[testenv:oldest]setenv}
-[testenv:py27-dns-oldest]
+[testenv:dns-oldest]
+basepython =
+ {[testenv:oldest]basepython}
commands =
{[base]install_and_test} {[base]dns_packages}
setenv =
- {[testenv:py27-oldest]setenv}
+ {[testenv:oldest]setenv}
-[testenv:py27-nginx-oldest]
+[testenv:nginx-oldest]
+basepython =
+ {[testenv:oldest]basepython}
commands =
{[base]install_and_test} certbot-nginx
python tests/lock_test.py
setenv =
- {[testenv:py27-oldest]setenv}
+ {[testenv:oldest]setenv}
[testenv:lint]
basepython = python3
@@ -238,22 +254,26 @@ commands =
passenv = DOCKER_*
[testenv:integration-certbot-oldest]
+basepython =
+ {[testenv:oldest]basepython}
commands =
{[base]pip_install} certbot
{[base]pip_install} certbot-ci
pytest certbot-ci/certbot_integration_tests/certbot_tests \
--acme-server={env:ACME_SERVER:pebble}
passenv = DOCKER_*
-setenv = {[testenv:py27-oldest]setenv}
+setenv = {[testenv:oldest]setenv}
[testenv:integration-nginx-oldest]
+basepython =
+ {[testenv:oldest]basepython}
commands =
{[base]pip_install} certbot-nginx
{[base]pip_install} certbot-ci
pytest certbot-ci/certbot_integration_tests/nginx_tests \
--acme-server={env:ACME_SERVER:pebble}
passenv = DOCKER_*
-setenv = {[testenv:py27-oldest]setenv}
+setenv = {[testenv:oldest]setenv}
[testenv:test-farm-tests-base]
changedir = tests/letstest