-
-
Notifications
You must be signed in to change notification settings - Fork 19.1k
REGR: fix string contains/match methods with compiled regex with flags #62251
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
REGR: fix string contains/match methods with compiled regex with flags #62251
Conversation
# GH#61952 | ||
pat = pat.pattern | ||
if isinstance(pat, str) and not pat.startswith("^"): | ||
if not pat.startswith("^"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This essentially reverts this back to what we had before 2.3.2. This means it won't support compiled regex, but that seems better than only supporting it half-baked (and this is only for ArrowExtensionArray, the ArrowStringArray will fall back). Longer term we should decide on the exact behaviour we want in #62240 and ensure all possible variants behave the same (including ArrowDtype)
But I could also leave it as is (the default string dtype should never get here, as pat
being a compiled regex is handled before getting here)
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
Thanks @jorisvandenbossche |
Manual backport -> #62265 |
Addresses the regression part of #62240, does not yet fix the inconsistencies entirely