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

Drop deprecations #2350

Merged
merged 11 commits into from
Aug 7, 2020
Merged

Drop deprecations #2350

merged 11 commits into from
Aug 7, 2020

Conversation

bkamins
Copy link
Member

@bkamins bkamins commented Aug 4, 2020

Fixes #2344

I turn depwarns to errors where it is reasonably easy to do.

@bkamins bkamins added the non-breaking The proposed change is not breaking label Aug 4, 2020
@bkamins bkamins added this to the 1.0 milestone Aug 4, 2020
@bkamins
Copy link
Member Author

bkamins commented Aug 5, 2020

One conclusion I came to is that:

  • functions that we defined, but do not define any more should not have custom deprecations (like melt or aggregate) - as the point of removing deprecations is to free the name space of them in particular, so that the names can be used by users
  • for getindex/setindex/setproperty I leave MethodError for unsupported functionality as writing proper error messages is very complex, the change that we remove deprecation is very old and MethodError actually prints good suggestions (i.e. to use two indices instead of only one)

@bkamins
Copy link
Member Author

bkamins commented Aug 5, 2020

as a special case note that map for GroupedDataFrame CHANGES behavior (which is OK I think).

@bkamins bkamins changed the title WIP: Drop deprecations Drop deprecations Aug 5, 2020
@bkamins bkamins marked this pull request as ready for review August 5, 2020 13:47
@bkamins
Copy link
Member Author

bkamins commented Aug 5, 2020

OK - this is good to have a look at.

Copy link
Member

@quinnj quinnj left a comment

Choose a reason for hiding this comment

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

LGTM; it's nice that a lot of these cases just turn into throw(ArgumentError(... with the same message, so the user is still getting helpful direction.

@bkamins
Copy link
Member Author

bkamins commented Aug 5, 2020

a lot of these cases just turn into throw(ArgumentError(...

Yes, but I did not want to go too crazy with this, and left it where it was natural to leave and did not impact the code in a negative way (in some cases the rules of Julia dispatch made it difficult to preserve, and in 2 cases actually the depwarn was a dead code 😄, as later we made changes that made it impossible to hit that code path).

Copy link
Member

@nalimilan nalimilan left a comment

Choose a reason for hiding this comment

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

Maybe it would be worth leaving a comment to errors that are only there due to deprecations so that we can easily spot and remove them at some point in the future? Without comments, it could be hard to understand why we explicitly check for some unsupported patterns when you don't know the history of the package.

src/abstractdataframe/abstractdataframe.jl Show resolved Hide resolved
src/dataframe/dataframe.jl Show resolved Hide resolved
src/dataframe/dataframe.jl Outdated Show resolved Hide resolved
src/other/index.jl Outdated Show resolved Hide resolved
src/deprecated.jl Show resolved Hide resolved
bkamins and others added 2 commits August 6, 2020 13:16
Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
src/deprecated.jl Outdated Show resolved Hide resolved
src/deprecated.jl Outdated Show resolved Hide resolved
bkamins and others added 2 commits August 6, 2020 19:01
Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
@nalimilan
Copy link
Member

What do you think of the suggestion I made above?

Maybe it would be worth leaving a comment to errors that are only there due to deprecations so that we can easily spot and remove them at some point in the future? Without comments, it could be hard to understand why we explicitly check for some unsupported patterns when you don't know the history of the package.

@bkamins
Copy link
Member Author

bkamins commented Aug 7, 2020

Ah - I do not know why I have missed this. I will add them.

@bkamins
Copy link
Member Author

bkamins commented Aug 7, 2020

added

@bkamins bkamins merged commit cc83566 into JuliaData:master Aug 7, 2020
@bkamins bkamins deleted the drop_deprecations branch August 7, 2020 17:32
@bkamins
Copy link
Member Author

bkamins commented Aug 7, 2020

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
non-breaking The proposed change is not breaking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecations in DataFrames.jl
3 participants