Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions .github/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
changelog:
exclude:
authors:
- dependabot[bot]
- pre-commit-ci[bot]
5 changes: 0 additions & 5 deletions .github/release.yml

This file was deleted.

7 changes: 3 additions & 4 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ jobs:
fail-fast: false
matrix:
env:
- "3.14"
- "3.13"
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
- type
- dev
- pkg_meta
Expand All @@ -39,9 +38,9 @@ jobs:
cache-dependency-glob: "pyproject.toml"
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install tox
run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv
run: uv tool install --python-preference only-managed --python 3.14 tox --with tox-uv
- name: Install Python
if: startsWith(matrix.env, '3.') && matrix.env != '3.13'
if: startsWith(matrix.env, '3.') && matrix.env != '3.14'
run: uv python install --python-preference only-managed ${{ matrix.env }}
- name: Setup test suite
run: tox run -vv --notest --skip-missing-interpreters false -e ${{ matrix.env }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
cache-dependency-glob: "pyproject.toml"
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build package
run: uv build --python 3.13 --python-preference only-managed --sdist --wheel . --out-dir dist
run: uv build --python 3.14 --python-preference only-managed --sdist --wheel . --out-dir dist
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ repos:
rev: v2.4.1
hooks:
- id: codespell
additional_dependencies: ["tomli>=2.0.1"]
additional_dependencies: ["tomli>=2.2.1"]
- repo: https://github.com/tox-dev/tox-ini-fmt
rev: "1.6.0"
hooks:
- id: tox-ini-fmt
args: ["-p", "fix"]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "v2.7.0"
rev: "v2.10.0"
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.13.3"
rev: "v0.14.0"
hooks:
- id: ruff-format
- id: ruff
Expand Down
72 changes: 0 additions & 72 deletions CHANGELOG.md

This file was deleted.

15 changes: 6 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[build-system]
build-backend = "hatchling.build"
requires = [
"hatch-vcs>=0.4",
"hatchling>=1.25",
"hatch-vcs>=0.5",
"hatchling>=1.27",
]

[project]
Expand All @@ -17,16 +17,14 @@ license.file = "LICENSE"
maintainers = [
{ name = "Bernát Gábor", email = "gaborjbernat@gmail.com" },
]
requires-python = ">=3.8"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"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",
Expand All @@ -38,12 +36,12 @@ dynamic = [
"version",
]
dependencies = [
"pytest>=8.3.2",
"pytest>=8.4.2",
]
optional-dependencies.test = [
"covdefaults>=2.3",
"coverage>=7.6.1",
"pytest-mock>=3.14",
"coverage>=7.10.7",
"pytest-mock>=3.15.1",
]
urls.Homepage = "https://github.com/pytest-dev/pytest-print"
urls.Source = "https://github.com/pytest-dev/pytest-print"
Expand All @@ -54,7 +52,6 @@ entry-points.pytest11.print = "pytest_print"
version.source = "vcs"

[tool.ruff]
target-version = "py38"
line-length = 120
format.preview = true
format.docstring-code-line-length = 100
Expand Down
6 changes: 3 additions & 3 deletions src/pytest_print/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import sys
from dataclasses import dataclass, replace
from timeit import default_timer
from typing import TYPE_CHECKING, Optional, Protocol, TypeVar, cast
from typing import TYPE_CHECKING, Protocol, TypeVar, cast

import pytest

Expand Down Expand Up @@ -179,10 +179,10 @@ def indent(self, *, icon: str) -> PrettyPrinter:

def _create(request: SubRequest, of_type: type[_OfType], formatter: Formatter) -> _OfType:
return of_type(
reporter=cast("Optional[TerminalReporter]", request.config.pluginmanager.getplugin("terminalreporter"))
reporter=cast("TerminalReporter | None", request.config.pluginmanager.getplugin("terminalreporter"))
if request.config.getoption("pytest_print_on") or cast("int", request.config.getoption("verbose")) > 0
else None,
capture_manager=cast("Optional[CaptureManager]", request.config.pluginmanager.getplugin("capturemanager")),
capture_manager=cast("CaptureManager | None", request.config.pluginmanager.getplugin("capturemanager")),
formatter=formatter,
start=default_timer() if request.config.getoption("pytest_print_relative_time") else None,
level=0,
Expand Down
4 changes: 3 additions & 1 deletion tests/example_create_pretty_print.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
from __future__ import annotations

from time import sleep
from typing import TYPE_CHECKING, Iterator
from typing import TYPE_CHECKING

import pytest

from pytest_print import Formatter

if TYPE_CHECKING:
from collections.abc import Iterator

from pytest_print import PrettyPrinter, PrettyPrinterFactory


Expand Down
4 changes: 3 additions & 1 deletion tests/example_print.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
from __future__ import annotations

from time import sleep
from typing import TYPE_CHECKING, Iterator
from typing import TYPE_CHECKING

import pytest

if TYPE_CHECKING:
from collections.abc import Iterator

from pytest_print import Printer


Expand Down
15 changes: 7 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
[tox]
requires =
tox>=4.2
tox>=4.30.3
env_list =
fix
3.14
3.13
3.12
3.11
3.10
3.9
3.8
type
pkg_meta
skip_missing_interpreters = true
Expand All @@ -34,7 +33,7 @@ commands =
description = run static analysis and style check using flake8
skip_install = true
deps =
pre-commit-uv>=4.1
pre-commit-uv>=4.1.5
pass_env =
HOMEPATH
PROGRAMDATA
Expand All @@ -44,7 +43,7 @@ commands =
[testenv:type]
description = run type check on code base
deps =
mypy==1.11.2
mypy==1.18.2
commands =
mypy --strict src
mypy --strict tests
Expand All @@ -53,9 +52,9 @@ commands =
description = check that the long description is valid
skip_install = true
deps =
check-wheel-contents>=0.6
twine>=5.1.1
uv>=0.4.10
check-wheel-contents>=0.6.3
twine>=6.2
uv>=0.8.22
commands =
uv build --sdist --wheel --out-dir {env_tmp_dir} .
twine check {env_tmp_dir}{/}*
Expand Down