Skip to content

Drop Python 3.7 support #106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,7 @@ jobs:
matrix:
os: [ubuntu, macos, windows]
python-version:
[
"3.7",
"3.8",
"3.9",
"3.10",
"3.11",
"3.12-dev",
"pypy-3.8",
"pypy-3.9",
]
["3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.8", "pypy-3.9"]

steps:
- uses: actions/checkout@v4
Expand Down
9 changes: 2 additions & 7 deletions lazy_loader/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ def attach(package_name, submodules=None, submod_attrs=None):
{'foo': ['someattr']}
)
This functionality requires Python 3.7 or higher.
Parameters
----------
package_name : str
Expand Down Expand Up @@ -269,12 +267,9 @@ def _check_requirement(require: str) -> bool:
True if the installed version of the dependency matches
the specified version, False otherwise.
"""
import packaging.requirements
import importlib.metadata as importlib_metadata

try:
import importlib.metadata as importlib_metadata
except ImportError: # PY37
import importlib_metadata
import packaging.requirements

req = packaging.requirements.Requirement(require)
return req.specifier.contains(
Expand Down
6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "lazy_loader"
requires-python = ">=3.7"
requires-python = ">=3.8"
authors = [{name = "Scientific Python Developers"}]
readme = "README.md"
license = {file = "LICENSE.md"}
Expand All @@ -13,7 +13,6 @@ classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand All @@ -23,7 +22,6 @@ classifiers = [
description = "Makes it easy to load subpackages and functions on demand."
dependencies = [
"packaging",
"importlib_metadata; python_version < '3.8'",
]

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

[tool.ruff]
line-length = 88
target-version = "py37"
target-version = "py38"
select = [
"C",
"E",
Expand Down