Skip to content

Commit

Permalink
Drop support for Python 3.8 (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Sep 14, 2024
2 parents 561f488 + 342f24f commit 6f138ce
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["pypy3.10", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["pypy3.10", "3.9", "3.10", "3.11", "3.12", "3.13"]
os: [windows-latest, macos-latest, ubuntu-latest]

steps:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,4 @@ venv.bak/
dmypy.json

# hatch-vcs
src/norwegianblue/_version.py
src/*/_version.py
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.0
rev: v0.6.5
hooks:
- id: ruff
args: [--exit-non-zero-on-fix]

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.4.2
rev: 24.8.0
hooks:
- id: black

Expand All @@ -27,7 +27,7 @@ repos:
exclude: tests/data/expected_output.py

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.6
rev: 0.29.2
hooks:
- id: check-github-workflows
- id: check-renovate
Expand Down Expand Up @@ -56,22 +56,22 @@ repos:
# ]

- repo: https://github.com/tox-dev/pyproject-fmt
rev: 2.1.3
rev: 2.2.3
hooks:
- id: pyproject-fmt

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.18
rev: v0.19
hooks:
- id: validate-pyproject

- repo: https://github.com/tox-dev/tox-ini-fmt
rev: 1.3.1
rev: 1.4.0
hooks:
- id: tox-ini-fmt

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.3.3
hooks:
- id: prettier
args: [--prose-wrap=always, --print-width=88]
Expand Down
27 changes: 7 additions & 20 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,15 @@ keywords = [
"eol",
]
license = { text = "MIT" }
authors = [
{ name = "Hugo van Kemenade" },
]
requires-python = ">=3.8"
authors = [ { name = "Hugo van Kemenade" } ]
requires-python = ">=3.9"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand All @@ -36,9 +33,7 @@ classifiers = [
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dynamic = [
"version",
]
dynamic = [ "version" ]
dependencies = [
"httpx>=0.19",
"platformdirs",
Expand Down Expand Up @@ -96,15 +91,9 @@ lint.ignore = [
"E241", # Multiple spaces after ','
]
lint.flake8-import-conventions.aliases.datetime = "dt"
lint.flake8-import-conventions.banned-from = [
"datetime",
]
lint.isort.known-first-party = [
"norwegianblue",
]
lint.isort.required-imports = [
"from __future__ import annotations",
]
lint.flake8-import-conventions.banned-from = [ "datetime" ]
lint.isort.known-first-party = [ "norwegianblue" ]
lint.isort.required-imports = [ "from __future__ import annotations" ]

[tool.pyproject-fmt]
max_supported_python = "3.13"
Expand All @@ -115,6 +104,4 @@ filterwarnings = [
# Python <= 3.11
"ignore:sys.monitoring isn't available, using default core:coverage.exceptions.CoverageWarning",
]
testpaths = [
"tests",
]
testpaths = [ "tests" ]
4 changes: 2 additions & 2 deletions src/norwegianblue/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import datetime as dt
import json
import logging
from functools import lru_cache
from functools import cache

from dateutil.relativedelta import relativedelta
from termcolor import colored
Expand Down Expand Up @@ -101,7 +101,7 @@ def norwegianblue(
return output


@lru_cache(maxsize=None)
@cache
def suggest_product(product: str) -> str:
import difflib

Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ env_list =
cli
lint
pins
py{py3, 313, 312, 311, 310, 39, 38}
py{py3, 313, 312, 311, 310, 39}

[testenv]
extras =
Expand Down

0 comments on commit 6f138ce

Please sign in to comment.