diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8ec8403..9b6ff3f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,12 +18,10 @@ jobs: - { python: "3.11", os: "ubuntu-latest", session: "mypy" } - { python: "3.10", os: "ubuntu-latest", session: "mypy" } - { python: "3.9", os: "ubuntu-latest", session: "mypy" } - - { python: "3.8", os: "ubuntu-latest", session: "mypy" } - { python: "3.12", os: "ubuntu-latest", session: "tests" } - { python: "3.11", os: "ubuntu-latest", session: "tests" } - { python: "3.10", os: "ubuntu-latest", session: "tests" } - { python: "3.9", os: "ubuntu-latest", session: "tests" } - - { python: "3.8", os: "ubuntu-latest", session: "tests" } - { python: "3.12", os: "windows-latest", session: "tests" } - { python: "3.12", os: "macos-latest", session: "tests" } - { python: "3.12", os: "ubuntu-latest", session: "typeguard" } @@ -124,7 +122,6 @@ jobs: mv coverage-data-3.11-ubuntu-latest/* . mv coverage-data-3.10-ubuntu-latest/* . mv coverage-data-3.9-ubuntu-latest/* . - mv coverage-data-3.8-ubuntu-latest/* . hatch run coverage:run - name: Create coverage report diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bf86c1f..91d9f80 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,18 +10,6 @@ repos: hooks: - id: prettier - - repo: https://github.com/asottile/pyupgrade - rev: v3.19.0 - hooks: - - id: pyupgrade - args: [--py38-plus] - - - repo: https://github.com/pycqa/isort - rev: 5.13.2 - hooks: - - id: isort - args: ["--filter-files"] - - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 hooks: @@ -33,6 +21,18 @@ repos: - id: check-yaml - id: end-of-file-fixer + - repo: https://github.com/asottile/pyupgrade + rev: v3.19.1 + hooks: + - id: pyupgrade + args: [--py39-plus] + + - repo: https://github.com/pycqa/isort + rev: 5.13.2 + hooks: + - id: isort + args: ["--filter-files"] + - repo: https://github.com/pycqa/flake8 rev: 7.1.1 hooks: diff --git a/.readthedocs.yml b/.readthedocs.yml index aaf2993..c3c5442 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -3,7 +3,7 @@ sphinx: configuration: docs/conf.py formats: all python: - version: 3.8 + version: 3.9 install: - requirements: docs/requirements.txt - path: . diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 81f0b3a..a7a182a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,7 +37,7 @@ Request features on the [Issue Tracker]. ## How to set up your development environment -You need Python 3.8+ and the following tools: +You need Python 3.9+ and the following tools: - [Hatch] diff --git a/README.md b/README.md index f4f1101..9d23367 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ ## Requirements -- It works in Python 3.8+. +- It works in Python 3.9+. ## Installation diff --git a/pyproject.toml b/pyproject.toml index 5f6a796..bc192dc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,13 +9,12 @@ license = {text = "MIT"} readme = "README.md" classifiers = [ "Development Status :: 5 - Production/Stable", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", ] -requires-python = ">=3.8" +requires-python = ">=3.9" dependencies = [] [tool.hatch.version] @@ -58,7 +57,7 @@ run-xdoctest = [ "hatch run xdoctest:run" ] run-docs-build = [ "hatch run docs-build:run" ] [[tool.hatch.envs.sessions.matrix]] -python = ["3.8", "3.9", "3.10", "3.11", "3.12"] +python = ["3.9", "3.10", "3.11", "3.12"] [tool.hatch.envs.pre-commit] dependencies = [ diff --git a/src/human_readable/i18n.py b/src/human_readable/i18n.py index ec2eddf..4842d02 100644 --- a/src/human_readable/i18n.py +++ b/src/human_readable/i18n.py @@ -89,8 +89,6 @@ def pgettext(msgctxt: str, message: str) -> str: Returns: Translated text. """ - # This GNU gettext function was added in Python 3.8, so for older versions we - # reimplement it. It works by joining `msgctx` and `message` by '4' byte. return get_translation().pgettext(msgctxt, message)