Skip to content

Commit 1d5b098

Browse files
authored
Merge pull request #24 from nicoddemus/drop-py35-py36
Drop Python 3.5 and 3.6, add Python 3.10 and 3.11
2 parents 8db95e1 + 74f02a9 commit 1d5b098

File tree

10 files changed

+95
-98
lines changed

10 files changed

+95
-98
lines changed

.github/workflows/deploy.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: deploy
2+
3+
on:
4+
push:
5+
tags:
6+
- "[0-9]+.[0-9]+.[0-9]+"
7+
8+
jobs:
9+
10+
deploy:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Build and Check Package
17+
uses: hynek/[email protected]
18+
19+
- name: Download Package
20+
uses: actions/download-artifact@v3
21+
with:
22+
name: Packages
23+
path: dist
24+
25+
- name: Publish package to PyPI
26+
uses: pypa/gh-action-pypi-publish@master
27+
with:
28+
user: __token__
29+
password: ${{ secrets.pypi_token }}
30+
31+
- name: Set up Python
32+
uses: actions/[email protected]
33+
with:
34+
python-version: "3.10"

.github/workflows/main.yml

Lines changed: 0 additions & 84 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: test
2+
3+
on: [push, pull_request]
4+
5+
# Cancel running jobs for the same workflow and branch.
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
test:
12+
13+
runs-on: ${{ matrix.os }}
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
python: ["3.7", "3.8", "3.9", "3.10", "3.11"]
19+
os: [ubuntu-latest, windows-latest]
20+
include:
21+
- python: "3.7"
22+
tox_env: "py37"
23+
- python: "3.8"
24+
tox_env: "py38"
25+
- python: "3.9"
26+
tox_env: "py39"
27+
- python: "3.10"
28+
tox_env: "py310"
29+
- python: "3.11"
30+
tox_env: "py311"
31+
32+
steps:
33+
- uses: actions/checkout@v3
34+
- name: Set up Python
35+
uses: actions/setup-python@v4
36+
with:
37+
python-version: ${{ matrix.python }}
38+
- name: Install tox
39+
run: |
40+
python -m pip install --upgrade pip
41+
pip install --upgrade virtualenv tox
42+
- name: Test
43+
run: |
44+
tox -e ${{ matrix.tox_env }}

.pre-commit-config.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
exclude: '^($|.*\.bin)'
21
repos:
32
- repo: https://github.com/ambv/black
4-
rev: 19.3b0
3+
rev: 23.1.0
54
hooks:
65
- id: black
76
args: [--safe, --quiet]
87
- repo: https://github.com/pre-commit/pre-commit-hooks
9-
rev: v2.2.3
8+
rev: v4.4.0
109
hooks:
1110
- id: trailing-whitespace
1211
- id: end-of-file-fixer

CHANGELOG.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
UNRELEASED
2+
----------
3+
4+
* Added support for Python 3.10 and 3.11.
5+
* Dropped support for Python 3.5 and 3.6.
6+
17
0.1.2 (2020-12-11)
28
------------------
39

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pytest-reportlog
1010
.. |anaconda| image:: https://img.shields.io/conda/vn/conda-forge/pytest-reportlog.svg
1111
:target: https://anaconda.org/conda-forge/pytest-reportlog
1212

13-
.. |ci| image:: https://github.com/pytest-dev/pytest-reportlog/workflows/build/badge.svg
13+
.. |ci| image:: https://github.com/pytest-dev/pytest-reportlog/workflows/test/badge.svg
1414
:target: https://github.com/pytest-dev/pytest-reportlog/actions
1515

1616
.. |python| image:: https://img.shields.io/pypi/pyversions/pytest-reportlog.svg

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
packages=find_packages(where="src"),
1212
package_dir={"": "src"},
1313
platforms="any",
14-
python_requires=">=3.5",
15-
install_requires=["pytest>=5.2"],
14+
python_requires=">=3.7",
15+
install_requires=["pytest"],
1616
use_scm_version={"write_to": "src/pytest_reportlog/_version.py"},
1717
setup_requires=["setuptools_scm"],
1818
url="https://github.com/pytest-dev/pytest-reportlog",
@@ -30,11 +30,11 @@
3030
"License :: OSI Approved :: MIT License",
3131
"Operating System :: OS Independent",
3232
"Programming Language :: Python :: 3",
33-
"Programming Language :: Python :: 3.5",
34-
"Programming Language :: Python :: 3.6",
3533
"Programming Language :: Python :: 3.7",
3634
"Programming Language :: Python :: 3.8",
3735
"Programming Language :: Python :: 3.9",
36+
"Programming Language :: Python :: 3.10",
37+
"Programming Language :: Python :: 3.11",
3838
"Topic :: Software Development :: Testing",
3939
],
4040
)

src/pytest_reportlog/plugin.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,7 @@ def pytest_collectreport(self, report):
7474
self._write_json_data(data)
7575

7676
def pytest_terminal_summary(self, terminalreporter):
77-
terminalreporter.write_sep(
78-
"-", "generated report log file: {}".format(self._log_path)
79-
)
77+
terminalreporter.write_sep("-", f"generated report log file: {self._log_path}")
8078

8179

8280
def cleanup_unserializable(d: Dict[str, Any]) -> Dict[str, Any]:

tests/test_reportlog.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def test_fail():
2626

2727
result = testdir.runpytest("--report-log", str(log_file))
2828
assert result.ret == pytest.ExitCode.TESTS_FAILED
29-
result.stdout.fnmatch_lines(["* generated report log file: {}*".format(log_file)])
29+
result.stdout.fnmatch_lines([f"* generated report log file: {log_file}*"])
3030

3131
json_objs = [json.loads(x) for x in log_file.read_text().splitlines()]
3232
assert len(json_objs) == 10
@@ -68,7 +68,7 @@ def test_fail():
6868
"""
6969
)
7070
fn = tmp_path / "result.log"
71-
result = testdir.runpytest("-n2", "--report-log={}".format(fn))
71+
result = testdir.runpytest("-n2", f"--report-log={fn}")
7272
result.stdout.fnmatch_lines("*1 failed, 1 passed*")
7373

7474
lines = fn.read_text("UTF-8").splitlines()

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py{35,36,37,38,39},linting
2+
envlist = py{37,38,39,310,311},linting
33

44
[testenv]
55
deps =

0 commit comments

Comments
 (0)