Skip to content

Commit 93b7a9e

Browse files
authored
[skip-ci] min_deps_check: show age of required pkg on error (#9025)
1 parent b0e150e commit 93b7a9e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ci/min_deps_check.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
"isort",
2424
"mypy",
2525
"pip",
26-
"setuptools",
2726
"pytest",
2827
"pytest-cov",
2928
"pytest-env",
30-
"pytest-xdist",
3129
"pytest-timeout",
30+
"pytest-xdist",
31+
"setuptools",
3232
}
3333

3434
POLICY_MONTHS = {"python": 30, "numpy": 18}
@@ -162,11 +162,11 @@ def process_pkg(
162162
status = "<"
163163
elif (req_major, req_minor) > (policy_major, policy_minor):
164164
status = "> (!)"
165-
delta = relativedelta(datetime.now(), policy_published_actual).normalized()
165+
delta = relativedelta(datetime.now(), req_published).normalized()
166166
n_months = delta.years * 12 + delta.months
167167
warning(
168-
f"Package is too new: {pkg}={policy_major}.{policy_minor} was "
169-
f"published on {versions[policy_major, policy_minor]:%Y-%m-%d} "
168+
f"Package is too new: {pkg}={req_major}.{req_minor} was "
169+
f"published on {req_published:%Y-%m-%d} "
170170
f"which was {n_months} months ago (policy is {policy_months} months)"
171171
)
172172
else:

0 commit comments

Comments
 (0)