Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Python 3.10 support #10164

Merged
merged 5 commits into from
Aug 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ jobs:
- 3.7
- 3.8
- 3.9
- "3.10.0-alpha - 3.10"

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -137,6 +138,7 @@ jobs:
# - 3.7
# - 3.8
- 3.9
- "3.10.0-alpha - 3.10"
group: [1, 2]

steps:
Expand Down
2 changes: 1 addition & 1 deletion docs/html/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ distro community, cloud provider support channels, etc).
The current version of pip works on:

- Windows, Linux and MacOS.
- CPython 3.6, 3.7, 3.8, 3.9 and latest PyPy3.
- CPython 3.6, 3.7, 3.8, 3.9, 3.10 and latest PyPy3.

pip is tested to work on the latest patch version of the Python interpreter,
for each of the minor versions listed above. Previous patch versions are
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def should_update_common_wheels() -> bool:
# completely to nox for all our automation. Contributors should prefer using
# `tox -e ...` until this note is removed.
# -----------------------------------------------------------------------------
@nox.session(python=["3.6", "3.7", "3.8", "3.9", "pypy3"])
@nox.session(python=["3.6", "3.7", "3.8", "3.9", "3.10", "pypy3"])
def test(session: nox.Session) -> None:
# Get the common wheels.
if should_update_common_wheels():
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def get_version(rel_path: str) -> str:
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
],
Expand Down
5 changes: 5 additions & 0 deletions tests/functional/test_warning.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
import textwrap

import pytest
Expand Down Expand Up @@ -44,6 +45,10 @@ def test_flag_does_nothing_if_python_version_is_not_2(script):
script.pip("list", "--no-python-version-warning")


@pytest.mark.skipif(
sys.version_info >= (3, 10),
reason="distutils is deprecated in 3.10+"
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test was only added because the CPython test suite failed when packaging raised a deprecation warning (for legacy versions, IIRC). As ensurepip now forcibly silences deprecation warnings as part of the distutils removal, we could probably just drop this (after all, I don't think we should guarantee that pip runs warning-free as a general matter).

But it's no big deal either way.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gonna remove in a follow up. :)

def test_pip_works_with_warnings_as_errors(script):
script.environ['PYTHONWARNINGS'] = 'error'
script.pip("--version")
2 changes: 1 addition & 1 deletion tests/lib/test_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def test_correct_pip_version(script):
# distribution
pip_folder_outputed = re.match(
r"pip \d+(\.[\d]+)+(\.?(b|rc|dev|pre|post)\d+)? from (.*) "
r"\(python \d(.[\d])+\)$",
r"\(python \d+(\.[\d]+)+\)$",
result.stdout,
).group(4)
pip_folder = join(SRC_DIR, "src", "pip")
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
minversion = 3.4.0
envlist =
docs, packaging, lint, vendoring,
py36, py37, py38, py39, pypy3
py36, py37, py38, py39, py310, pypy3

[helpers]
# Wrapper for calls to pip that make sure the version being used is the
Expand Down