Skip to content

Commit

Permalink
Drop Python 3.8 (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
kytta authored Aug 1, 2023
2 parents 58ea564 + f0bdc5d commit 60d9d4f
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:
fail-fast: false
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
Expand Down
5 changes: 2 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,16 @@ repos:
rev: v3.10.0
hooks:
- id: reorder-python-imports
args: [--py37-plus]
args: [--py39-plus]
- repo: https://github.com/asottile/add-trailing-comma
rev: v3.0.1
hooks:
- id: add-trailing-comma
args: [--py36-plus]
- repo: https://github.com/asottile/pyupgrade
rev: v3.10.1
hooks:
- id: pyupgrade
args: [--py38-plus]
args: [--py39-plus]
- repo: https://github.com/PyCQA/docformatter
rev: v1.7.5
hooks:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Unreleased

## BREAKING

- [#43](https://github.com/kytta/skyr/pull/43):
Drop support for Python 3.8

### Behind-the-scenes

- Migrated to Hatch as task runner and build system
Expand Down
9 changes: 4 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ maintainers = [
authors = [
{ name = "Nikita Karamov", email = "me@kytta.dev" },
]
requires-python = ">=3.8"
requires-python = ">=3.9"
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
Expand All @@ -27,7 +27,6 @@ classifiers = [
"Operating System :: Unix",
"Programming Language :: Python",
"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 Down Expand Up @@ -70,14 +69,14 @@ cov = [
]

[[tool.hatch.envs.test.matrix]]
python = ["38", "39", "310", "311"]
python = ["39", "310", "311"]

[tool.autopep8]
ignore = ["W503"]

[tool.ruff]
line-length = 79
target-version = "py38"
target-version = "py39"

select = [
"F", # pyflakes
Expand Down Expand Up @@ -120,7 +119,7 @@ addopts = "--tb=short --showlocals"
plugins = ["covdefaults"]

[tool.mypy]
python_version = 3.8
python_version = 3.9
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
Expand Down
7 changes: 3 additions & 4 deletions skyr.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
import errno
import os
import sys
from collections.abc import Iterable
from collections.abc import Sequence
from pathlib import Path
from typing import Iterable
from typing import List
from typing import NoReturn
from typing import Optional
from typing import Sequence
from typing import Union

__version__ = "0.2.0"
Expand Down Expand Up @@ -60,7 +59,7 @@ def find_script(name: str, script_dir: Path) -> Optional[Path]:
def try_execute(
name: str,
script_file: Path,
argv: Optional[List[str]] = None,
argv: Optional[list[str]] = None,
) -> NoReturn:
if argv is None:
argv = []
Expand Down
9 changes: 4 additions & 5 deletions tests/skyr_test.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import subprocess
import sys
from collections.abc import Iterable
from collections.abc import Sequence
from pathlib import Path
from typing import Iterable
from typing import List
from typing import Optional
from typing import Sequence

import pytest

Expand All @@ -19,7 +18,7 @@
(["--version"], 0),
],
)
def test_argpase_exits_zero(argv: List[str], return_code: int):
def test_argpase_exits_zero(argv: list[str], return_code: int):
with pytest.raises(SystemExit):
assert skyr.main(argv) == return_code

Expand Down Expand Up @@ -147,7 +146,7 @@ def test_main_fails_if_no_script_dir_found(monkeypatch, capsys):
],
)
def test_successful_execution(
argv: List[str],
argv: list[str],
expected_out: bytes,
monkeypatch,
):
Expand Down

0 comments on commit 60d9d4f

Please sign in to comment.