From 3c69231d7781ef703c79da35cd86c7650b800dd7 2020-11-05 00:05:45 From: Branko Majic Date: 2020-11-05 00:05:45 Subject: [PATCH] GC-39: Added support for Python 3.9: - Updated release notes - Updated functional test for changes in help output in Python 3.9. - Updated comments on public signing keys used for validating the Python archives when using Vagrant provisioning. - Updated supported Python versions in package configuration file. - Updated Python versions used for tests. --- diff --git a/README.rst b/README.rst index 3eccf70515e86b17f6a909dbc947c17e1a9ea88f..1d4a53ee5560d9fbcfba40c6b07c850416f8b55b 100644 --- a/README.rst +++ b/README.rst @@ -33,6 +33,7 @@ Python versions: - *Python 3.6* - *Python 3.7* - *Python 3.8* +- *Python 3.8* Why was this tool created? diff --git a/docs/releasenotes.rst b/docs/releasenotes.rst index 75f6d34835cfdf3595eaa387275d740142a13ce0..2924e75c22201ef76e48b6e25646f574191243c6 100644 --- a/docs/releasenotes.rst +++ b/docs/releasenotes.rst @@ -5,10 +5,14 @@ Release notes NEXT RELEASE ------------ +This release adds support for Python 3.9, and updates the package +requirements. + Resolved issues: - **Tasks**: + - `GC-39: Support for Python 3.9 `_ - `GC-40: Update all requirements `_ diff --git a/functional_tests/test_server.py b/functional_tests/test_server.py index 8e95f4bb5eaccdb92b20871c618e8fca9d1c1a4e..3ae96122b5e631a1d83c94fa3588d022289b3cd1 100644 --- a/functional_tests/test_server.py +++ b/functional_tests/test_server.py @@ -18,6 +18,7 @@ # Gimmecert. If not, see . # +import sys from .base import run_command @@ -42,7 +43,12 @@ def test_server_command_available_with_help(): assert exit_code == 0 assert stderr == "" assert stdout.startswith("usage: gimmecert server") - assert " entity_name [dns_name [dns_name ...]]" in stdout + # Help output for nargs="*" got changed in Python 3.9. See + # https://bugs.python.org/issue38438 for details. + if sys.version_info.major == 3 and sys.version_info.minor < 9: + assert " entity_name [dns_name [dns_name ...]]" in stdout + else: + assert " entity_name [dns_name ...]" in stdout def test_server_command_requires_initialised_hierarchy(tmpdir): diff --git a/provision.sh b/provision.sh index 3125a68990b7636439aad05381eca187b88d84c8..4b66c3ba2fba682eb942ac7fb6513dc751592598 100755 --- a/provision.sh +++ b/provision.sh @@ -27,7 +27,7 @@ apt-get install -qq -y make build-essential libssl1.0-dev zlib1g-dev libbz2-dev sudo -i -u vagrant gpg -q --import /vagrant/provision/python_releases_signing_keys.pub # Download and build additional Python versions. -python_versions=("3.5.9" "3.6.10" "3.7.7" "3.8.2") +python_versions=("3.5.10" "3.6.12" "3.7.9" "3.8.6" "3.9.0") work_directory="/home/vagrant/src" echo "Setting-up work directory." diff --git a/provision/python_releases_signing_keys.pub b/provision/python_releases_signing_keys.pub index 78e4d19aeffc5ea6af648e095595a6cdbaaf28c3..cff7d4db6a19e871be52016874f10593ee6d7d7b 100644 --- a/provision/python_releases_signing_keys.pub +++ b/provision/python_releases_signing_keys.pub @@ -1,3 +1,4 @@ +# Python 3.5, 3.6, and 3.7 archive signing key -----BEGIN PGP PUBLIC KEY BLOCK----- mQENBE0yGHgBCAClbIKFESe6Ae/wJv4c50K2C5BnyAVIbNObvl/maM7X0sTpi9cv @@ -7714,7 +7715,7 @@ MnpJ5Se/0KVUMawISF8Rl806c6gPMkbEN8RKgDDuKH3W8iFPIcewrzenYcsMws+m =erwG -----END PGP PUBLIC KEY BLOCK----- -# Python 3.8 archive signing key +# Python 3.8 and 3.9 archive signing key -----BEGIN PGP PUBLIC KEY BLOCK----- mQINBFVRJ0kBEACko4KHmTBm01lcf4IsN4QxglIuf51lYqHs9B5nQbO6OSUivPXP diff --git a/setup.py b/setup.py index f21ca86121578fb227603bae9f4e2fe9ae0f0169..ab2fc6bde952b7ed51bfae1d44dc19075dd67b35 100755 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ from setuptools import setup, find_packages README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() -python_requirements = ">=3.5,<3.9" +python_requirements = ">=3.5,<3.10" install_requirements = [ 'cryptography>=3.2,<3.3', @@ -97,6 +97,7 @@ setup( 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Site Management', 'Topic :: Security', diff --git a/tox.ini b/tox.ini index 9077838a320efa1d0dff82c1a7d61afbf1094cc4..94cb7805f2ea0750eef10aac3f24c83434d2817f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = {py35,py36,py37,py38},lint,doc +envlist = {py35,py36,py37,py38,py39},lint,doc [testenv] whitelist_externals = @@ -12,6 +12,7 @@ basepython = py36: python3.6 py37: python3.7 py38: python3.8 + py39: python3.9 deps = .[test]