Skip to content

Commit 868f841

Browse files
uv's --exclude-newer supports friendly times
Co-Authored-By: Grzegorz Bokota <3826210+Czaki@users.noreply.github.com>
1 parent 35d044b commit 868f841

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

noxfile.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import os
1919
import shutil
2020
import sys
21-
from datetime import UTC, datetime, timedelta
2221
from pathlib import Path
2322

2423
import nox
@@ -82,14 +81,7 @@ def update_constraints(session: nox.Session) -> None:
8281

8382
# NOTE: Keep this in sync with bin/_cooldown.py
8483
ignore_cooldown = os.environ.get("CIBW_IGNORE_COOLDOWN", "").lower() in ("1", "true")
85-
cooldown_days = 2
86-
exclude_newer_args = (
87-
[]
88-
if ignore_cooldown
89-
else [
90-
f"--exclude-newer={(datetime.now(tz=UTC).date() - timedelta(days=cooldown_days)).isoformat()}"
91-
]
92-
)
84+
exclude_newer_args = [] if ignore_cooldown else ["--exclude-newer='2 days'"]
9385

9486
for minor_version in range(8, 15):
9587
python_version = f"3.{minor_version}"

0 commit comments

Comments
 (0)