pandas icon indicating copy to clipboard operation
pandas copied to clipboard

Backport #59144 on 2.2.x / 2.3.x (remove ops div class to solve #2137)

Open bnavigator opened this issue 1 year ago • 5 comments
trafficstars

Backport #59144

  • remove core.computation.ops.Div resolves #21374 #58748

  • need to preserve order

  • updating tests

  • ~~update whatsnew~~ // no whatsnew for 2.2.x and 2.3 yet

  • solve mypy issue

  • fixing pytests

  • better than cast

  • adding specific test

  • ~~Update pandas/tests/frame/test_query_eval.py~~ // Not backported, fails on 2.2

  • Update pandas/tests/computation/test_eval.py


  • [x] closes #58548
  • [ ] Tests added and passed if fixing a bug or adding a new feature
  • [ ] All code checks passed.
  • [ ] Added type annotations to new arguments/methods/functions.
  • [ ] Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature. -- no one found for 2.x

bnavigator avatar Aug 17 '24 08:08 bnavigator

@WillAyd - 2.3.x should only have backports related to PDEP-14, is that right?

rhshadrach avatar Aug 25 '24 14:08 rhshadrach

If that's your policy, be advised that the current stable release 2.2 is not and minor release updates of it will never fully work with Numpy 2

bnavigator avatar Aug 25 '24 14:08 bnavigator

There's a few things not required for PDEP-14 that have made their way in just to get the test suite green, but mostly it is for PDEP-14.

We actually haven't started backporting anything yet to 2.3 - the first PR to do so an get that branch up to speed is https://github.com/pandas-dev/pandas/pull/59513

I'll take a look at this particular change as part of that

WillAyd avatar Aug 25 '24 15:08 WillAyd

Thanks @WillAyd - I wouldn't push for this PR to be backported to 2.3, but no objection either.

rhshadrach avatar Aug 25 '24 15:08 rhshadrach

I've actually been wondering about a few of the errors on 2.3 (see https://github.com/pandas-dev/pandas/pull/59513#issuecomment-2305587191) and this appears to address some of them, so I think it will be required (thanks @bnavigator for investigating!)

WillAyd avatar Aug 25 '24 15:08 WillAyd

cc @lithomas1

jorisvandenbossche avatar Sep 12 '24 20:09 jorisvandenbossche

I think this fixes the failures, so going to merge on red.

thanks @bnavigator

lithomas1 avatar Sep 18 '24 12:09 lithomas1

AFAICT most of this has also been used in #59513 by @WillAyd, so now that this one has been merged into 2.2.x, his PR into 2.3.x will probably need adjustments as well. Plus 2.3.x probably needs a forward

bnavigator avatar Sep 18 '24 12:09 bnavigator