warehouse icon indicating copy to clipboard operation
warehouse copied to clipboard

`_is_valid_dist_file` doesn't discern where a `PKG-INFO`/`WHEEL` file is in the archive

Open di opened this issue 1 year ago • 0 comments

Noticed in #16703 that _is_valid_dist_file currently checks for PKG-INFO or WHEEL files to be present in a sdist or wheel, but doesn't validate where they are in the archive, so putting any file with a matching name anywhere in the archive will allow it to pass.

Our tests currently place these at the root of the archive, but they should actually be within a specific top-level directory for both file types, and validation should fail if they exist but aren't in that directory.

di avatar Sep 12 '24 22:09 di