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

Hash metadata as bytes #9049

Merged
merged 3 commits into from
Mar 2, 2024
Merged

Conversation

thatch
Copy link
Contributor

@thatch thatch commented Feb 27, 2024

Because warehouse doesn't send a charset, this can get decoded as something other than utf-8, which doesn't encode (as utf-8) back to the same bytes. For hash purposes especially, just look at the original bytes.

Pull Request Check List

Resolves: #9048

  • Added tests for changed code.
  • Updated documentation for changed code.

Copy link
Member

@radoering radoering left a comment

Choose a reason for hiding this comment

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

I think we are ok with #9048 (comment)

tests/repositories/conftest.py Outdated Show resolved Hide resolved
thatch and others added 3 commits March 2, 2024 06:51
Because warehouse doesn't send a charset, this can get decoded as something
other than utf-8, which doesn't encode (as utf-8) back to the same bytes.  For
hash purposes especially, just look at the original bytes.
This ensures that it remains bytes the whole way through.
@radoering radoering added the backport/1.8 Backport a PR to 1.8 through an automated PR label Mar 2, 2024
@radoering radoering marked this pull request as ready for review March 2, 2024 06:02
@radoering radoering enabled auto-merge (squash) March 2, 2024 06:02
@radoering radoering merged commit 28d5c00 into python-poetry:main Mar 2, 2024
21 checks passed
poetry-bot bot pushed a commit that referenced this pull request Mar 2, 2024
Because warehouse doesn't send a charset, this can get decoded as something
other than utf-8, which doesn't encode (as utf-8) back to the same bytes. For
hash purposes especially, just look at the original bytes.

(cherry picked from commit 28d5c00)
radoering pushed a commit that referenced this pull request Mar 2, 2024
Because warehouse doesn't send a charset, this can get decoded as something
other than utf-8, which doesn't encode (as utf-8) back to the same bytes. For
hash purposes especially, just look at the original bytes.

(cherry picked from commit 28d5c00)
Copy link

github-actions bot commented Apr 2, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/1.8 Backport a PR to 1.8 through an automated PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PEP 658/714 metadata files incorrectly probe encoding
2 participants