Skip to content
Merged
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
1 change: 1 addition & 0 deletions requirements-rocm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dtlib
numpy>=1.23.5
pytest>=6.2.4
pytest_xdist>=2.2.1
pytest-durations
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with other pytest packages in this file (e.g., pytest>=6.2.4), and to ensure reproducible builds, it's recommended to add a version specifier for pytest-durations. This will prevent potential issues if a future version of the package introduces breaking changes.

pytest-durations>=0.2.0

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Confirm plugin intent vs pytest’s built-in --durations; add a version bound aligned to supported Python.

  • pytest-durations is real and actively maintained; it provides fixture/test breakdowns and xdist-aware reporting, unlike pytest’s built-in --durations. If you only need top-N slow tests, the builtin may suffice; if you want fixture-separated timing, keeping this plugin is correct. (pypi.org)
  • Recommend pinning to a compatible range based on your supported Python version (plugin dropped Py3.8 in 1.5.1):
    • If Python >= 3.9: prefer >=1.5.1.
    • If Python 3.8 must be supported: cap to <1.5.1. (pypi.org)

Apply one of these (pick per your Python matrix):

-pytest-durations
+pytest-durations>=1.5.1  # uses fixture-aware timings; requires Python >=3.9
-pytest-durations
+pytest-durations<1.5.1   # keep Py3.8 compatibility

Verification script to confirm Python versions used in CI and whether plugin flags are passed:


🏁 Script executed:

#!/bin/bash
# Show declared Python versions in workflows and configs
rg -nC2 -i 'python-version|python:|^requires-python|^python_requires|^classifiers.*Programming Language :: Python ::' .github workflows || true
rg -nC2 -i 'requires-python|python_requires|Programming Language :: Python ::' pyproject.toml setup.cfg setup.py || true

# Find pytest invocations and check if using builtin or plugin flags
rg -nC2 -i 'pytest(?!-duration)|--durations(=|\b)|--pytest-durations(=|\b)' .github scripts ci Makefile || true

Length of output: 2791


Pin pytest-durations to preserve Py3.8 support or require Python ≥3.9.

setup.py contains python_requires=">=3.8" and a Python 3.8 classifier — pytest-durations ≥1.5.1 dropped Py3.8, so pick one:

-pytest-durations
+pytest-durations<1.5.1   # keep Py3.8 compatibility
-pytest-durations
+pytest-durations>=1.5.1  # requires Python >=3.9; also bump python_requires and CI
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
pytest-durations
pytest-durations<1.5.1 # keep Py3.8 compatibility
Suggested change
pytest-durations
pytest-durations>=1.5.1 # requires Python >=3.9; also bump python_requires and CI
🤖 Prompt for AI Agents
In requirements-rocm.txt at line 15, pytest-durations is unpinned and recent
releases (>=1.5.1) dropped Python 3.8 support which conflicts with setup.py's
python_requires=">=3.8"; either pin pytest-durations to a release that still
supports Py3.8 (e.g. add pytest-durations==1.5.0 or pytest-durations<1.5.1) in
requirements-rocm.txt, or if you intend to require Python ≥3.9, update setup.py
(python_requires and classifiers) and any docs to ≥3.9 and then leave or update
the dependency to a compatible newer version.

packaging>=21.0
PyYAML
tqdm>=4.62.3
Expand Down
Loading