Skip to content

Commit cfe5bc0

Browse files
dnicolodirgommers
authored andcommitted
MAIN: bump the minimum required Python version from 3.8 to 3.9
1 parent 661312e commit cfe5bc0

File tree

5 files changed

+8
-21
lines changed

5 files changed

+8
-21
lines changed

.cirrus.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ manylinux-python3.13t_task:
5555
PATH: "/opt/python/cp313-cp313t/bin/:${PATH}"
5656
<< : *test
5757

58-
manylinux-python3.8_task:
58+
manylinux-python3.9_task:
5959
container:
6060
dockerfile: ci/manylinux.docker
6161
cpu: 1
6262
env:
63-
PATH: "/opt/python/cp38-cp38/bin/:${PATH}"
63+
PATH: "/opt/python/cp39-cp39/bin/:${PATH}"
6464
<< : *test
6565

6666
miniconda_task:

.github/workflows/tests.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ jobs:
5050
- macos-13
5151
- windows-latest
5252
python:
53-
- '3.8'
5453
- '3.13'
54+
- '3.9'
5555
meson:
5656
-
5757
dependencies:
@@ -61,10 +61,6 @@ jobs:
6161
python: 'pypy-3.9'
6262
- os: ubuntu-latest
6363
python: 'pypy-3.11'
64-
- os: ubuntu-latest
65-
python: '3.8'
66-
- os: ubuntu-latest
67-
python: '3.9'
6864
- os: ubuntu-latest
6965
python: '3.10'
7066
# Test with older supported Meson version. Meson up to

mesonpy/__init__.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
import typing
3737
import warnings
3838

39+
from functools import cached_property
40+
3941

4042
if sys.version_info < (3, 11):
4143
import tomli as tomllib
@@ -46,13 +48,12 @@
4648
import packaging.version
4749
import pyproject_metadata
4850

49-
import mesonpy._compat
5051
import mesonpy._rpath
5152
import mesonpy._tags
5253
import mesonpy._util
5354
import mesonpy._wheelfile
5455

55-
from mesonpy._compat import cached_property, read_binary
56+
from mesonpy._compat import read_binary
5657

5758

5859
try:
@@ -578,9 +579,7 @@ def _string_or_path(value: Any, name: str) -> str:
578579
'meson': _string_or_path,
579580
'limited-api': _bool,
580581
'allow-windows-internal-shared-libs': _bool,
581-
'args': _table({
582-
name: _strings for name in _MESON_ARGS_KEYS
583-
}),
582+
'args': _table(dict.fromkeys(_MESON_ARGS_KEYS, _strings)),
584583
})
585584

586585
table = pyproject.get('tool', {}).get('meson-python', {})

mesonpy/_compat.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
from __future__ import annotations
88

9-
import functools
109
import importlib.resources
1110
import os
1211
import sys
@@ -19,12 +18,6 @@
1918
from typing import Collection, Iterable, Iterator, Mapping, Sequence
2019

2120

22-
if sys.version_info >= (3, 8):
23-
from functools import cached_property
24-
else:
25-
cached_property = lambda x: property(functools.lru_cache(maxsize=None)(x)) # noqa: E731
26-
27-
2821
if sys.version_info >= (3, 9):
2922
def read_binary(package: str, resource: str) -> bytes:
3023
return importlib.resources.files(package).joinpath(resource).read_bytes()
@@ -49,7 +42,6 @@ def read_binary(package: str, resource: str) -> bytes:
4942

5043

5144
__all__ = [
52-
'cached_property',
5345
'read_binary',
5446
'Collection',
5547
'Iterable',

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ name = 'meson-python'
1919
version = '0.19.0.dev0'
2020
description = 'Meson Python build backend (PEP 517)'
2121
readme = 'README.rst'
22-
requires-python = '>= 3.8'
22+
requires-python = '>= 3.9'
2323
license = 'MIT'
2424
license-files = ['LICENSES/MIT.txt']
2525
keywords = ['meson', 'build', 'backend', 'pep517', 'package']

0 commit comments

Comments
 (0)