From 333d4c91fb998b4f7f8a9e184e73715c33a38ce9 Mon Sep 17 00:00:00 2001 From: Konstantin Lopuhin Date: Sun, 24 Jan 2016 22:52:50 +0300 Subject: [PATCH 1/3] py3: add boto to py3 test requirements, test_pipeline_files and test_pipeline_images passing now --- tests/py3-ignores.txt | 2 -- tests/requirements-py3.txt | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/py3-ignores.txt b/tests/py3-ignores.txt index 70d3fb905..212f40f23 100644 --- a/tests/py3-ignores.txt +++ b/tests/py3-ignores.txt @@ -1,7 +1,5 @@ tests/test_exporters.py tests/test_linkextractors_deprecated.py -tests/test_pipeline_files.py -tests/test_pipeline_images.py tests/test_proxy_connect.py tests/test_spidermiddleware_httperror.py diff --git a/tests/requirements-py3.txt b/tests/requirements-py3.txt index 5cf786a89..73e73e651 100644 --- a/tests/requirements-py3.txt +++ b/tests/requirements-py3.txt @@ -4,6 +4,7 @@ pytest-cov testfixtures jmespath leveldb +boto # optional for shell wrapper tests bpython ipython From 097082cffa0a9f11f72a3cee4d8941b7c2566538 Mon Sep 17 00:00:00 2001 From: Konstantin Lopuhin Date: Sun, 24 Jan 2016 23:05:23 +0300 Subject: [PATCH 2/3] reviewed py3 compat in pipelines/images.py and pipelines/files.py --- tests/py3-ignores.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/py3-ignores.txt b/tests/py3-ignores.txt index 212f40f23..eb2cc4f5a 100644 --- a/tests/py3-ignores.txt +++ b/tests/py3-ignores.txt @@ -11,8 +11,6 @@ scrapy/xlib/tx/_newclient.py scrapy/xlib/tx/__init__.py scrapy/core/downloader/handlers/s3.py scrapy/core/downloader/handlers/ftp.py -scrapy/pipelines/images.py -scrapy/pipelines/files.py scrapy/linkextractors/sgml.py scrapy/linkextractors/regex.py scrapy/linkextractors/htmlparser.py From 1be90323c27bfda7588d4437a1996c5e92eb452d Mon Sep 17 00:00:00 2001 From: Konstantin Lopuhin Date: Sun, 24 Jan 2016 23:44:56 +0300 Subject: [PATCH 3/3] py3: properly skip s3 tests on py3 --- tests/test_downloader_handlers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_downloader_handlers.py b/tests/test_downloader_handlers.py index 1eb6192ce..56608bfc6 100644 --- a/tests/test_downloader_handlers.py +++ b/tests/test_downloader_handlers.py @@ -437,6 +437,8 @@ class S3AnonTestCase(unittest.TestCase): import boto except ImportError: skip = 'missing boto library' + if six.PY3: + skip = 'S3 not supported on Py3' def setUp(self): self.s3reqh = S3DownloadHandler(Settings(), @@ -459,6 +461,8 @@ class S3TestCase(unittest.TestCase): import boto except ImportError: skip = 'missing boto library' + if six.PY3: + skip = 'S3 not supported on Py3' # test use same example keys than amazon developer guide # http://s3.amazonaws.com/awsdocs/S3/20060301/s3-dg-20060301.pdf