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
Changed default frombuffer raw decoder args #1730
Conversation
I know the comment says that this will change post 1.16. Does this improve the functionality? Is this likely to break anyone in the wild? |
My theory is that anyone who has used this previously would have started explicitly listing their arguments, rather than continue to receive the warning. The only improvement I intended was to remove the warning, and allow many users to skip straight to the recommended defaults. If you would like to close this however, in line with the policy of minimal changes, then you should do so. |
I don't know that I want to close it, as much as I'd like to see it fully explored and either ruled out or in. We do want to make minimal changes in some cases; in other cases, we want fix long-standing annoyances not to mention add new features. |
Just to throw out another idea - we could change the default behaviour and update the warning to report that change. |
e36890c
to
f0a08b4
Compare
f1b2f9e
to
a2ebf21
Compare
a2ebf21
to
e72baf3
Compare
e72baf3
to
dd06d0a
Compare
The warning has been there since PIL 1.1.6 (December 3, 2006). The Looking up the original reason for the warning:
def fromstring(self, *args, **kw):
raise NotImplementedError("fromstring() has been removed. "
"Please call frombytes() instead.") Is it still the case that the default args for |
The docs for writing your own file decoder state that
|
dd06d0a
to
f4897b0
Compare
f4897b0
to
175bbee
Compare
How about we update the warning to concretely say: -the frombuffer defaults may change in a future release
+the frombuffer defaults will change in Pillow X And then do the change in version X? Version 7.0.0 isn't a lot of notice, but the warning's been there for ages. |
PR to change the wording to "the frombuffer defaults will change in Pillow 7.0.0": #4086. |
175bbee
to
2f5e24d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to merge once today's release is out.
The comment suggests changing the default values post 1.1.6, so that they are in line with the warning displayed to the user.
Sounds reasonable.