Skip to content

Commit

Permalink
Drop support for Python 3.8 (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Sep 14, 2024
1 parent cb498ad commit 9b1f729
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 28 deletions.
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: [push, pull_request, workflow_dispatch]

env:
FORCE_COLOR: 1
PIP_DISABLE_PIP_VERSION_CHECK: 1

permissions:
contents: read
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Test

on: [push, pull_request, workflow_dispatch]

permissions:
contents: read

env:
FORCE_COLOR: 1

Expand All @@ -11,7 +14,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
28 changes: 20 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,52 +1,64 @@
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

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: forbid-submodules
- id: trailing-whitespace
exclude: .github/ISSUE_TEMPLATE/bug_report.md|tests/test_prettytable.py

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.29.2
hooks:
- id: check-github-workflows

- repo: https://github.com/rhysd/actionlint
rev: v1.7.1
hooks:
- id: actionlint

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.1
rev: v1.11.2
hooks:
- id: mypy
additional_dependencies: [types-colorama, types-setuptools]
args: [--pretty, --show-error-codes]
exclude: ^tests/

- 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
37 changes: 19 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,13 @@ name = "prettytable"
description = "A simple Python library for easily displaying tabular data in a visually appealing ASCII table format"
readme = "README.md"
license = { text = "BSD (3 clause)" }
maintainers = [
{ name = "Jazzband" },
]
authors = [
{ name = "Luke Maurits", email = "luke@maurits.id.au" },
]
requires-python = ">=3.8"
maintainers = [ { name = "Jazzband" } ]
authors = [ { name = "Luke Maurits", email = "luke@maurits.id.au" } ]
requires-python = ">=3.9"
classifiers = [
"License :: OSI Approved :: BSD License",
"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 All @@ -32,9 +27,7 @@ classifiers = [
"Topic :: Text Processing",
"Typing :: Typed",
]
dynamic = [
"version",
]
dynamic = [ "version" ]
dependencies = [
"wcwidth",
]
Expand Down Expand Up @@ -62,26 +55,34 @@ lint.select = [
"EM", # flake8-errmsg
"F", # pyflakes errors
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"PGH", # pygrep-hooks
"PYI", # flake8-pyi
"RUF022", # unsorted-dunder-all
"RUF100", # unused noqa (yesqa)
"UP", # pyupgrade
"W", # pycodestyle warnings
"YTT", # flake8-2020
]
lint.extend-ignore = [
lint.ignore = [
"E203", # Whitespace before ':'
"E221", # Multiple spaces before operator
"E226", # Missing whitespace around arithmetic operator
"E241", # Multiple spaces after ','
]
lint.isort.known-first-party = [
"prettytable",
]
lint.isort.required-imports = [
"from __future__ import annotations",
]
lint.flake8-import-conventions.aliases.datetime = "dt"
lint.flake8-import-conventions.banned-from = [ "datetime" ]
lint.isort.known-first-party = [ "prettytable" ]
lint.isort.required-imports = [ "from __future__ import annotations" ]

[tool.pyproject-fmt]
max_supported_python = "3.13"

[tool.pytest.ini_options]
filterwarnings = [
# Python <= 3.11
"ignore:sys.monitoring isn't available, using default core:coverage.exceptions.CoverageWarning",
]
testpaths = [ "tests" ]
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires =
tox>=4.2
env_list =
lint
py{py3, 313, 312, 311, 310, 39, 38}
py{py3, 313, 312, 311, 310, 39}

[testenv]
extras =
Expand Down

0 comments on commit 9b1f729

Please sign in to comment.