From d243b90780ef464c3b8f6d7801c96f9d5bc1df8e Mon Sep 17 00:00:00 2001 From: AP Ljungquist Date: Sun, 20 Aug 2023 17:48:23 +0200 Subject: [PATCH 1/2] Remove py37 from tox.ini ... so that running `tox` locally at least has a chance of succeeding. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 295e58798..473826776 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] envlist = # NOTE: keep this in sync with the env list in .github/workflows/ci.yml. - py{37,38,39,310,311,312,py3}-pip{previous,latest,main}-coverage + py{38,39,310,311,312,py3}-pip{previous,latest,main}-coverage pip{previous,latest,main}-coverage pip{previous,latest,main} checkqa From edc0b0d2da47e5efff8477e0311d9689aefe43e5 Mon Sep 17 00:00:00 2001 From: AP Ljungquist Date: Sun, 20 Aug 2023 17:40:49 +0200 Subject: [PATCH 2/2] Increase minimum pip version to 23 ... so that we can pip's vendored pyproject_hooks. --- pyproject.toml | 2 +- tests/test_utils.py | 5 +++++ tox.ini | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8ee07b2d0..b6d245070 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ dependencies = [ # direct dependencies "build", "click >= 8", - "pip >= 22.2", + "pip >= 23", "tomli; python_version < '3.11'", # indirect dependencies "setuptools", # typically needed when pip-tools invokes setup.py diff --git a/tests/test_utils.py b/tests/test_utils.py index 7d31af92f..dd20e34ff 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -36,6 +36,11 @@ ) +def test_can_import_pyproject_hooks(): + # TODO: Remove this test when there is code using this package + from pip._vendor import pyproject_hooks # noqa: F401 + + def test_format_requirement(from_line): ireq = from_line("test==1.2") assert format_requirement(ireq) == "test==1.2" diff --git a/tox.ini b/tox.ini index 473826776..581ae2b56 100644 --- a/tox.ini +++ b/tox.ini @@ -14,7 +14,7 @@ extras = testing coverage: coverage deps = - pipprevious: pip==22.2.* + pipprevious: pip==23.0.* piplatest: pip pipmain: https://github.com/pypa/pip/archive/main.zip setenv =