Skip to content

Commit

Permalink
Drop python 3.8, add support for 3.12, 3.13 (#842)
Browse files Browse the repository at this point in the history
* Drop python 3.8, add support for 3.12, 3.13

---------

Co-authored-by: Jim Brännlund <jim.brannlund@gmail.com>
  • Loading branch information
Pierre-Sassoulas and BeyondEvil authored Nov 20, 2024
1 parent f2da5e6 commit cc5e019
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 33 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.x'

- name: Ensure latest pip
run: python -m pip install --upgrade pip
Expand Down Expand Up @@ -87,20 +87,20 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "pypy3.9"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.9"]
include:
- os: ubuntu-latest
python-version: "3.10"
with-coverage: true

- os: ubuntu-latest
python-version: 3.11-dev
python-version: 3.13
tox-env: devel
- os: windows-latest
python-version: 3.11-dev
python-version: 3.13
tox-env: devel
- os: macos-latest
python-version: 3.11-dev
python-version: 3.13
tox-env: devel

steps:
Expand Down Expand Up @@ -163,11 +163,11 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "pypy3.9"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.9"]
include:
- python-version: "3.10"
with-coverage: true
- python-version: 3.11-dev
- python-version: 3.13
tox-env: devel

steps:
Expand Down Expand Up @@ -233,9 +233,9 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "pypy3.9"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.9"]
include:
- python-version: 3.11-dev
- python-version: 3.13
tox-env: devel

steps:
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name = "pytest-html"
description = "pytest plugin for generating HTML reports"
readme = "README.rst"
license = "MPL-2.0"
requires-python = ">=3.8"
requires-python = ">=3.9"
keywords = [
"pytest",
"html",
Expand All @@ -29,10 +29,11 @@ classifiers = [
"Operating System :: POSIX",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS :: MacOS X",
"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",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Quality Assurance",
Expand Down
4 changes: 2 additions & 2 deletions start
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ else
fi

if [[ "${1}" == "down" ]]; then
docker-compose -f <(sed -e "s;%%VOLUME%%;${volume};g" docker-compose.tmpl.yml) down
docker compose -f <(sed -e "s;%%VOLUME%%;${volume};g" docker-compose.tmpl.yml) down
else
docker-compose -f <(sed -e "s;%%VOLUME%%;${volume};g" docker-compose.tmpl.yml) up -d
docker compose -f <(sed -e "s;%%VOLUME%%;${volume};g" docker-compose.tmpl.yml) up -d
fi
22 changes: 7 additions & 15 deletions testing/test_unit.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import importlib.resources
import os
import sys
from pathlib import Path

import pkg_resources
import pytest
from assertpy import assert_that

Expand All @@ -17,19 +15,13 @@ def run(pytester, path="report.html", cmd_flags=None):


def file_content():
try:
return (
importlib.resources.files("pytest_html")
.joinpath("assets", "style.css")
.read_bytes()
.decode("utf-8")
.strip()
)
except AttributeError:
# Needed for python < 3.9
return pkg_resources.resource_string(
"pytest_html", os.path.join("assets", "style.css")
).decode("utf-8")
return (
importlib.resources.files("pytest_html")
.joinpath("assets", "style.css")
.read_bytes()
.decode("utf-8")
.strip()
)


def test_duration_format_deprecation_warning(pytester):
Expand Down
6 changes: 1 addition & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# and then run "tox" from this directory.

[tox]
envlist = {3.8, 3.9, 3.10, 3.10-cov, pypy3.9}, docs, linting
envlist = {3.9, 3.10, 3.10-cov, 3.11, 3.12, 3.13, pypy3.9}, docs, linting
isolated_build = True

[testenv]
Expand Down Expand Up @@ -56,7 +56,3 @@ extend-ignore = E203

[pytest]
testpaths = testing
# TODO: Temporary hack until they fix
# https://github.com/pytest-dev/pytest/issues/6936
filterwarnings =
ignore:.*TerminalReporter.writer attribute is deprecated.*:pytest.PytestDeprecationWarning

0 comments on commit cc5e019

Please sign in to comment.