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

fix exact str check #469

Merged
merged 1 commit into from
Oct 8, 2024
Merged

fix exact str check #469

merged 1 commit into from
Oct 8, 2024

Conversation

davidism
Copy link
Member

@davidism davidism commented Oct 8, 2024

escape checked if o.__class__ is str to skip a cast/copy str(o). However, proxy types that forward attribute access on to the proxied value would report o.__class__ as str, even though they were still the proxy class. This caused the C speedups to fail since they expected to be working with str data at that point. Use type(o) is str instead, which can't be affected by proxies.

fixes #467

@davidism davidism added this to the 3.0.1 milestone Oct 8, 2024
@davidism davidism merged commit 54bb00b into 3.0.x Oct 8, 2024
11 of 12 checks passed
@davidism davidism deleted the str-exact branch October 8, 2024 16:23
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.

1 participant