Skip to content

Commit

Permalink
Drop 3.7 support
Browse files Browse the repository at this point in the history
Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
  • Loading branch information
gaborbernat committed Oct 18, 2024
1 parent c70267c commit 393bdd3
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 28 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
3 changes: 3 additions & 0 deletions docs/changelog/2783.bugfix.rst
Original file line number Diff line number Diff line change
@@ -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``
3 changes: 2 additions & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``.

Expand All @@ -120,4 +121,4 @@ In case of macOS we support:
Windows
~~~~~~~
- Installations from `python.org <https://www.python.org/downloads/>`_
- Windows Store Python - note only `version 3.7+ <https://www.microsoft.com/en-us/p/python-38/9mssztt1n39l>`_
- Windows Store Python - note only `version 3.8+ <https://www.microsoft.com/en-us/p/python-38/9mssztt1n39l>`_
4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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
Expand Down
10 changes: 2 additions & 8 deletions src/virtualenv/run/plugin/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 1 addition & 6 deletions src/virtualenv/seed/wheels/embed/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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):
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
5 changes: 1 addition & 4 deletions tasks/__main__zipapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tasks/upgrade_wheels.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"


Expand Down
2 changes: 1 addition & 1 deletion tests/unit/seed/embed/test_pip_invoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ env_list =
3.10
3.9
3.8
3.7
coverage
readme
docs
Expand Down

0 comments on commit 393bdd3

Please sign in to comment.