Skip to content

Conversation

jbrockmendel
Copy link
Member

Didn't add a whatsnew note since I'm not sure if the bug is in a released version cc @jorisvandenbossche ?

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

Looks good!

Didn't add a whatsnew note since I'm not sure if the bug is in a released version cc @jorisvandenbossche ?

It's also fixing a bug in the existing nullable string dtype, and we are generally noting bug fixes for the new str dtype as well in the 2.3.x whatsnew. I am planning to backport this, so you can add a note there.
(if it would only have been for the new dtype and targetting 3.0, it would indeed not need a whatsnew note)

arr.searchsorted(b)


def test_mixed_object_comparison(dtype):
Copy link
Member

Choose a reason for hiding this comment

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

Maybe move this to pandas/tests/arrays/string_/test_string.py? (in general this file only contains the generic extension tests, not string-specific ones)

Copy link
Member

Choose a reason for hiding this comment

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

(although it is not actually that string specific, generally all of our dtypes should do this comparison to mixed object dtype? So we could also make this a base extension test. But let's do that later, that might involve more fixes in other (test) EAs which doesn't need to be backported)

Copy link
Member Author

Choose a reason for hiding this comment

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

i started a branch this morning that adds a tests.arithmetic.test_string file. if this is merged, i'll move this test in that branch too

@jorisvandenbossche jorisvandenbossche added Bug Strings String extension data type and string data labels Sep 23, 2025
@jorisvandenbossche jorisvandenbossche added this to the 2.3.3 milestone Sep 23, 2025
@jbrockmendel
Copy link
Member Author

Are we good here? I'd like to follow up with the branch mentioned about refactoring string arithmetic tests.

@jorisvandenbossche jorisvandenbossche merged commit 4ee17b3 into pandas-dev:main Sep 29, 2025
42 checks passed
@jorisvandenbossche
Copy link
Member

Thanks @jbrockmendel!

Copy link

lumberbot-app bot commented Sep 29, 2025

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout 2.3.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 4ee17b39893e20483b6f778ec83384faa39bdd88
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #62424: BUG: String[pyarrow] comparison with mixed object'
  1. Push to a named branch:
git push YOURFORK 2.3.x:auto-backport-of-pr-62424-on-2.3.x
  1. Create a PR against branch 2.3.x, I would have named this PR:

"Backport PR #62424 on branch 2.3.x (BUG: String[pyarrow] comparison with mixed object)"

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 Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

@jorisvandenbossche
Copy link
Member

Manual backport -> #62504

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Strings String extension data type and string data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG (string dtype): comparison of string column to mixed object column fails
2 participants