pandas icon indicating copy to clipboard operation
pandas copied to clipboard

DEPR: List of deprecations to be removed in 3.0

Open datapythonista opened this issue 2 years ago • 21 comments

xref #30228

When opening a PR that introduces a deprecation (starts warning), please add it to this list, so we know what needs to be fully deprecated when releasing pandas 3.0.

2.0

  • [x] #48454
  • [x] #48735
  • [x] #50176
  • [x] #50178
  • [x] #50196
  • [x] #50235
  • [x] #50769
  • [x] #50227
  • [x] #50225
  • [x] #50243
  • [x] #50483
  • [x] #50676
  • [x] #51182
  • [x] #51042
  • [x] #51019
  • [x] #51221
  • [x] #51206
  • [x] #52071
  • [x] #50947

2.1

  • [x] #51539
  • [x] #51477
  • [x] #51697
  • [x] #51395
  • [x] #51703
  • [x] #51756
  • [x] #51811
  • [x] #51968
  • [x] #52003
  • [x] #52257
  • [x] #52268
  • [x] #52333
  • [x] #52364
  • [x] #52459 (change behavior)
  • [x] #53419
  • [x] #53325
  • [x] #53493
  • [x] #53607
  • [x] #53638
  • [x] #53492 (closed by #58039)
  • [x] #53571 (closed by #57136)
  • [x] #53557
  • [x] #53409
  • [x] #53710
  • [x] #53830
  • [x] #53805
  • [x] #53671
  • [x] #53994
  • [x] #53975
  • [x] #53956
  • [x] #53974
  • [x] #52532
  • [x] #53817
  • [x] #53809
  • [ ] #52788 (remove keepdims check inside blk_func in DataFrame._reduce)
  • [x] #54170
  • [ ] #53511
  • [x] #54226
  • [ ] #54219
  • [x] #54014
  • [ ] #53338
  • [x] #54397
  • [x] #54599
  • [x] #54601
  • [x] #54597
  • [x] #54613
  • [x] #54605
  • [x] #54155
  • [x] #54612
  • [x] #54632
  • [x] #54631
  • [x] #54663
  • [x] #54634
  • [x] #54630
  • [x] #54704
  • [x] #54703
  • [x] #54818
  • [x] #54061
  • [x] #53656
  • [ ] #54950
  • [x] #54710
  • [x] #54261
  • [x] #55044
  • [x] #55313
  • [x] #55252
  • [ ] #54939
  • [x] #55466
  • [x] #55479
  • [x] #55439
  • [ ] #55496
  • [x] #55448
  • [ ] #55355
  • [ ] #52419
  • [ ] #55636
  • [ ] #55553
  • [x] #55734
  • [x] #53769
  • [ ] #55792
  • [x] #55868
  • [x] #55940
  • [x] #55963
  • [x] #55719
  • [ ] #55978
  • [x] #56038
  • [ ] #56050
  • [ ] #56055
  • [ ] #55139
  • [x] #56036
  • [ ] #56092
  • [x] #56161 (closed by #58009)
  • [x] #56149
  • [x] #56054
  • [x] #56053
  • [x] #55895
  • [x] #55856 (closed by #58003)
  • [x] #56237
  • [ ] #55703
  • [x] #55257
  • [ ] #56385
  • [ ] #56427
  • [x] #56421 (closed by #58047)
  • [ ] #56102
  • [ ] #56489
  • [ ] #55968
  • [x] #56521
  • [x] #56556
  • [x] #56558 (closed by #58005)
  • [ ] #56569
  • [ ] #56557
  • [x] #56043 (closed by #58004)
  • [ ] #56244
  • [x] #56594
  • [x] #53496

2.2

  • [ ] #56910

datapythonista avatar Jan 05 '23 05:01 datapythonista

#50052 should not be om this list, it is part of the pandas 1.x -> 2.0 cleanup process.

topper-123 avatar Jan 15 '23 01:01 topper-123

Likewise #49560.

EDIT: ive removed both of them from the list.

topper-123 avatar Jan 15 '23 01:01 topper-123

Could you add this one to the list please?: DEPR: Series.first() and DataFrame.first() #53419 @datapythonista

DeaMariaLeon avatar Jun 02 '23 09:06 DeaMariaLeon

I've added it, thanks @DeaMariaLeon.

More generally, I can see several deprecatons in the pulse that have not been added, e.g. #52986 & #52981. To my knowledge all deprecations should be added to the list, or has that changed?

topper-123 avatar Jun 03 '23 06:06 topper-123

@pandas-dev/pandas-core, looks like we need to be more mindful of adding deprecations to this list. Or is there an alternative method of knowing which deprecations have been done?

topper-123 avatar Jun 07 '23 16:06 topper-123

There was supposed to be a job that @phofl created that would update the OP https://github.com/pandas-dev/pandas/blob/main/.github/workflows/deprecation-tracking-bot.yml

Has it not been working recently?

mroeschke avatar Jun 07 '23 16:06 mroeschke

I don't think it ever worked except on his repo for some reason. Looks like there was a permissions issue somewhere.

Here's the log of a recent run https://github.com/pandas-dev/pandas/actions/runs/5195752658/jobs/9368776352

lithomas1 avatar Jun 07 '23 16:06 lithomas1

Ok, here's my best guess to what's going wrong.

So Github typically restricts the types of perms a workflow can get if it comes from a fork (you get downgraded to read access). https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs#:~:text=permissions%3A%20%7B%7D-,You%20can%20use%20the%20permissions%20key%20to%20add%20and%20remove%20read,more%20information%2C%20see%20%22Managing%20GitHub%20Actions%20settings%20for%20a%20repository.%22,-Example%3A%20Assigning%20permissions

When Patrick tested his code on his fork, he opened a PR from a branch within the fork, so the PR was able to get write perms since it came from the same repo. However, when we PR to the main pandas repo, we do it from our forks, not from branches in the main repo, triggering the permissions downgrade.

I think the solution is to run the workflow with a push trigger, not a pull_request trigger, since only pull_request triggers the permission downgrade.

Probably need https://docs.github.com/en/rest/commits/commits?apiVersion=2022-11-28#list-pull-requests-associated-with-a-commit to map the commit back to the original PR.

I'll try to have something up soonish.

lithomas1 avatar Jun 07 '23 16:06 lithomas1

It works 🎉 ! (Bot added #53493)

One thing to keep in mind though is that adding the "Deprecate" label is necessary to trigger the bot. (It doesn't trigger when the commit message/PR title has "DEPR" in it).

I've added #53607 manually, hopefully there's not anything else missing.

lithomas1 avatar Jun 12 '23 23:06 lithomas1

Thx for fixing the bot!

phofl avatar Jun 13 '23 06:06 phofl

@natmokval can you check off the boxes above that you have already handled. i think you've done a bunch of them

jbrockmendel avatar Mar 29 '24 02:03 jbrockmendel

@natmokval can you check off the boxes above that you have already handled. i think you've done a bunch of them

thanks @jbrockmendel. I tried to check the boxes off, but it didn't work. Maybe I don't have permissions to do it.

natmokval avatar Mar 29 '24 22:03 natmokval

@natmokval - that's surprising, I would think triage permissions would allow you to edit any comment. Are you able to edit this comment?

In the meantime, you could list the PRs to be checked off in a comment here and someone else can update the OP.

rhshadrach avatar Mar 30 '24 11:03 rhshadrach

darn, thanks for taking a look.

jbrockmendel avatar Mar 30 '24 14:03 jbrockmendel

@natmokval - that's surprising, I would think triage permissions would allow you to edit any comment. Are you able to edit this comment?

no, I can't edit this comment. I am allowed to edit only my comments.

In the meantime, you could list the PRs to be checked off in a comment here and someone else can update the OP.

thanks, @rhshadrach. Here the list of PR’s to be checked off:

  • [x] #53638
  • [x] #55479
  • [x] #55252
  • [x] #53557
  • [x] #54014

I noticed a couple of missing PRs, which are need to be checked off too:

  • [x] #50947
  • [x] #54061

the follow PR is also not on the list:

  • [ ] #53496

but I am not finished with the removal yet.

natmokval avatar Mar 31 '24 20:03 natmokval

Thanks @natmokval - I've checked off all PRs.

I noticed a couple of missing PRs, which are need to be checked off too:

  • [x] #50947
  • [x] #54061

The 2nd I found in the OP list, however I did not find the first. Should it be added?

rhshadrach avatar Mar 31 '24 23:03 rhshadrach

Thanks @natmokval - I've checked off all PRs.

thanks @rhshadrach.

I noticed a couple of missing PRs, which are need to be checked off too:

The 2nd I found in the OP list, however I did not find the first. Should it be added?

yes, I think we should add the first PR in the OP list in 2.0 section. I enforced this deprecation in #58029.

natmokval avatar Apr 01 '24 21:04 natmokval

Thanks @natmokval - done.

rhshadrach avatar Apr 02 '24 02:04 rhshadrach

@rhshadrach there are a few more that need to be checked off (correct me if I'm wrong):

enforced by #57425

by #58314 and #58060 respectively

by #57971

also by #57971

by #58053

by #57425

I can't find where, but I think this has been enforced

by #57999

by #58125

by #58059

Should be removed from the list, was reverted in #56481

by #57966

Aloqeely avatar Apr 23 '24 13:04 Aloqeely

Thanks @Aloqeely! Updated the OP.

I also removed https://github.com/pandas-dev/pandas/pull/52477 from the list. That needs to be made a FutureWarning before we can enforce the deprecation.

rhshadrach avatar May 11 '24 11:05 rhshadrach

Here is the list of PR’s enforced by CLN: enforce deprecation of frequencies deprecated for offsets #57986:

  • [x] #56092
  • [x] #55978
  • [x] #56050
  • [x] #55496
  • [x] #55792
  • [x] #55553

@rhshadrach, could you please check them off?

  • [ ] #56910

should not be on this list, because it is not a deprecation. This PR is s a correction ValueError to FutureWarning. Could you please remove this PR from the list?

natmokval avatar Jun 28 '24 07:06 natmokval

Thanks @DeaMariaLeon - done.

rhshadrach avatar Jul 14 '24 11:07 rhshadrach