Open hauntsaninja opened 2 weeks ago
I guess two liner because it would probably need to be under [tool.uv]
You should already be able to do this!
Yeah I believe this works:
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "flask",
# ]
#
# [tool.uv]
# exclude-newer = "2023-03-25T00:00:00Z"
# ///
e.g.
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "httpx",
# ]
#
# [tool.uv]
# exclude-newer = "2022-07-17T00:00:00Z"
# ///
gives
+ anyio==3.6.1
+ certifi==2022.6.15
+ h11==0.12.0
+ httpcore==0.15.0
+ httpx==0.23.0
+ idna==3.3
+ rfc3986==1.5.0
+ sniffio==1.2.0
and without
+ anyio==4.4.0
+ certifi==2024.7.4
+ h11==0.14.0
+ httpcore==1.0.5
+ httpx==0.27.0
+ idna==3.8
+ sniffio==1.3.1
Ah, I should have tried it! https://github.com/astral-sh/uv/pull/6562 adds some things that would be useful :-)
This would be a one liner you could add that to make most scripts 99% reproducible using uv's awesome
--exclude-newer