Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract METADATA reading into a crate #7231

Merged
merged 3 commits into from
Sep 10, 2024
Merged

Conversation

konstin
Copy link
Member

@konstin konstin commented Sep 9, 2024

This is preparatory work for the upload functionality, which needs to read the METADATA file and attach its parsed contents to the POST request: We move finding the .dist-info from install-wheel-rs and uv-client to a new uv-metadata crate, so it can be shared with the publish crate.

I don't properly know if its the right place since the upload code isn't ready, but i'm PR-ing it now because it already had merge conflicts.

@konstin konstin added the internal A refactor or improvement that is not user-facing label Sep 9, 2024
@konstin konstin force-pushed the konsti/split-out-uv-metadata branch 4 times, most recently from 90d43a4 to 9270c60 Compare September 9, 2024 20:44
This is preparatory work for the upload functionality, which needs to read the METADATA file and attach its parsed contents to the POST request: We move finding the `.dist-info` from `install-wheel-rs` and `uv-client` to a new `uv-metadata` crate, so it can be shared with the publish crate.

This isn't properly ready since the upload code isn't ready, but i'm PR-ing it now because it already had merge conflicts.
Comment on lines -2622 to +2626
error: Failed to read `foo @ file://[TEMP_DIR]/foo-1.2.3-not-compatible-wheel.whl`
Caused by: Failed to unzip wheel: foo-1.2.3-not-compatible-wheel.whl
Caused by: unable to locate the end of central directory record
× No solution found when resolving dependencies:
╰─▶ Because foo has an invalid package format and you require foo, we can conclude that your requirements are unsatisfiable.

hint: The structure of foo was invalid:
Failed to read from zip file
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a regression from the pervious error message, but fixing it requires propagating changes through a bunch of error types so i'll be following up next week.

@konstin konstin enabled auto-merge (squash) September 10, 2024 13:27
@konstin konstin merged commit 2b3890f into main Sep 10, 2024
33 checks passed
@konstin konstin deleted the konsti/split-out-uv-metadata branch September 10, 2024 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal A refactor or improvement that is not user-facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants