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

Testing improvements and better Python 3.x support #64

Merged
merged 6 commits into from
Mar 5, 2013

Conversation

kmike
Copy link
Contributor

@kmike kmike commented Feb 26, 2013

No description provided.

…pt exits with an error code in case of failures.
TiffImagePlugin.ImageFileDirectory.__getattr__ is magical because it deletes items from "tagdata" variable and this plays badly with TiffImagePlugin.ImageFileDirectory.__iter__. Under Python 2.x items() returned a list and this wasn't a problem (because __iter__ value was evalued once); under Python 3.x items() returns a view/iterator that chains self.tags and self.tagdata and iteration begins to fail with "RuntimeError: dictionary changed size during iteration" exception because tagdata item is modified.

In this changeset I've tried to fix this by evaluating items() when the loop starts (by casting it to list), so that it doesn't matter if tagdata is changed during iteration or not.

There is no tests because _getexif is currently private. But this method is used by easy-thumbnails and sorl.thumbnails, so I think it is worth fixing it.
@kmike
Copy link
Contributor Author

kmike commented Feb 26, 2013

#15 is more complex than I thought, and the fix above doesn't work.

aclark4life added a commit that referenced this pull request Mar 5, 2013
Testing improvements and better Python 3.x support
@aclark4life aclark4life merged commit 001a152 into python-pillow:master Mar 5, 2013
@aclark4life
Copy link
Member

Thank you!

radarhere pushed a commit that referenced this pull request Dec 18, 2020
radarhere pushed a commit to radarhere/Pillow that referenced this pull request Sep 24, 2023
Rearrange OSX builds due to 2 at a time limit
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.

2 participants