You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 303df4f
Browse filesBrowse the repository at this point in the historyBrowse files
Fix exclude-newer handling when dists for the same package straddle the cutoff (#21539)
## Summary
Apply `exclude-newer` before build and binary settings so files uploaded
after the cutoff are recognised as excluded. Previously, `--no-build` or
`--only-binary` could make a post-cutoff sdist look merely
build-disabled; `--no-binary` could do the same for a wheel. Their
hashes could then appear in generated requirements, or the files and
hashes could be included in lockfiles.
Existing lockfiles containing affected dists may change when regenerated
with `uv lock --refresh`.
I was unaware that it was a bug that we emit hashes for the
`no-build`/`no-binary` cases so I preserved them. But this PR doesn't
majorly conflict with that fix.
> **Note**: There are separate commits for ease of review.
## Test Plan
I added some additional stuff to the test context and packse to make it
easier to test this without needing to rely on PyPI or using horrific
mock messes.
There are two new tests which cover the two variations of the issue.
/// The Simple API index URL (e.g., `http://127.0.0.1:PORT/simple/`).
@@ -121,6 +123,15 @@ impl PackseServer {
121
123
pubfnfile_url(&self,filename:&str) -> String{
122
124
format!("{}/files/{filename}",self.server.url())
123
125
}
126
+
127
+
/// Return the filename and advertised SHA-256 digest of each distribution.
0 commit comments