-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* release/4.0.2: Bump version to 4.0.2 Do not leak open files after generation Fix `ImageCacheFile.__repr__` to not send signals Make generateimages support pre Django 1.8 versions generateimages: fix taking arguments README - use Python 3 print function In Python 3 files should be opened as binary Fixed #368 use specs directly in ProcessedImageField
- Loading branch information
Showing
11 changed files
with
115 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
__title__ = 'django-imagekit' | ||
__author__ = 'Matthew Tretter, Venelin Stoykov, Eric Eldredge, Bryan Veloso, Greg Newman, Chris Drackett, Justin Driscoll' | ||
__version__ = '4.0.1' | ||
__version__ = '4.0.2' | ||
__license__ = 'BSD' | ||
__all__ = ['__title__', '__author__', '__version__', '__license__'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from nose.tools import assert_false, assert_true | ||
|
||
from .models import Thumbnail | ||
from .utils import create_photo | ||
|
||
|
||
def test_do_not_leak_open_files(): | ||
instance = create_photo('leak-test.jpg') | ||
source_file = instance.original_image | ||
# Ensure the FieldFile is closed before generation | ||
source_file.close() | ||
image_generator = Thumbnail(source=source_file) | ||
image_generator.generate() | ||
assert_true(source_file.closed) | ||
|
||
|
||
def test_do_not_close_open_files_after_generate(): | ||
instance = create_photo('do-not-close-test.jpg') | ||
source_file = instance.original_image | ||
# Ensure the FieldFile is opened before generation | ||
source_file.open() | ||
image_generator = Thumbnail(source=source_file) | ||
image_generator.generate() | ||
assert_false(source_file.closed) | ||
source_file.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters