Skip to content

Conversation

@radarhere
Copy link
Member

Suggestion for #2071

@hugovk
Copy link
Member

hugovk commented Sep 29, 2018

Will this break existing code? Is it okay to break existing code in this case?

If not, should we have a deprecation warning first?

@radarhere
Copy link
Member Author

I think that this is about explicitly raising an error at when a user performs incorrect behaviour, rather than allowing their incorrect behaviour to produce bugs later on.

In the issue that started this, the user was receiving an error when saving. This just moves the error one step earlier.

The only situation I can think of where we might not want to immediately throw an error is for people writing their own image format plugins - they will now need to assign to self._size rather than self.size. That's a fairly simple change though.

@radarhere
Copy link
Member Author

In light of #3044 (comment), where setting the size directly on a TIFF image is given as a solution, I have changed setting the size of a TIFF image to be only deprecated.

@hugovk
Copy link
Member

hugovk commented Sep 30, 2018

Let's also mention it in the release notes.

@radarhere
Copy link
Member Author

Okay, I've added a commit for release notes.

@hugovk hugovk merged commit 2fa5440 into python-pillow:master Sep 30, 2018
@radarhere radarhere deleted the size branch September 30, 2018 11:36
@hugovk hugovk mentioned this pull request Jan 13, 2019
5 tasks
@hugovk hugovk added the Deprecation Feature that will be removed in the future label Jan 23, 2019
radarhere added a commit to radarhere/Pillow that referenced this pull request May 20, 2022
@radarhere radarhere mentioned this pull request Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Deprecation Feature that will be removed in the future

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants