Skip to content
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

Version 2.0 Compatibility Tracker #624

Open
Dr-Irv opened this issue Apr 3, 2023 · 10 comments · Fixed by #638, #655, #684, #695 or #715
Open

Version 2.0 Compatibility Tracker #624

Dr-Irv opened this issue Apr 3, 2023 · 10 comments · Fixed by #638, #655, #684, #695 or #715

Comments

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Apr 3, 2023

This is the list of things that are in pandas 2.0 release notes that need to be addressed in pandas-stubs. PR's welcome. If you do a PR, check off the item and put a link to the PR that closed it. One PR can address multiple issues.

Some of these may already have been taken care of, so if so, check them off and indicate with a comment such as "previously complete"

@gandhis1
Copy link
Contributor

gandhis1 commented Apr 3, 2023

Is the cut-off for removal of support for 1.5 effectively immediately? For instance, there are bugs constantly being fixed in the annotations, and so I currently stay up-to-date on the version. However I don't know if I'll be able to easily upgrade to 2.0 without breaking anything, and so I'd probably defer that upgrade. It seems 2.0 brings a fair amount of backwards-incompatible changes.

@Dr-Irv
Copy link
Collaborator Author

Dr-Irv commented Apr 3, 2023

Is the cut-off for removal of support for 1.5 effectively immediately? For instance, there are bugs constantly being fixed in the annotations, and so I currently stay up-to-date on the version. However I don't know if I'll be able to easily upgrade to 2.0 without breaking anything, and so I'd probably defer that upgrade. It seems 2.0 brings a fair amount of backwards-incompatible changes.

Yes. The idea is that we want to encourage people to use the 2.0 API. I think that the 2.0 stubs (when released) will still work with 1.5 code, and, if not, they are telling you places in your code that you should change in order to be compatible with 2.0 in the future.

As an example, anything that was deprecated in 1.5 was already removed from the stubs.

Dr-Irv pushed a commit that referenced this issue Apr 12, 2023
…nt to `Series.add_suffix(), DataFrame.add_suffix(), Series.add_prefix() and DataFrame.add_prefix()` (#638)

* added arguments

* changed axis parameters

* req changes and created a different overload and corrected index args

* creating overloads

* Update frame.pyi

* corrected diff overload args

* added the tests

* corrected the tests

* Update test_series.py
@Dr-Irv Dr-Irv reopened this Apr 12, 2023
@Dr-Irv Dr-Irv reopened this Apr 24, 2023
@ramvikrams
Copy link
Contributor

ramvikrams commented Apr 26, 2023

@Dr-Irv I think i have added the dtype_backend in series.convert_dtypes whch is covered in #655

@Dr-Irv
Copy link
Collaborator Author

Dr-Irv commented Apr 26, 2023

@Dr-Irv I think i have added the dtype_backend in series.convert_dtypes is covered in #655

Thanks. I updated the list.

@ramvikrams
Copy link
Contributor

ramvikrams commented Jun 16, 2023

@Dr-Irv i think you can mark this Added name parameter to IntervalIndex.from_breaks(), IntervalIndex.from_arrays(), IntervalIndex.from_tuples() as completed as the name parameter is already added in these.

@Dr-Irv
Copy link
Collaborator Author

Dr-Irv commented Jun 16, 2023

@Dr-Irv i think you can mark this Added name parameter to IntervalIndex.from_breaks(), IntervalIndex.from_arrays(), IntervalIndex.from_tuples() as completed as the name parameter is already added in these.

Thanks. I've done that update

@caneff
Copy link

caneff commented Sep 8, 2023

What is actually needed to be done to disallow non-keyword arguments? Most of the stubs already have the * in the overloads, is it just a matter of bring in the function def too for those overloaded ones? Lets just use drop as an example.

If so I can take those over.

@Dr-Irv
Copy link
Collaborator Author

Dr-Irv commented Sep 11, 2023

What is actually needed to be done to disallow non-keyword arguments? Most of the stubs already have the * in the overloads, is it just a matter of bring in the function def too for those overloaded ones? Lets just use drop as an example.

If so I can take those over.

It's a mix of using * and /. See https://peps.python.org/pep-0570/#syntax-and-semantics

PR's are welcome. Maybe do one function so we can agree on the approach, then you can expand it to others.

@loicdiridollou
Copy link
Contributor

loicdiridollou commented Dec 1, 2024

I could not find any traces in the most recent stubs of the following:

  • Removed Date parser functions parse_date_time(), parse_date_fields(), parse_all_fields() and generic_parser()
  • Removed Series.array_wrap()
  • Removed the warn keyword in infer_freq()
  • Removed deprecated alias pandas.core.tools.datetimes.to_time
  • Removed argument sort_columns in DataFrame.plot() and Series.plot()
  • Removed arguments squeeze from read_excel()
  • Remove numpy argument from read_json()

The following changes have no impact on the stubs:

  • Default value of dtype in get_dummies() is changed to bool from uint8

@Dr-Irv
Copy link
Collaborator Author

Dr-Irv commented Dec 1, 2024

Thanks @loicdiridollou . I will edit the list accordingly. I created the list by just copying things from the 2.0 release notes, so I'm not surprised that we don't have to deal with all of them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment