Open tlambert03 opened 2 days ago
probably related to the hypothetical uv config set
mentioned in https://github.com/astral-sh/uv/pull/8553
Hm. We could write exclude-newer
during uv add
without a uv config set
feature.
that would be cool. I guess the partial "mismatch" there is that the exclude-newer = ...
line that would be added to the config section really doesn't have any association with the specific package that was added with uv add
. And if someone wanted to "repin" the exclude-newer
date to the current date, they would need to pick an existing package to re-add it just so that they could add the --exclude-newer
flag, right? Do you agree that it's a bit of a conceptual mismatch?
I don't think uv add --exclude-newer
applies the exclusion to a single package — I think that option is global to the resolution. It's possible the behavior is different when we're reading a previous resolution from the lockfile, but I'm not sure.
cc @charliermarsh who is likely to know how that interacts
I don't think uv add --exclude-newer applies the exclusion to a single package — I think that option is global to the resolution.
that's exactly my point. and that's why i'm suggesting that it would be a little bit of an awkward/misleading solution
Apologies if I missed an existing feature: I love the
exclude-newer
feature and wonder where there is a convenience to programmatically populate the exclude-newer field with the "current" timestamp:(something to save looking up the current timestamp and manually editing the file). Looks like using something like
uv add --script myscript.py --exclude-newer "2023-10-16T00:00:00Z" some-package
doesn't add the tool.uv sectionedit: to clarify, I'm looking for some command:
that would add
exclude-newer = <NOW>
to the target