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

docs(python): Document dropping non-existent column causes Exception now in v1 upgrade guide #18046

Closed

Conversation

DeflateAwning
Copy link
Contributor

Fixes #18045

@DeflateAwning DeflateAwning changed the title docs(python): v1 Upgrade Guide: dropping non-existent column causes Exception now docs(python): v1 Upgrade Guide - dropping non-existent column causes Exception now Aug 5, 2024
@coastalwhite coastalwhite changed the title docs(python): v1 Upgrade Guide - dropping non-existent column causes Exception now docs(python): Document dropping non-existent column causes Exception now in v1 upgrade guide Aug 5, 2024
@github-actions github-actions bot added documentation Improvements or additions to documentation python Related to Python Polars and removed title needs formatting labels Aug 5, 2024
@DeflateAwning
Copy link
Contributor Author

Ready for another review

@coastalwhite
Copy link
Collaborator

LGTM 😄

@stinodego
Copy link
Contributor

stinodego commented Aug 6, 2024

The previous (non-raising) behavior was a bug. So this fix is not a breaking change. It is still available in the full release notes. But it shouldn't be part of the upgrade guide. We have to be a little selective there as the upgrade guide is already extremely long.

@stinodego stinodego closed this Aug 6, 2024
@DeflateAwning
Copy link
Contributor Author

Bug fixes which break code that previously worked are breaking changes. Intending for something to work a certain way does not mean that it works that way. Changing the API for any reason (whether it's considered a bug fix or a feature or a general change in the API) is a breaking change.

v1 was a big change. It makes sense the upgrade guide is long. The ugprade guide is meant to help developers fix their code (or know what to expect) before the breaking changes bite them at runtime.

Selecting which breaking changes are big enough to make it into the upgrade guide makes the upgrade guide much less valuable, and makes me even more afraid of upgrading Polars.

Would you be open to a new PR where I put it in a different section at the bottom or something?

@stinodego
Copy link
Contributor

Bug fixes which break code that previously worked are breaking changes. Intending for something to work a certain way does not mean that it works that way. Changing the API for any reason (whether it's considered a bug fix or a feature or a general change in the API) is a breaking change.

That's your view on things. We have clearly documented our versioning policy here.

@DeflateAwning
Copy link
Contributor Author

The relevant reference (.drop() method at v0.20) doesn't say whether dropping a non-existing column is an error or ignored. Thus, it is a breaking change from the way it works currently, and not a bug fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v1 Upgrade: did df.drop(['column_which_is_not_in_df']) switch from doing nothing to error-ing?
3 participants