Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Python 3.12-3.13 and drop EOL 3.6-3.7 #166

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
name: tests

on:
push:
branches:
- main
pull_request:
branches:
- main
on: [push, pull_request, workflow_dispatch]

env:
FORCE_COLOR: 1

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Run pre-commit
uses: pre-commit/action@v3.0.0

build:
runs-on: ubuntu-latest
needs: [lint]
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v3
allow-prereleases: true
- uses: actions/checkout@v4
- name: Test with tox
run: |
pip install tox
tox
- uses: codecov/codecov-action@v3
if: ${{ matrix.python-version == '3.11' }}
if: ${{ matrix.python-version == '3.12' }}
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
repos:
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: 22.3.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.1.1
hooks:
- id: black
language_version: python3

- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
rev: 7.0.0
hooks:
- id: flake8
7 changes: 3 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ classifiers =
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.7
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
Programming Language :: Python :: 3.13
Topic :: Software Development :: User Interfaces
Topic :: Utilities
keywords =
Expand All @@ -32,9 +33,7 @@ keywords =

[options]
packages = find:
install_requires =
importlib_metadata;python_version<"3.8"
python_requires = >=3.6
python_requires = >=3.8

[options.entry_points]
console_scripts =
Expand Down
6 changes: 1 addition & 5 deletions tuna/__about__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
try:
# Python 3.8
from importlib import metadata
except ImportError:
import importlib_metadata as metadata
from importlib import metadata

try:
__version__ = metadata.version("tuna")
Expand Down
2 changes: 1 addition & 1 deletion tuna/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def main(argv=None):
outdir = Path(args.outdir)
if not outdir.is_dir():
outdir.mkdir(parents=True)
with open(outdir / "index.html", "wt", encoding="utf-8") as out:
with open(outdir / "index.html", "w", encoding="utf-8") as out:
out.write(render(data, args.infile))
this_dir = Path(__file__).resolve().parent
static_dir = outdir / "static"
Expand Down