Skip to content

Commit

Permalink
Fix python requirement to include full 3.9 series. (#1142)
Browse files Browse the repository at this point in the history
Also bump the 3.9 we test with in CI to 3.9.1.

Fixes #1141
  • Loading branch information
jsirois authored Dec 15, 2020
1 parent aa2dd37 commit 618cfa4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions tests/test_dist_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
2 changes: 1 addition & 1 deletion tests/test_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])

Expand Down

0 comments on commit 618cfa4

Please sign in to comment.