Skip to content

TST: exclude packages newer than a week old from resolution#19527

Open
neutrinoceros wants to merge 2 commits intoastropy:mainfrom
neutrinoceros:tst/exclude-newer
Open

TST: exclude packages newer than a week old from resolution#19527
neutrinoceros wants to merge 2 commits intoastropy:mainfrom
neutrinoceros:tst/exclude-newer

Conversation

@neutrinoceros
Copy link
Copy Markdown
Contributor

@neutrinoceros neutrinoceros commented Apr 2, 2026

Description

Only allow packages to get in regular CI jobs after a cooldown period of a week, which should be more than enough time for upstream to address breaches in the style of llmlite.

  • By checking this box, the PR author has requested that maintainers do NOT use the "Squash and Merge" button. Maintainers should respect this when possible; however, the final decision is at the discretion of the maintainer that merges the PR.

@neutrinoceros neutrinoceros added this to the v8.0.0 milestone Apr 2, 2026
@neutrinoceros neutrinoceros added testing dependencies Pull requests that update a dependency file labels Apr 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 2, 2026

Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.

  • Do the proposed changes actually accomplish desired goals?
  • Do the proposed changes follow the Astropy coding guidelines?
  • Are tests added/updated as required? If so, do they follow the Astropy testing guidelines?
  • Are docs added/updated as required? If so, do they follow the Astropy documentation guidelines?
  • Is rebase and/or squash necessary? If so, please provide the author with appropriate instructions. Also see instructions for rebase and squash.
  • Did the CI pass? If no, are the failures related? If you need to run daily and weekly cron jobs as part of the PR, please apply the "Extra CI" label. Codestyle issues can be fixed by the bot.
  • Is a change log needed? If yes, did the change log check pass? If no, add the "no-changelog-entry-needed" label. If this is a manual backport, use the "skip-changelog-checks" label unless special changelog handling is necessary.
  • Is this a big PR that makes a "What's new?" entry worthwhile and if so, is (1) a "what's new" entry included in this PR and (2) the "whatsnew-needed" label applied?
  • At the time of adding the milestone, if the milestone set requires a backport to release branch(es), apply the appropriate "backport-X.Y.x" label(s) before merge.

@neutrinoceros neutrinoceros force-pushed the tst/exclude-newer branch 2 times, most recently from bed8010 to 7148caa Compare April 2, 2026 13:03
@neutrinoceros neutrinoceros added the Extra CI Run cron CI as part of PR label Apr 2, 2026
@neutrinoceros neutrinoceros marked this pull request as ready for review April 2, 2026 14:28
@neutrinoceros neutrinoceros marked this pull request as draft April 2, 2026 15:15
@neutrinoceros
Copy link
Copy Markdown
Contributor Author

Apparently the env var isn't overriding the static config properly. This issue seems specific to tox though, and I was able to confirm that uv behaves correctly on its own.

@neutrinoceros
Copy link
Copy Markdown
Contributor Author

will report to tox-uv later today or tomorrow.

@neutrinoceros neutrinoceros added the Upstream Action Required Was: Upstream Fix Required label Apr 2, 2026
@neutrinoceros
Copy link
Copy Markdown
Contributor Author

neutrinoceros commented Apr 3, 2026

So, I tried (but failed) to reproduce the problem in a minimal project

pyproject.toml

[project]
name = "test"
version = "0.1.0"
requires-python = ">=3.14"
dependencies = [
    # inifix is a tiny, 0-deps package of mine.
    # 6.1.1 is almost a year old but 6.1.2 was published a couple days ago
    "inifix>=6.1.1",
]

[tool.uv]
exclude-newer = "1 week"

tox.ini

[tox]
envlist =
    py314,-pre
requires =
    tox-uv

[testenv]
setenv =
    pre: UV_EXCLUDE_NEWER = 0day # allow latest versions with no cooldown period. Also a security pun.
commands =
    {list_dependencies_command}

abridged logs

❯ tox -e py314-pre             
(...)
py314-pre: commands[0]> .tox/.tox/bin/uv --color never pip freeze
Using Python 3.14.3 environment at: .tox/py314-pre
inifix==6.1.2
test @ file:///private/tmp/test/.tox/.tmp/package/1/test-0.1.0.tar.gz
  py314-pre: OK (2.32=setup[2.31]+cmd[0.01] seconds)
  congratulations :) (2.34 seconds)

I got inifix 6.1.2, proving that everything is behaving as I'd expect. This means that the issue I ran into only shows up in a more complex scenario, and might still be a bug in uv. I'll try to refine this later.

@neutrinoceros
Copy link
Copy Markdown
Contributor Author

some progress on this: it looks like tox isn't invalidating its own cache on edits to tox.ini (at least not all of them. I'll still assume it behaves as expected if I change deps, extras or dependency_groups settings). Now the question becomes: are we caching tox envs in CI ?

@neutrinoceros
Copy link
Copy Markdown
Contributor Author

yes we are: #18835 (I forgot the specifics of this PR)

@neutrinoceros
Copy link
Copy Markdown
Contributor Author

except... that's not the whole story yet. The failing job is running on Circle CI, whose config wasn't updated in #18835

@neutrinoceros
Copy link
Copy Markdown
Contributor Author

... and I don't think we're caching any dependency on this service.
To be specific, we're not using save_cache

@neutrinoceros
Copy link
Copy Markdown
Contributor Author

(still, I reported tox-dev/tox#3917 to clear the air)

@neutrinoceros
Copy link
Copy Markdown
Contributor Author

Keeping an eye out for astral-sh/uv#18839

@neutrinoceros neutrinoceros force-pushed the tst/exclude-newer branch 3 times, most recently from 6ed35b3 to 97f7ee2 Compare April 10, 2026 06:50
@neutrinoceros
Copy link
Copy Markdown
Contributor Author

This is working as expected now. I would have prefered defining a global exclude-newer in [tool.uv] and overriding it with anv env var in select tox envs but this approach didn't work so this will do for now

@neutrinoceros neutrinoceros marked this pull request as ready for review April 10, 2026 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file Extra CI Run cron CI as part of PR no-changelog-entry-needed testing Upstream Action Required Was: Upstream Fix Required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant