Skip to content

Commit 1cc641f

Browse files
committed
Drop Python 3.7 support
1 parent 4ced6c7 commit 1cc641f

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@ jobs:
1010
os: [ubuntu, macos, windows]
1111
python-version:
1212
[
13-
"3.7",
1413
"3.8",
1514
"3.9",
1615
"3.10",
1716
"3.11",
18-
"3.12-dev",
17+
"3.12",
1918
"pypy-3.8",
2019
"pypy-3.9",
2120
]

lazy_loader/__init__.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ def attach(package_name, submodules=None, submod_attrs=None):
4343
{'foo': ['someattr']}
4444
)
4545
46-
This functionality requires Python 3.7 or higher.
47-
4846
Parameters
4947
----------
5048
package_name : str
@@ -270,11 +268,7 @@ def _check_requirement(require: str) -> bool:
270268
the specified version, False otherwise.
271269
"""
272270
import packaging.requirements
273-
274-
try:
275-
import importlib.metadata as importlib_metadata
276-
except ImportError: # PY37
277-
import importlib_metadata
271+
import importlib.metadata as importlib_metadata
278272

279273
req = packaging.requirements.Requirement(require)
280274
return req.specifier.contains(

pyproject.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "lazy_loader"
7-
requires-python = ">=3.7"
7+
requires-python = ">=3.8"
88
authors = [{name = "Scientific Python Developers"}]
99
readme = "README.md"
1010
license = {file = "LICENSE.md"}
@@ -13,7 +13,6 @@ classifiers = [
1313
"Development Status :: 4 - Beta",
1414
"License :: OSI Approved :: BSD License",
1515
"Programming Language :: Python :: 3",
16-
"Programming Language :: Python :: 3.7",
1716
"Programming Language :: Python :: 3.8",
1817
"Programming Language :: Python :: 3.9",
1918
"Programming Language :: Python :: 3.10",
@@ -23,7 +22,6 @@ classifiers = [
2322
description = "Makes it easy to load subpackages and functions on demand."
2423
dependencies = [
2524
"packaging",
26-
"importlib_metadata; python_version < '3.8'",
2725
]
2826

2927
[project.optional-dependencies]
@@ -44,7 +42,7 @@ attr = 'lazy_loader.__version__'
4442

4543
[tool.ruff]
4644
line-length = 88
47-
target-version = "py37"
45+
target-version = "py38"
4846
select = [
4947
"C",
5048
"E",

0 commit comments

Comments
 (0)