Skip to content

Commit

Permalink
Merge pull request #708 from staticdev/deprecation/python-38
Browse files Browse the repository at this point in the history
Deprecate Python 3.8
  • Loading branch information
staticdev authored Jan 16, 2025
2 parents 497c96d + 74926a8 commit 90aef38
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 23 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down Expand Up @@ -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
Expand Down
24 changes: 12 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sphinx:
configuration: docs/conf.py
formats: all
python:
version: 3.8
version: 3.9
install:
- requirements: docs/requirements.txt
- path: .
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

## Requirements

- It works in Python 3.8+.
- It works in Python 3.9+.

## Installation

Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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 = [
Expand Down
2 changes: 0 additions & 2 deletions src/human_readable/i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down

0 comments on commit 90aef38

Please sign in to comment.