Skip to content

Commit 147fa1a

Browse files
authored
Drop support for Python 3.8 (#339)
1 parent f8c83b0 commit 147fa1a

File tree

4 files changed

+13
-44
lines changed

4 files changed

+13
-44
lines changed

.github/workflows/python_tests.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ on:
88

99
jobs:
1010
Python_lint:
11-
runs-on: ubuntu-latest
12-
strategy:
13-
matrix:
14-
python-version: ["3.14"]
11+
runs-on: ubuntu-slim
1512
steps:
1613
- uses: actions/checkout@v6
1714
- name: Lint with ruff # See pyproject.toml for settings
@@ -22,17 +19,16 @@ jobs:
2219
runs-on: ${{ matrix.os }}
2320
strategy:
2421
fail-fast: false
25-
max-parallel: 5
2622
matrix:
2723
os: [macos-15-intel, macos-latest, ubuntu-latest, windows-latest]
28-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
24+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
2925
include:
3026
- os: macos-26
3127
python-version: 3.x
3228
- os: ubuntu-24.04-arm # Ubuntu on ARM
33-
python-version: "3.14"
29+
python-version: 3.x
3430
- os: windows-11-arm # Windows on ARM
35-
python-version: "3.14"
31+
python-version: 3.x
3632
steps:
3733
- uses: actions/checkout@v6
3834
- name: Set up Python ${{ matrix.python-version }}

pylib/packaging/metadata.py

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,10 @@
2121
from . import requirements, specifiers, utils, version as version_module
2222

2323
T = typing.TypeVar("T")
24-
if sys.version_info[:2] >= (3, 8): # pragma: no cover
25-
from typing import Literal, TypedDict
26-
else: # pragma: no cover
27-
if typing.TYPE_CHECKING:
28-
from typing_extensions import Literal, TypedDict
29-
else:
30-
try:
31-
from typing_extensions import Literal, TypedDict
32-
except ImportError:
33-
34-
class Literal:
35-
def __init_subclass__(*_args, **_kwargs):
36-
pass
37-
38-
class TypedDict:
39-
def __init_subclass__(*_args, **_kwargs):
40-
pass
41-
24+
from typing import Literal, TypedDict
4225

4326
try:
44-
ExceptionGroup
27+
ExceptionGroup # Added in Python 3.11+
4528
except NameError: # pragma: no cover
4629

4730
class ExceptionGroup(Exception): # noqa: N818
@@ -504,7 +487,7 @@ def __set_name__(self, _owner: "Metadata", name: str) -> None:
504487
self.raw_name = _RAW_TO_EMAIL_MAPPING[name]
505488

506489
def __get__(self, instance: "Metadata", _owner: Type["Metadata"]) -> T:
507-
# With Python 3.8, the caching can be replaced with functools.cached_property().
490+
# With Python 3.8+, the caching can be replaced with functools.cached_property().
508491
# No need to check the cache as attribute lookup will resolve into the
509492
# instance's __dict__ before __get__ is called.
510493
cache = instance.__dict__

pylib/packaging/tags.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,8 @@ def _normalize_string(string: str) -> str:
127127
def _abi3_applies(python_version: PythonVersion) -> bool:
128128
"""
129129
Determine if the Python version supports abi3.
130-
131-
PEP 384 was first implemented in Python 3.2.
132130
"""
133-
return len(python_version) > 1 and tuple(python_version) >= (3, 2)
131+
return len(python_version) > 1
134132

135133

136134
def _cpython_abis(py_version: PythonVersion, warn: bool = False) -> List[str]:
@@ -146,17 +144,7 @@ def _cpython_abis(py_version: PythonVersion, warn: bool = False) -> List[str]:
146144
has_ext = "_d.pyd" in EXTENSION_SUFFIXES
147145
if with_debug or (with_debug is None and (has_refcount or has_ext)):
148146
debug = "d"
149-
if py_version < (3, 8):
150-
with_pymalloc = _get_config_var("WITH_PYMALLOC", warn)
151-
if with_pymalloc or with_pymalloc is None:
152-
pymalloc = "m"
153-
if py_version < (3, 3):
154-
unicode_size = _get_config_var("Py_UNICODE_SIZE", warn)
155-
if unicode_size == 4 or (
156-
unicode_size is None and sys.maxunicode == 0x10FFFF
157-
):
158-
ucs4 = "u"
159-
elif debug:
147+
if debug:
160148
# Debug builds can also load "normal" extension modules.
161149
# We can also assume no UCS-4 or pymalloc requirement.
162150
abis.append(f"cp{version}")

pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ authors = [
1111
description = "A fork of the GYP build system for use in the Node.js projects"
1212
readme = "README.md"
1313
license = { file="LICENSE" }
14-
requires-python = ">=3.8"
14+
requires-python = ">=3.9"
1515
dependencies = ["packaging>=24.0", "setuptools>=69.5.1"]
1616
classifiers = [
1717
"Development Status :: 3 - Alpha",
@@ -21,10 +21,12 @@ classifiers = [
2121
"Natural Language :: English",
2222
"Programming Language :: Python",
2323
"Programming Language :: Python :: 3",
24-
"Programming Language :: Python :: 3.8",
2524
"Programming Language :: Python :: 3.9",
2625
"Programming Language :: Python :: 3.10",
2726
"Programming Language :: Python :: 3.11",
27+
"Programming Language :: Python :: 3.12",
28+
"Programming Language :: Python :: 3.13",
29+
"Programming Language :: Python :: 3.14",
2830
]
2931

3032
[project.optional-dependencies]

0 commit comments

Comments
 (0)