Skip to content

fix exact str check#469

Merged
davidism merged 1 commit into3.0.xfrom
str-exact
Oct 8, 2024
Merged

fix exact str check#469
davidism merged 1 commit into3.0.xfrom
str-exact

Conversation

@davidism
Copy link
Copy Markdown
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
@davidism davidism deleted the str-exact branch October 8, 2024 16:23
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant