Skip to content

Commit

Permalink
Drop support for Python 3.7 + officially support Python 3.13 (#183)
Browse files Browse the repository at this point in the history
* Apply pre-commit code formatting
* Fix docs.
* Add needed normalizer also to windows.

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: dieter <[email protected]>
  • Loading branch information
3 people authored Oct 16, 2024
1 parent 02c6af3 commit e403c7c
Show file tree
Hide file tree
Showing 36 changed files with 444 additions and 280 deletions.
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/pure-python
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
37 changes: 19 additions & 18 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,31 @@ jobs:
fail-fast: false
matrix:
os:
- ["ubuntu", "ubuntu-20.04"]
- ["ubuntu", "ubuntu-latest"]
- ["windows", "windows-latest"]
config:
# [Python version, tox env]
- ["3.9", "release-check"]
- ["3.9", "lint"]
- ["3.7", "py37"]
- ["3.8", "py38"]
- ["3.9", "py39"]
- ["3.10", "py310"]
- ["3.11", "py311"]
- ["3.12", "py312"]
- ["3.13.0-alpha - 3.13.0", "py313"]
- ["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.9", "docs"]
- ["3.9", "coverage"]
- ["3.7", "py37-subunit"]
- ["3.11", "docs"]
- ["3.11", "coverage"]
- ["3.8", "py38-subunit"]
- ["3.9", "py39-subunit"]
- ["3.10", "py310-subunit"]
- ["3.11", "py311-subunit"]
- ["3.12", "py312-subunit"]
- ["3.13.0-alpha - 3.13.0", "py313-subunit"]
- ["3.13", "py313-subunit"]
- ["pypy-3.9", "pypy3-subunit"]
exclude:
- { os: ["windows", "windows-latest"], config: ["3.9", "release-check"] }
- { os: ["windows", "windows-latest"], config: ["3.9", "lint"] }
- { os: ["windows", "windows-latest"], config: ["3.9", "docs"] }
- { os: ["windows", "windows-latest"], config: ["3.9", "coverage"] }
- { os: ["windows", "windows-latest"], config: ["3.11", "release-check"] }
- { os: ["windows", "windows-latest"], config: ["3.11", "docs"] }
- { os: ["windows", "windows-latest"], config: ["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
Expand All @@ -56,6 +52,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.config[0] }}
allow-prereleases: true
- name: Pip cache
uses: actions/cache@v4
with:
Expand All @@ -69,7 +66,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
14 changes: 8 additions & 6 deletions .meta.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
[meta]
template = "pure-python"
commit-id = "08a3cc69"
commit-id = "210c1a0c"

[python]
with-pypy = true
with-docs = true
with-sphinx-doctests = false
with-windows = true
with-future-python = true
with-future-python = false
with-macos = false

[coverage]
fail-under = 84
fail-under = 82.5

[manifest]
additional-rules = [
Expand Down Expand Up @@ -42,7 +42,7 @@ additional-config = [

[tox]
additional-envlist = [
"py{37,38,39,310,311,312,313,py3}-subunit",
"py{38,39,310,311,312,313,py3}-subunit",
]
testenv-deps = [
]
Expand All @@ -54,12 +54,14 @@ use-flake8 = true

[github-actions]
additional-config = [
"- [\"3.7\", \"py37-subunit\"]",
"- [\"3.8\", \"py38-subunit\"]",
"- [\"3.9\", \"py39-subunit\"]",
"- [\"3.10\", \"py310-subunit\"]",
"- [\"3.11\", \"py311-subunit\"]",
"- [\"3.12\", \"py312-subunit\"]",
"- [\"3.13.0-alpha - 3.13.0\", \"py313-subunit\"]",
"- [\"3.13\", \"py313-subunit\"]",
"- [\"pypy-3.9\", \"pypy3-subunit\"]",
]

[pre-commit]
teyit-exclude = "tests/testrunner-ex/sample2/badsyntax\\.py"
29 changes: 29 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
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
exclude: tests/testrunner-ex/sample2/badsyntax\.py
- 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 @@ -5,9 +5,11 @@
6.6 (unreleased)
================

- Make tests compatible with Python 3.13.0rc3+.
- Make tests compatible with Python 3.13 + add support for that version.
(`#181 <https://github.com/zopefoundation/zope.testrunner/pull/181>`_)

- Drop support for Python 3.7.


6.5 (2024-08-06)
================
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ include *.rst
include *.txt
include buildout.cfg
include tox.ini
include .pre-commit-config.yaml

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

0 comments on commit e403c7c

Please sign in to comment.