Skip to content

Commit bb7ce38

Browse files
fix: reviewer suggestions
2 parents f1d227d + 0048258 commit bb7ce38

File tree

9 files changed

+221
-138
lines changed

9 files changed

+221
-138
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,6 @@ jobs:
335335

336336
steps:
337337
- name: Decide whether the needed jobs succeeded or failed
338-
uses: re-actors/alls-green@223e4bb7a751b91f43eda76992bcfbf23b8b0302
338+
uses: re-actors/alls-green@2765efec08f0fd63e83ad900f5fd75646be69ff6
339339
with:
340340
jobs: ${{ toJSON(needs) }}

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: "v0.12.3"
3+
rev: "v0.12.5"
44
hooks:
55
- id: ruff
66
args: ["--fix"]
@@ -32,7 +32,7 @@ repos:
3232
hooks:
3333
- id: python-use-type-annotations
3434
- repo: https://github.com/pre-commit/mirrors-mypy
35-
rev: v1.16.1
35+
rev: v1.17.0
3636
hooks:
3737
- id: mypy
3838
files: ^(src/|testing/|scripts/)

changelog/13621.contrib.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pytest's own testsuite now handles the ``lsof`` command hanging (e.g. due to unreachable network filesystems), with the affected selftests being skipped after 10 seconds.

doc/en/reference/plugin_list.rst

Lines changed: 201 additions & 129 deletions
Large diffs are not rendered by default.

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[build-system]
22
build-backend = "setuptools.build_meta"
33
requires = [
4-
"setuptools>=61",
4+
"setuptools>=77",
55
"setuptools-scm[toml]>=6.2.3",
66
]
77

@@ -13,7 +13,8 @@ keywords = [
1313
"test",
1414
"unittest",
1515
]
16-
license = { text = "MIT" }
16+
license = "MIT"
17+
license-files = [ "LICENSE" ]
1718
authors = [
1819
{ name = "Holger Krekel" },
1920
{ name = "Bruno Oliveira" },
@@ -27,7 +28,6 @@ requires-python = ">=3.9"
2728
classifiers = [
2829
"Development Status :: 6 - Mature",
2930
"Intended Audience :: Developers",
30-
"License :: OSI Approved :: MIT License",
3131
"Operating System :: MacOS",
3232
"Operating System :: Microsoft :: Windows",
3333
"Operating System :: POSIX",

src/_pytest/_io/pprint.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ def __init__(
6262
indent: int = 4,
6363
width: int = 80,
6464
depth: int | None = None,
65+
<<<<<<< HEAD
6566
sort_dicts: bool = False,
67+
=======
68+
sort_dicts: bool = True,
69+
>>>>>>> 004825824a612277d452488b01af76ce33bb85d9
6670
) -> None:
6771
"""Handle pretty printing operations onto a stream using a set of
6872
configured parameters.

testing/io/test_pprint.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ class DataclassWithTwoItems:
407407
def test_consistent_pretty_printer(data: Any, expected: str) -> None:
408408
assert PrettyPrinter().pformat(data) == textwrap.dedent(expected).strip()
409409

410+
410411
@pytest.mark.parametrize(
411412
("sort_dicts"),
412413
(

testing/plugins_integration/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
anyio[trio]==4.9.0
22
django==5.2.1
3-
pytest-asyncio==1.0.0
3+
pytest-asyncio==1.1.0
44
pytest-bdd==8.1.0
55
pytest-cov==6.2.1
66
pytest-django==4.11.1

testing/test_capture.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -983,8 +983,13 @@ def tmpfile(pytester: Pytester) -> Generator[BinaryIO]:
983983
def lsof_check():
984984
pid = os.getpid()
985985
try:
986-
out = subprocess.check_output(("lsof", "-p", str(pid))).decode()
987-
except (OSError, subprocess.CalledProcessError, UnicodeDecodeError) as exc:
986+
out = subprocess.check_output(("lsof", "-p", str(pid)), timeout=10).decode()
987+
except (
988+
OSError,
989+
UnicodeDecodeError,
990+
subprocess.CalledProcessError,
991+
subprocess.TimeoutExpired,
992+
) as exc:
988993
# about UnicodeDecodeError, see note on pytester
989994
pytest.skip(f"could not run 'lsof' ({exc!r})")
990995
yield

0 commit comments

Comments
 (0)