Skip to content

Commit cc5e019

Browse files
Drop python 3.8, add support for 3.12, 3.13 (#842)
* Drop python 3.8, add support for 3.12, 3.13 --------- Co-authored-by: Jim Brännlund <[email protected]>
1 parent f2da5e6 commit cc5e019

File tree

5 files changed

+22
-33
lines changed

5 files changed

+22
-33
lines changed

.github/workflows/tests.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Set up Python
2323
uses: actions/setup-python@v4
2424
with:
25-
python-version: '3.10'
25+
python-version: '3.x'
2626

2727
- name: Ensure latest pip
2828
run: python -m pip install --upgrade pip
@@ -87,20 +87,20 @@ jobs:
8787
fail-fast: false
8888
matrix:
8989
os: [ubuntu-latest, windows-latest, macos-latest]
90-
python-version: ["3.8", "3.9", "3.10", "pypy3.9"]
90+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.9"]
9191
include:
9292
- os: ubuntu-latest
9393
python-version: "3.10"
9494
with-coverage: true
9595

9696
- os: ubuntu-latest
97-
python-version: 3.11-dev
97+
python-version: 3.13
9898
tox-env: devel
9999
- os: windows-latest
100-
python-version: 3.11-dev
100+
python-version: 3.13
101101
tox-env: devel
102102
- os: macos-latest
103-
python-version: 3.11-dev
103+
python-version: 3.13
104104
tox-env: devel
105105

106106
steps:
@@ -163,11 +163,11 @@ jobs:
163163
strategy:
164164
fail-fast: false
165165
matrix:
166-
python-version: ["3.8", "3.9", "3.10", "pypy3.9"]
166+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.9"]
167167
include:
168168
- python-version: "3.10"
169169
with-coverage: true
170-
- python-version: 3.11-dev
170+
- python-version: 3.13
171171
tox-env: devel
172172

173173
steps:
@@ -233,9 +233,9 @@ jobs:
233233
strategy:
234234
fail-fast: false
235235
matrix:
236-
python-version: ["3.8", "3.9", "3.10", "pypy3.9"]
236+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.9"]
237237
include:
238-
- python-version: 3.11-dev
238+
- python-version: 3.13
239239
tox-env: devel
240240

241241
steps:

pyproject.toml

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ name = "pytest-html"
1010
description = "pytest plugin for generating HTML reports"
1111
readme = "README.rst"
1212
license = "MPL-2.0"
13-
requires-python = ">=3.8"
13+
requires-python = ">=3.9"
1414
keywords = [
1515
"pytest",
1616
"html",
@@ -29,10 +29,11 @@ classifiers = [
2929
"Operating System :: POSIX",
3030
"Operating System :: Microsoft :: Windows",
3131
"Operating System :: MacOS :: MacOS X",
32-
"Programming Language :: Python :: 3.8",
3332
"Programming Language :: Python :: 3.9",
3433
"Programming Language :: Python :: 3.10",
3534
"Programming Language :: Python :: 3.11",
35+
"Programming Language :: Python :: 3.12",
36+
"Programming Language :: Python :: 3.13",
3637
"Programming Language :: Python :: Implementation :: CPython",
3738
"Programming Language :: Python :: Implementation :: PyPy",
3839
"Topic :: Software Development :: Quality Assurance",

start

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ else
77
fi
88

99
if [[ "${1}" == "down" ]]; then
10-
docker-compose -f <(sed -e "s;%%VOLUME%%;${volume};g" docker-compose.tmpl.yml) down
10+
docker compose -f <(sed -e "s;%%VOLUME%%;${volume};g" docker-compose.tmpl.yml) down
1111
else
12-
docker-compose -f <(sed -e "s;%%VOLUME%%;${volume};g" docker-compose.tmpl.yml) up -d
12+
docker compose -f <(sed -e "s;%%VOLUME%%;${volume};g" docker-compose.tmpl.yml) up -d
1313
fi

testing/test_unit.py

+7-15
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import importlib.resources
2-
import os
32
import sys
43
from pathlib import Path
54

6-
import pkg_resources
75
import pytest
86
from assertpy import assert_that
97

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

1816

1917
def file_content():
20-
try:
21-
return (
22-
importlib.resources.files("pytest_html")
23-
.joinpath("assets", "style.css")
24-
.read_bytes()
25-
.decode("utf-8")
26-
.strip()
27-
)
28-
except AttributeError:
29-
# Needed for python < 3.9
30-
return pkg_resources.resource_string(
31-
"pytest_html", os.path.join("assets", "style.css")
32-
).decode("utf-8")
18+
return (
19+
importlib.resources.files("pytest_html")
20+
.joinpath("assets", "style.css")
21+
.read_bytes()
22+
.decode("utf-8")
23+
.strip()
24+
)
3325

3426

3527
def test_duration_format_deprecation_warning(pytester):

tox.ini

+1-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# and then run "tox" from this directory.
55

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

1010
[testenv]
@@ -56,7 +56,3 @@ extend-ignore = E203
5656

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

0 commit comments

Comments
 (0)