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

feat: support writing metadata #846

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

henryiii
Copy link
Contributor

@henryiii henryiii commented Oct 23, 2024

Working toward #647. Starting by making it possible to go from Metadata back to RFC822.

@brettcannon
Copy link
Member

I don't know if I'm comfortable with the JSON support. I actually almost had it in the first version of the module, but decided against it until we had a standard around it.

@henryiii
Copy link
Contributor Author

Well, it is in PEP 566, so that's why I added it to pyproject-metadata. Though there's no use for it yet, so I can easily drop it.

I'll probably make a PR building on this PR for the next step.

This is starting as a fairly direct copy of pyproject-metadata, adapted for packaging's existing features and with the non-backward compatible changes listed in pypa/pyproject-metadata#140. I've got permission from the original copyright holders in pypa/pyproject-metadata#103 to contribute to packaging under the packaging license.

This PR also has the following changes vs. the original:

  • All metadata keys are lower case, instead of title case. Headers in messages are not case sensitive.
  • The ordering of the keys is based on the ordering in the Metadata class, which is slightly different compared to pyproject-metadata.

@henryiii henryiii force-pushed the henryiii/feat/metadatawrite branch 3 times, most recently from 1774407 to ebfed9f Compare October 24, 2024 03:57
@henryiii henryiii mentioned this pull request Oct 24, 2024
6 tasks
@henryiii
Copy link
Contributor Author

FYI, on the flaking pypy-3.8 (and 3.9, possibly?) test, PyPy doesn't support pypy-3.8 or pypy-3.9 anymore. Only pypy-3.10 is actively supported.

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
@henryiii henryiii force-pushed the henryiii/feat/metadatawrite branch 2 times, most recently from 56a9c70 to 68ff492 Compare October 24, 2024 18:12
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
@henryiii henryiii force-pushed the henryiii/feat/metadatawrite branch from 68ff492 to bc2ab34 Compare October 25, 2024 02:48
@henryiii henryiii marked this pull request as ready for review October 25, 2024 03:09
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
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.

2 participants