From aa5e9405c927e9a3a2455b0deab2282f007e342b Mon Sep 17 00:00:00 2001 From: chrysle Date: Wed, 15 Nov 2023 15:57:39 +0100 Subject: [PATCH] Drop Python 3.7 (#1005) --- .github/workflows/create_tests_package_lists.yml | 2 +- .github/workflows/exhaustive_package_test.yml | 2 +- .github/workflows/tests.yml | 2 +- CHANGELOG.md | 1 + noxfile.py | 2 +- pyproject.toml | 4 +--- src/pipx/__init__.py | 4 ++-- tests/test_package_specifier.py | 4 ++-- 8 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/create_tests_package_lists.yml b/.github/workflows/create_tests_package_lists.yml index 83c09244e6..27a9b52014 100644 --- a/.github/workflows/create_tests_package_lists.yml +++ b/.github/workflows/create_tests_package_lists.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/exhaustive_package_test.yml b/.github/workflows/exhaustive_package_test.yml index 4de52da3a9..09885bb089 100644 --- a/.github/workflows/exhaustive_package_test.yml +++ b/.github/workflows/exhaustive_package_test.yml @@ -10,7 +10,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d522dfb49b..26fc033d08 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -55,7 +55,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11"] include: - os: windows-latest python-version: "3.11" diff --git a/CHANGELOG.md b/CHANGELOG.md index 53827878e8..1288033a40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## dev +- Drop support for Python 3.7 - Make usage message in `pipx run` show `package_or_url`, so extra will be printed out as well - Add `--force-reinstall` to pip arguments when `--force` was passed - Use the py launcher, if available, to select Python version with the `--python` option diff --git a/noxfile.py b/noxfile.py index 55f94e5efb..b94bf658bf 100644 --- a/noxfile.py +++ b/noxfile.py @@ -4,7 +4,7 @@ import nox # type: ignore -PYTHON_ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11"] +PYTHON_ALL_VERSIONS = ["3.8", "3.9", "3.10", "3.11"] PYTHON_DEFAULT_VERSION = "3.11" DOC_DEPENDENCIES = [".", "jinja2", "mkdocs", "mkdocs-material"] MAN_DEPENDENCIES = [".", "argparse-manpage[setuptools]"] diff --git a/pyproject.toml b/pyproject.toml index 599c6d926f..582fd38abc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "pipx" description = "Install and Run Python Applications in Isolated Environments" readme = "README.md" license = "MIT" -requires-python = ">=3.7" +requires-python = ">=3.8" keywords = ["pip", "install", "cli", "workflow", "Virtual Environment"] authors = [{ name = "Chad Smith", email = "chadsmith.software@gmail.com" }] classifiers = [ @@ -15,7 +15,6 @@ classifiers = [ "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", @@ -24,7 +23,6 @@ classifiers = [ dependencies = [ "argcomplete>=1.9.4", "colorama>=0.4.4; sys_platform == 'win32'", - "importlib-metadata>=3.3.0; python_version < '3.8'", "packaging>=20.0", "platformdirs>=2.1.0", "userpath>=1.6.0,!=1.9.0", diff --git a/src/pipx/__init__.py b/src/pipx/__init__.py index ec98d9cf2c..c4155c40ab 100644 --- a/src/pipx/__init__.py +++ b/src/pipx/__init__.py @@ -1,8 +1,8 @@ import sys -if sys.version_info < (3, 6, 0): +if sys.version_info < (3, 8, 0): sys.exit( - "Python 3.6 or later is required. " + "Python 3.8 or later is required. " "See https://github.com/pypa/pipx " "for installation instructions." ) diff --git a/tests/test_package_specifier.py b/tests/test_package_specifier.py index 458ff7c5da..6351d207c9 100644 --- a/tests/test_package_specifier.py +++ b/tests/test_package_specifier.py @@ -96,7 +96,7 @@ def test_fix_package_name(package_spec_in, package_name, package_spec_out): True, ), ( - 'my-project[cli] @ git+ssh://git@bitbucket.org/my-company/myproject.git ; python_version<"3.7"', + 'my-project[cli] @ git+ssh://git@bitbucket.org/my-company/myproject.git ; python_version<"3.8"', "my-project[cli]@ git+ssh://git@bitbucket.org/my-company/myproject.git", True, ), @@ -165,7 +165,7 @@ def test_parse_specifier_for_metadata( True, ), ( - 'my-project[cli] @ git+ssh://git@bitbucket.org/my-company/myproject.git ; python_version<"3.7"', + 'my-project[cli] @ git+ssh://git@bitbucket.org/my-company/myproject.git ; python_version<"3.8"', "my-project[cli]@ git+ssh://git@bitbucket.org/my-company/myproject.git", True, ),