Skip to content

Commit

Permalink
- Add support for Python 3.12. - Drop support for Python 3.7. (#9)
Browse files Browse the repository at this point in the history
* Update to current meta/config to fix GHA
* Drop support for Python 3.7.
* Add support for Python 3.12, 3.13.

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
  • Loading branch information
icemac and pre-commit-ci-lite[bot] authored Sep 30, 2024
1 parent 35f51a3 commit e70eb5a
Show file tree
Hide file tree
Showing 15 changed files with 275 additions and 185 deletions.
27 changes: 0 additions & 27 deletions .coveragerc

This file was deleted.

33 changes: 33 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/buildout-recipe
name: pre-commit

on:
pull_request:
push:
branches:
- master
# Allow to run this workflow manually from the Actions tab
workflow_dispatch:

env:
FORCE_COLOR: 1

jobs:
pre-commit:
name: linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- uses: pre-commit/[email protected]
with:
extra_args: --all-files --show-diff-on-failure
env:
PRE_COMMIT_COLOR: always
- uses: pre-commit-ci/[email protected]
if: always()
with:
msg: Apply pre-commit code formatting
32 changes: 19 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,32 @@ jobs:
fail-fast: false
matrix:
os:
- ["ubuntu", "ubuntu-20.04"]
- ["ubuntu", "ubuntu-latest"]
config:
# [Python version, tox env]
- ["3.9", "lint"]
- ["3.7", "py37"]
- ["3.8", "py38"]
- ["3.9", "py39"]
- ["3.10", "py310"]
- ["3.11", "py311"]
- ["pypy-3.9", "pypy3"]
- ["3.9", "docs"]
- ["3.9", "coverage"]
- ["3.11", "release-check"]
- ["3.8", "py38"]
- ["3.9", "py39"]
- ["3.10", "py310"]
- ["3.11", "py311"]
- ["3.12", "py312"]
- ["3.13", "py313"]
- ["pypy-3.10", "pypy3"]
- ["3.11", "docs"]
- ["3.11", "coverage"]

runs-on: ${{ matrix.os[1] }}
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
name: ${{ matrix.config[1] }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.config[0] }}
allow-prereleases: true
- name: Pip cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
Expand All @@ -52,7 +54,11 @@ jobs:
python -m pip install --upgrade pip
pip install tox
- name: Test
if: ${{ !startsWith(runner.os, 'Mac') }}
run: tox -e ${{ matrix.config[1] }}
- name: Test (macOS)
if: ${{ startsWith(runner.os, 'Mac') }}
run: tox -e ${{ matrix.config[1] }}-universal2
- name: Coverage
if: matrix.config[1] == 'coverage'
run: |
Expand Down
4 changes: 2 additions & 2 deletions .meta.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# https://github.com/zopefoundation/meta/tree/master/config/buildout-recipe
[meta]
template = "buildout-recipe"
commit-id = "b21fbbf2"
commit-id = "85622de1"

[python]
with-pypy = true
Expand All @@ -13,7 +13,7 @@ with-future-python = false
with-macos = false

[coverage]
fail-under = 91
fail-under = 89

[check-manifest]
additional-ignores = [
Expand Down
28 changes: 28 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/buildout-recipe
minimum_pre_commit_version: '3.6'
repos:
- repo: https://github.com/pycqa/isort
rev: "5.13.2"
hooks:
- id: isort
- repo: https://github.com/hhatto/autopep8
rev: "v2.3.1"
hooks:
- id: autopep8
args: [--in-place, --aggressive, --aggressive]
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
hooks:
- id: pyupgrade
args: [--py38-plus]
- repo: https://github.com/isidentical/teyit
rev: 0.4.3
hooks:
- id: teyit
- repo: https://github.com/PyCQA/flake8
rev: "7.1.1"
hooks:
- id: flake8
additional_dependencies:
- flake8-debugger == 4.1.2
4 changes: 3 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ Changes
1.1 (unreleased)
================

- Nothing changed yet.
- Add support for Python 3.12, 3.13.

- Drop support for Python 3.7.


1.0 (2023-01-06)
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include *.rst
include *.txt
include buildout.cfg
include tox.ini
include .coveragerc
include .pre-commit-config.yaml

recursive-include docs *.py
recursive-include docs *.rst
Expand Down
Loading

0 comments on commit e70eb5a

Please sign in to comment.