From c5bc5c0eefcc7a3ef3f079299898ab7243e9edd6 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Thu, 23 Jan 2020 15:05:16 +0000 Subject: [PATCH 1/6] Fixing a missing type in info.json --- iiif_validator/tests/info_json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iiif_validator/tests/info_json.py b/iiif_validator/tests/info_json.py index 25ee937..3879884 100644 --- a/iiif_validator/tests/info_json.py +++ b/iiif_validator/tests/info_json.py @@ -81,7 +81,7 @@ def run(self, result): self.validationInfo.check('type-is-int: width', type(t['width']), int, result) # extra version 3.0 checks if result.version[0] == "3": - self.validationInfo.check('correct-type', info['type'], "ImageService3", result, "Info.json missing required type of ImageService3.") + self.validationInfo.check('correct-type', 'type' in info and info['type'], "ImageService3", result, "Info.json missing required type of ImageService3.") self.validationInfo.check('license-renamed', 'license' in info, False, result,'license has been renamed rights in 3.0',warning=True) if 'rights' in info: self.validationInfo.check('type-is-uri: rights', info['rights'].startswith('http'), True, result,'Rights should be a single URI from Creative Commons, RightsStatements.org or URIs registered as extensions.') From 085e7ca137e8c33478f251474a0afb4d08f6bfba Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Mon, 27 Jan 2020 13:07:12 +0000 Subject: [PATCH 2/6] Pinning pillow to continue support python 2.x --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 465f48f..8a22d70 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,6 @@ lxml bottle python-magic -pillow +# Versions including 7 don't support python 2.x +pillow<7 mock From bece42dfdeb3c4055e60232a5b8978c3b38440df Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Mon, 27 Jan 2020 13:18:25 +0000 Subject: [PATCH 3/6] Pining Pillow less than 7 if Python 2 --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 7dc6d3d..bcb34ae 100644 --- a/setup.py +++ b/setup.py @@ -43,7 +43,8 @@ long_description=open('README').read(), url='http://github.com/IIIF/image-api', install_requires=[ - "Pillow>=3.2.0", + "Pillow>=3.2.0;python_version=>3.0", + "Pillow<7.0.0;python_version<3.0", "bottle>=0.12.1", "python-magic>=0.4.12", "lxml>=3.7.0" From cdc29bb4d3ef4ebdce2a6efe5ee72469cc127b3b Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Mon, 27 Jan 2020 13:27:42 +0000 Subject: [PATCH 4/6] Trying to upgrade setup tools... --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 14cafd8..c1aa3d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ python: - "3.6" install: - pip install tox tox-travis coveralls + - pip install setuptools -U - python setup.py install script: - tox From a26caa7db3392400348be6b17b494bf5f1fca3d2 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Mon, 27 Jan 2020 13:33:39 +0000 Subject: [PATCH 5/6] Trying another method of handling different versions of Pillow --- setup.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index bcb34ae..82cb4ff 100644 --- a/setup.py +++ b/setup.py @@ -43,11 +43,13 @@ long_description=open('README').read(), url='http://github.com/IIIF/image-api', install_requires=[ - "Pillow>=3.2.0;python_version=>3.0", - "Pillow<7.0.0;python_version<3.0", "bottle>=0.12.1", "python-magic>=0.4.12", "lxml>=3.7.0" ], + extras_require={ + ':python_version>="3.0"': ["Pillow>=3.2.0"], + ':python_version<"3.0"': ["Pillow<7.0.0"], + }, test_suite="tests", tests_require=["mock"]) From f47d818f805d0d4af4d3c30c8c523f6e8207abc4 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Mon, 27 Jan 2020 13:41:52 +0000 Subject: [PATCH 6/6] Fix syntax for python 2.x --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 82cb4ff..32f945b 100644 --- a/setup.py +++ b/setup.py @@ -49,7 +49,7 @@ ], extras_require={ ':python_version>="3.0"': ["Pillow>=3.2.0"], - ':python_version<"3.0"': ["Pillow<7.0.0"], + ':python_version<"3.0"': ["Pillow==6.2.2"], }, test_suite="tests", tests_require=["mock"])