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

Enhance super_len to count encoded bytes for str #6589

Merged
merged 2 commits into from
Feb 23, 2024

Conversation

bruceadams
Copy link
Contributor

This is a possible fix for issue #6586.

I am not at all confident that this is an appropriate change for Requests. All of the unit tests pass locally for me (specifically make ci).

There are two tests here. One demonstrating existing, correct
behavior for `data=bytes`, and another, failing, test for the case
where `data=string` and the string contains multi-byte UTF-8.
src/requests/utils.py Show resolved Hide resolved
@goelbenj
Copy link

@sigmavirus24 would you mind taking at these new changes?

@nateprewitt nateprewitt added this to the 2.32.0 milestone Feb 21, 2024
@sigmavirus24
Copy link
Contributor

closing and re-opening to trigger a new build

Copy link
Member

@nateprewitt nateprewitt left a comment

Choose a reason for hiding this comment

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

I'll leave any final comments and merging to @sigmavirus24 but this looks reasonable to me. Thanks @bruceadams!

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.

4 participants