Skip to content

Commit 4823f88

Browse files
committed
Drop Python 3.7 support
1 parent 017345f commit 4823f88

File tree

3 files changed

+5
-21
lines changed

3 files changed

+5
-21
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,7 @@ jobs:
99
matrix:
1010
os: [ubuntu, macos, windows]
1111
python-version:
12-
[
13-
"3.7",
14-
"3.8",
15-
"3.9",
16-
"3.10",
17-
"3.11",
18-
"3.12-dev",
19-
"pypy-3.8",
20-
"pypy-3.9",
21-
]
12+
["3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.8", "pypy-3.9"]
2213

2314
steps:
2415
- uses: actions/checkout@v4

lazy_loader/__init__.py

Lines changed: 2 additions & 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
@@ -269,12 +267,9 @@ def _check_requirement(require: str) -> bool:
269267
True if the installed version of the dependency matches
270268
the specified version, False otherwise.
271269
"""
272-
import packaging.requirements
270+
import importlib.metadata as importlib_metadata
273271

274-
try:
275-
import importlib.metadata as importlib_metadata
276-
except ImportError: # PY37
277-
import importlib_metadata
272+
import packaging.requirements
278273

279274
req = packaging.requirements.Requirement(require)
280275
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)