From 89dbcc7b4f07abfb77989f66b3a9b1b681a4683e Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Sun, 27 Oct 2024 21:16:26 +0100 Subject: [PATCH] MAINT: drop Python 3.7 support --- .cirrus.yml | 4 ++-- .github/workflows/tests.yml | 2 +- pyproject.toml | 2 +- tests/conftest.py | 9 +++------ 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index fddf4c380..4368d17c9 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -55,12 +55,12 @@ manylinux-python3.13t_task: PATH: "/opt/python/cp313-cp313t/bin/:${PATH}" << : *test -manylinux-python3.7_task: +manylinux-python3.8_task: container: dockerfile: ci/manylinux.docker cpu: 1 env: - PATH: "/opt/python/cp37-cp37m/bin/:${PATH}" + PATH: "/opt/python/cp38-cp38m/bin/:${PATH}" << : *test miniconda_task: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 42201ae96..a5d2ad4c6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -50,7 +50,7 @@ jobs: - macos-13 - windows-latest python: - - '3.7' + - '3.8' - '3.13' meson: - diff --git a/pyproject.toml b/pyproject.toml index 6121d8888..8c95569bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ name = 'meson-python' version = '0.18.0.dev0' description = 'Meson Python build backend (PEP 517)' readme = 'README.rst' -requires-python = '>= 3.7' +requires-python = '>= 3.8' license = { file = 'LICENSES/MIT.txt' } keywords = ['meson', 'build', 'backend', 'pep517', 'package'] maintainers = [ diff --git a/tests/conftest.py b/tests/conftest.py index 54964be9d..1280a5d32 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -3,6 +3,7 @@ # SPDX-License-Identifier: MIT import contextlib +import importlib.metadata import os import os.path import pathlib @@ -58,8 +59,8 @@ def adjust_packaging_platform_tag(platform: str) -> str: @contextlib.contextmanager def in_git_repo_context(path=os.path.curdir): - # Resist the tentation of using pathlib.Path here: it is not - # supporded by subprocess in Python 3.7. + # Resist the temptation of using pathlib.Path here: it is not + # supported by subprocess in Python 3.7. path = os.path.abspath(path) shutil.rmtree(os.path.join(path, '.git'), ignore_errors=True) try: @@ -96,10 +97,6 @@ def __init__(self, env_dir): # Free-threaded Python 3.13 requires pip 24.1b1 or later. if sysconfig.get_config_var('Py_GIL_DISABLED'): - # importlib.metadata is not available on Python 3.7 and - # earlier, however no-gil builds are available only for - # Python 3.13 and later. - import importlib.metadata if packaging.version.Version(importlib.metadata.version('pip')) < packaging.version.Version('24.1b1'): self.pip('install', '--upgrade', 'pip >= 24.1b1')