diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 512e54ba6..a5b66730a 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -39,9 +39,6 @@ jobs: - { os: macos-latest, py: "brew@3.11" } - { os: macos-latest, py: "brew@3.10" } - { os: macos-latest, py: "brew@3.9" } - - { os: macos-latest, py: "brew@3.8" } - - { os: ubuntu-latest, py: "3.7" } - - { os: macos-13, py: "3.7" } exclude: - { os: windows-latest, py: "pypy-3.10" } - { os: windows-latest, py: "pypy-3.9" } diff --git a/docs/changelog/2783.bugfix.rst b/docs/changelog/2783.bugfix.rst index 9d8d8f6bc..53b2715e2 100644 --- a/docs/changelog/2783.bugfix.rst +++ b/docs/changelog/2783.bugfix.rst @@ -1,3 +1,6 @@ Upgrade embedded wheels: * setuptools to ``75.2.0`` from ``75.1.0`` +* Removed pip of ``24.0`` +* Removed setuptools of ``68.0.0`` +* Removed wheel of ``0.42.0`` diff --git a/docs/installation.rst b/docs/installation.rst index a25c3fef6..c48db8f07 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -97,6 +97,7 @@ request on our issue tracker. Note: +- as of ``20.27.0`` -- ``2024-10-17`` -- we no longer support running under Python ``<=3.7``, - as of ``20.18.0`` -- ``2023-02-06`` -- we no longer support running under Python ``<=3.6``, - as of ``20.22.0`` -- ``2023-04-19`` -- we no longer support creating environments for Python ``<=3.6``. @@ -120,4 +121,4 @@ In case of macOS we support: Windows ~~~~~~~ - Installations from `python.org `_ -- Windows Store Python - note only `version 3.7+ `_ +- Windows Store Python - note only `version 3.8+ `_ diff --git a/pyproject.toml b/pyproject.toml index 2010a1c93..2bd8c62ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ license = "MIT" maintainers = [ { name = "Bernat Gabor", email = "gaborjbernat@gmail.com" }, ] -requires-python = ">=3.7" +requires-python = ">=3.8" classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", @@ -27,7 +27,6 @@ classifiers = [ "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "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", @@ -106,7 +105,6 @@ build.targets.sdist.include = [ version.source = "vcs" [tool.ruff] -target-version = "py37" line-length = 120 format.preview = true format.docstring-code-line-length = 100 diff --git a/src/virtualenv/run/plugin/base.py b/src/virtualenv/run/plugin/base.py index f0682ddf0..97c4792ec 100644 --- a/src/virtualenv/run/plugin/base.py +++ b/src/virtualenv/run/plugin/base.py @@ -2,15 +2,9 @@ import sys from collections import OrderedDict +from importlib.metadata import entry_points -if sys.version_info >= (3, 8): - from importlib.metadata import entry_points - - importlib_metadata_version = () -else: - from importlib_metadata import entry_points, version - - importlib_metadata_version = tuple(int(i) for i in version("importlib_metadata").split(".")[:2]) +importlib_metadata_version = () class PluginLoader: diff --git a/src/virtualenv/seed/wheels/embed/__init__.py b/src/virtualenv/seed/wheels/embed/__init__.py index 04c595ac2..ce8690e91 100644 --- a/src/virtualenv/seed/wheels/embed/__init__.py +++ b/src/virtualenv/seed/wheels/embed/__init__.py @@ -6,11 +6,6 @@ BUNDLE_FOLDER = Path(__file__).absolute().parent BUNDLE_SUPPORT = { - "3.7": { - "pip": "pip-24.0-py3-none-any.whl", - "setuptools": "setuptools-68.0.0-py3-none-any.whl", - "wheel": "wheel-0.42.0-py3-none-any.whl", - }, "3.8": { "pip": "pip-24.2-py3-none-any.whl", "setuptools": "setuptools-75.2.0-py3-none-any.whl", @@ -47,7 +42,7 @@ "wheel": "wheel-0.44.0-py3-none-any.whl", }, } -MAX = "3.7" +MAX = "3.8" def get_embed_wheel(distribution, for_py_version): diff --git a/src/virtualenv/seed/wheels/embed/pip-24.0-py3-none-any.whl b/src/virtualenv/seed/wheels/embed/pip-24.0-py3-none-any.whl deleted file mode 100644 index 2e6aa9d2c..000000000 Binary files a/src/virtualenv/seed/wheels/embed/pip-24.0-py3-none-any.whl and /dev/null differ diff --git a/src/virtualenv/seed/wheels/embed/setuptools-68.0.0-py3-none-any.whl b/src/virtualenv/seed/wheels/embed/setuptools-68.0.0-py3-none-any.whl deleted file mode 100644 index 81f15459b..000000000 Binary files a/src/virtualenv/seed/wheels/embed/setuptools-68.0.0-py3-none-any.whl and /dev/null differ diff --git a/src/virtualenv/seed/wheels/embed/wheel-0.42.0-py3-none-any.whl b/src/virtualenv/seed/wheels/embed/wheel-0.42.0-py3-none-any.whl deleted file mode 100644 index 8044b1982..000000000 Binary files a/src/virtualenv/seed/wheels/embed/wheel-0.42.0-py3-none-any.whl and /dev/null differ diff --git a/tasks/__main__zipapp.py b/tasks/__main__zipapp.py index 4c76721bd..eb1032999 100644 --- a/tasks/__main__zipapp.py +++ b/tasks/__main__zipapp.py @@ -133,10 +133,7 @@ def iterator(self, resource_name): def versioned_distribution_class(): global _VER_DISTRIBUTION_CLASS # noqa: PLW0603 if _VER_DISTRIBUTION_CLASS is None: - if sys.version_info >= (3, 8): - from importlib.metadata import Distribution # noqa: PLC0415 - else: - from importlib_metadata import Distribution # noqa: PLC0415 + from importlib.metadata import Distribution # noqa: PLC0415 class VersionedDistribution(Distribution): def __init__(self, file_loader, dist_path) -> None: diff --git a/tasks/upgrade_wheels.py b/tasks/upgrade_wheels.py index 3c82f2b52..8b4a1b508 100644 --- a/tasks/upgrade_wheels.py +++ b/tasks/upgrade_wheels.py @@ -15,7 +15,7 @@ STRICT = "UPGRADE_ADVISORY" not in os.environ BUNDLED = ["pip", "setuptools", "wheel"] -SUPPORT = [(3, i) for i in range(7, 15)] +SUPPORT = [(3, i) for i in range(8, 15)] DEST = Path(__file__).resolve().parents[1] / "src" / "virtualenv" / "seed" / "wheels" / "embed" diff --git a/tests/unit/seed/embed/test_pip_invoke.py b/tests/unit/seed/embed/test_pip_invoke.py index 7b38d7cc9..d8c243e57 100644 --- a/tests/unit/seed/embed/test_pip_invoke.py +++ b/tests/unit/seed/embed/test_pip_invoke.py @@ -25,7 +25,7 @@ def test_base_bootstrap_via_pip_invoke(tmp_path, coverage_env, mocker, current_f def _load_embed_wheel(app_data, distribution, for_py_version, version): # noqa: ARG001 return load_embed_wheel(app_data, distribution, old_ver, version) - old_ver = "3.7" + old_ver = "3.8" old = BUNDLE_SUPPORT[old_ver] mocker.patch("virtualenv.seed.wheels.bundle.load_embed_wheel", side_effect=_load_embed_wheel) diff --git a/tox.ini b/tox.ini index 50b2ab150..591ecd9f1 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,6 @@ env_list = 3.10 3.9 3.8 - 3.7 coverage readme docs