Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Run tests with Python 3.5.0 (#4518)

Adrián Chaves36c3c9713e59
diff --git a/.travis.yml b/.travis.yml
index bcbf75a43..d6ec88e06 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -17,12 +17,16 @@ matrix:
python: 3.7 # Keep in sync with .readthedocs.yml
- env: TOXENV=pypy3
- - env: TOXENV=py
- python: 3.5
- env: TOXENV=pinned
+ python: 3.5.1
+ dist: trusty
+ - env: TOXENV=asyncio
+ python: 3.5.1 # We use additional code to support 3.5.3 and earlier
+ dist: trusty
+ - env: TOXENV=py
python: 3.5
- env: TOXENV=asyncio
- python: 3.5.2
+ python: 3.5 # We use specific code to support >= 3.5.4, < 3.6
- env: TOXENV=py
python: 3.6
- env: TOXENV=py
diff --git a/README.rst b/README.rst
index ce5973bcd..fd84e127e 100644
--- a/README.rst
+++ b/README.rst
@@ -40,7 +40,7 @@ including a list of features.
Requirements
============
-* Python 3.5+
+* Python 3.5.1+
* Works on Linux, Windows, macOS, BSD
Install
diff --git a/docs/faq.rst b/docs/faq.rst
index 75a0f4864..936f315b3 100644
--- a/docs/faq.rst
+++ b/docs/faq.rst
@@ -69,7 +69,7 @@ Here's an example spider using BeautifulSoup API, with ``lxml`` as the HTML pars
What Python versions does Scrapy support?
-----------------------------------------
-Scrapy is supported under Python 3.5+
+Scrapy is supported under Python 3.5.1+
under CPython (default Python implementation) and PyPy (starting with PyPy 5.9).
Python 3 support was added in Scrapy 1.1.
PyPy support was added in Scrapy 1.4, PyPy3 support was added in Scrapy 1.5.
diff --git a/docs/intro/install.rst b/docs/intro/install.rst
index 6356e0eea..4af80d801 100644
--- a/docs/intro/install.rst
+++ b/docs/intro/install.rst
@@ -7,7 +7,7 @@ Installation guide
Installing Scrapy
=================
-Scrapy runs on Python 3.5 or above under CPython (default Python
+Scrapy runs on Python 3.5.1 or above under CPython (default Python
implementation) and PyPy (starting with PyPy 5.9).
If you're using `Anaconda`_ or `Miniconda`_, you can install the package from
diff --git a/tests/test_proxy_connect.py b/tests/test_proxy_connect.py
index 4763a5417..eb4ecc91d 100644
--- a/tests/test_proxy_connect.py
+++ b/tests/test_proxy_connect.py
@@ -4,6 +4,7 @@ import re
import sys
from subprocess import Popen, PIPE
from urllib.parse import urlsplit, urlunsplit
+from unittest import skipIf
import pytest
from testfixtures import LogCapture
@@ -56,6 +57,8 @@ def _wrong_credentials(proxy_url):
return urlunsplit(bad_auth_proxy)
+@skipIf(sys.version_info < (3, 5, 4),
+ "requires mitmproxy < 3.0.0, which these tests do not support")
class ProxyConnectTestCase(TestCase):
def setUp(self):
@@ -80,7 +83,7 @@ class ProxyConnectTestCase(TestCase):
yield crawler.crawl(self.mockserver.url("/status?n=200", is_secure=True))
self._assert_got_response_code(200, log)
- @pytest.mark.xfail(reason='Python 3.6+ fails this earlier', condition=sys.version_info.minor >= 6)
+ @pytest.mark.xfail(reason='Python 3.6+ fails this earlier', condition=sys.version_info >= (3, 6))
@defer.inlineCallbacks
def test_https_connect_tunnel_error(self):
crawler = get_crawler(SimpleSpider)