From 618cfa4002fdf8488d835884a6e1ecc847ca8e7e Mon Sep 17 00:00:00 2001 From: John Sirois Date: Tue, 15 Dec 2020 10:52:56 -0800 Subject: [PATCH] Fix python requirement to include full 3.9 series. (#1142) Also bump the 3.9 we test with in CI to 3.9.1. Fixes #1141 --- .travis.yml | 3 ++- pyproject.toml | 2 +- tests/test_dist_metadata.py | 8 ++++---- tests/test_integration.py | 2 +- tests/test_resolver.py | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index f0887e735..2cc480f39 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,11 +47,12 @@ x-pyenv-install: &x-pyenv-install | rm -rf ${PYENV_ROOT} git clone https://github.com/pyenv/pyenv "${PYENV_ROOT}"; fi + GIT_DIR="${PYENV_ROOT}/.git" git pull --ff-only "${PYENV}" install --keep --skip-existing ${PYENV_VERSION} "${PYENV}" global ${PYENV_VERSION} x-pyenv-39-env: &x-pyenv-39-env > - PYENV_VERSION=3.9.0 + PYENV_VERSION=3.9.1 x-linux-3-shard: &x-linux-39-shard <<: *x-linux-shard diff --git a/pyproject.toml b/pyproject.toml index 3a303fe45..529d637cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ classifiers = [ "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", ] -requires-python = ">=2.7,<=3.9,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*" +requires-python = ">=2.7,<3.10,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*" [tool.flit.metadata.requires-extra] # For improved subprocess robustness under python2.7. diff --git a/tests/test_dist_metadata.py b/tests/test_dist_metadata.py index d19508d2c..4bcda883a 100644 --- a/tests/test_dist_metadata.py +++ b/tests/test_dist_metadata.py @@ -55,10 +55,10 @@ def resolved_distribution(requirement): def test_requires_python(): # type: () -> None - with resolved_distribution("pex==2.1.21") as dist: - assert SpecifierSet( - ">=2.7,<=3.9,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*" - ) == requires_python(dist) + with resolved_distribution("pip==20.3.1") as dist: + assert SpecifierSet(">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*") == requires_python( + dist + ) def test_requires_python_none(): diff --git a/tests/test_integration.py b/tests/test_integration.py index c635be63d..debdbf246 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -2434,7 +2434,7 @@ def test_resolve_arbitrary_equality_issues_940(): with temporary_dir() as tmpdir, built_wheel( name="foo", version="1.0.2-fba4511", - python_requires=">=2.7,<=3.9,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", + python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", ) as whl: pex_file = os.path.join(tmpdir, "pex") results = run_pex_command(args=["-o", pex_file, whl]) diff --git a/tests/test_resolver.py b/tests/test_resolver.py index c85166faa..67679af3d 100644 --- a/tests/test_resolver.py +++ b/tests/test_resolver.py @@ -514,7 +514,7 @@ def test_resolve_arbitrary_equality_issues_940(): dist = create_sdist( name="foo", version="1.0.2-fba4511", - python_requires=">=2.7,<=3.9,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", + python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", ) resolved_distributions = local_resolve_multi(requirements=[dist])