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

Fix IFDRational __eq__ bug #4888

Merged
merged 6 commits into from Aug 28, 2020

Conversation

radarhere
Copy link
Member

Variation on #4813

At the moment,

from PIL.TiffImagePlugin import IFDRational
print(IFDRational(2,2) == IFDRational(2, 2))  # False

This also causes problems in im._getexif(). The changes in this PR fix that.

#4813 has that fix, as well as making IFDRational(1, 0) == IFDRational(1, 0). I'm not convinced of that part, since standard behaviour dictates that NaN != NaN. So this PR removes the NaN change, to try and get the less controversial part merged in at least.

@radarhere radarhere merged commit 9b86da9 into python-pillow:master Aug 28, 2020
@radarhere radarhere deleted the bugfix/ifdrational-equality branch August 28, 2020 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants