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

Metadata 2.2 and 2.3 #13606

Merged
merged 9 commits into from
Feb 26, 2024
Merged

Metadata 2.2 and 2.3 #13606

merged 9 commits into from
Feb 26, 2024

Conversation

konstin
Copy link
Contributor

@konstin konstin commented May 8, 2023

This is an attempt to finish #11380 and unblock uploading metadata version 2.2 and 2.3, which i'd like to have for maturin and my resolver prototype. I've applied all review comments and added a check that dynamic isn't used <2.2.

Fixes #9660, fixes #11526, closes #11380.

warehouse/forklift/legacy.py Outdated Show resolved Hide resolved
warehouse/packaging/models.py Outdated Show resolved Hide resolved
Copy link
Member

@ewdurbin ewdurbin left a comment

Choose a reason for hiding this comment

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

The only thing I would want to see to call this shippable is a test that exercises the storage/retrieval of Dynamic fields.

I think this could be added to tests.unit.forklift.test_legacy:test_successful_upload or maybe more favorably built out as an additional test tests.unit.forklift.test_legacy:test_successful_upload_metadata_2_3.

Just some assertions of the resulting value of Release.dynamic

Copy link
Member

@ewdurbin ewdurbin left a comment

Choose a reason for hiding this comment

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

Ported outstanding comments from #11380

warehouse/forklift/legacy.py Show resolved Hide resolved
warehouse/forklift/legacy.py Outdated Show resolved Hide resolved
@ewdurbin
Copy link
Member

The only thing I would want to see to call this shippable is a test that exercises the storage/retrieval of Dynamic fields.

I think this could be added to tests.unit.forklift.test_legacy:test_successful_upload or maybe more favorably built out as an additional test tests.unit.forklift.test_legacy:test_successful_upload_metadata_2_3.

Just some assertions of the resulting value of Release.dynamic

Missed that Provides-Extra also needs to be stored. Similarly a test for storage/retrieval of that data would be great to see.

@dstufft
Copy link
Member

dstufft commented May 11, 2023

We probably want to expose this value in the existing JSON API, XMLRPC API, and.. .maybe in the UI? Not sure.

@ewdurbin
Copy link
Member

Hi @konstin, wanted to check in and see if you planned to continue work on this. If not I'm happy to pick it up and continue on with this PR.

@ewdurbin
Copy link
Member

ewdurbin commented May 19, 2023

We probably want to expose this value in the existing JSON API, XMLRPC API, and.. .maybe in the UI? Not sure.

@dstufft, Which value, Provides-Extra?

@dstufft
Copy link
Member

dstufft commented May 19, 2023

Dynamic, and whatever other fields are new

@ewdurbin
Copy link
Member

We probably want to expose this value in the existing JSON API, XMLRPC API, and.. .maybe in the UI? Not sure.

I will implement this in JSON API, but won't touch XMLRPC. There's nowhere we would expose this on the XMLRPC that isn't currently slated for deprecation. If people want programatic access to this data, they should retrieve it from JSON.

I'll give a smol attempt to render it in the web UI, but consider it beyond scope of this PR.

@ewdurbin ewdurbin requested review from ewdurbin, dstufft and di May 20, 2023 13:59
@ewdurbin
Copy link
Member

Low budget display if available on project pages:

low budget

@ewdurbin
Copy link
Member

@di @dstufft @miketheman, this is good for a review pass.

@ewdurbin ewdurbin requested a review from miketheman May 20, 2023 14:44
@ewdurbin ewdurbin dismissed their stale review May 20, 2023 15:17

implemented changes

@konstin
Copy link
Contributor Author

konstin commented May 21, 2023

Sorry for responding so slow and thank you for addressing all the review comments!

@konstin
Copy link
Contributor Author

konstin commented Jul 2, 2023

Should i rebase this?

@di
Copy link
Member

di commented Jul 6, 2023

@konstin Yes please!

@konstin
Copy link
Contributor Author

konstin commented Jul 12, 2023

rebased and updated with the changes from main

warehouse/forklift/legacy.py Outdated Show resolved Hide resolved
warehouse/forklift/legacy.py Outdated Show resolved Hide resolved
warehouse/forklift/legacy.py Outdated Show resolved Hide resolved
warehouse/forklift/legacy.py Outdated Show resolved Hide resolved
warehouse/forklift/legacy.py Outdated Show resolved Hide resolved
warehouse/forklift/legacy.py Outdated Show resolved Hide resolved
warehouse/legacy/api/json.py Show resolved Hide resolved
warehouse/legacy/api/json.py Show resolved Hide resolved
@miketheman miketheman added the awaiting-response PRs and issues that are awaiting author response label Sep 13, 2023
@konstin
Copy link
Contributor Author

konstin commented Oct 12, 2023

Is there a way to tell the linters and formatters (or the make commands in general) to not lint my local .venv?

@konstin
Copy link
Contributor Author

konstin commented Oct 12, 2023

I tried to address all review comments, i had to change some of the suggested changes though to make it work

@miketheman
Copy link
Member

Is there a way to tell the linters and formatters (or the make commands in general) to not lint my local .venv?

Tough to say exactly, since I don't use the same .venv style, as most development happens inside a container. You might want to add a .venv directory entry to https://github.com/pypi/warehouse/blob/main/.dockerignore so that it's not added to the container - give that a shot and if it works, feel free to add that to its own PR.

warehouse/forklift/legacy.py Outdated Show resolved Hide resolved
@di
Copy link
Member

di commented Feb 23, 2024

@konstin FYI, this PR has linting/testing errors (my most recent suggestion above was missing imports).

@miketheman miketheman removed the awaiting-response PRs and issues that are awaiting author response label Feb 23, 2024
konstin and others added 8 commits February 23, 2024 18:47
Co-authored-by: Dustin Ingram <di@users.noreply.github.com>
Co-authored-by: Dustin Ingram <di@users.noreply.github.com>
Co-authored-by: Dustin Ingram <di@users.noreply.github.com>
@konstin
Copy link
Contributor Author

konstin commented Feb 23, 2024

Thanks, i totally missed that CI failure!

Copy link
Member

@di di left a comment

Choose a reason for hiding this comment

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

LGTM, is blocked on merging #15452 first.

@di
Copy link
Member

di commented Feb 26, 2024

Leaving this unmerged a bit longer to give other @pypi/warehouse-committers a chance to review.

@di di merged commit 4532d55 into pypi:main Feb 26, 2024
17 checks passed
@konstin konstin deleted the metadata-2.2-merge branch February 27, 2024 08:22
@konstin
Copy link
Contributor Author

konstin commented Feb 27, 2024

🎉

Thanks for the reviews and guidance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for PEP 685 (Metadata Version 2.3) Support Metadata Version 2.2
8 participants