Repository: dask/dask

Issue:
Drop Python 3.5 Support
Should we drop Python 3.5 support ?  Looking at the [PyPi Stats](https://pypistats.org/packages/dask) you can see (minor version download plot) that Python 3.5 downloads are quite low compared with 3.6.  3.7 is also low but that is mostly like due to 3.6s popularity.

If we do drop 3.5 support, we should still resolve the following two issues and release a last version with support for 3.5

- [x] https://github.com/dask/dask/issues/5465
- [x] https://github.com/dask/dask/issues/5447


Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -42,13 +42,12 @@
       keywords='task-scheduling parallel numpy pandas pydata',
       classifiers=[
           "Programming Language :: Python :: 3",
-          "Programming Language :: Python :: 3.5",
           "Programming Language :: Python :: 3.6",
           "Programming Language :: Python :: 3.7",
       ],
       packages=packages + tests,
       long_description=open('README.rst').read() if exists('README.rst') else '',
-      python_requires=">=3.5",
+      python_requires=">=3.6",
       install_requires=[],
       setup_requires=setup_requires,
       tests_require=['pytest'],


Test patch:
diff --git a/dask/array/tests/test_array_core.py b/dask/array/tests/test_array_core.py
--- a/dask/array/tests/test_array_core.py
+++ b/dask/array/tests/test_array_core.py
@@ -20,7 +20,6 @@
 import dask.array as da
 import dask.dataframe
 from dask.base import tokenize, compute_as_if_collection
-from dask.compatibility import PY_VERSION
 from dask.delayed import Delayed, delayed
 from dask.utils import ignoring, tmpfile, tmpdir, key_split
 from dask.utils_test import inc, dec
@@ -3813,11 +3812,6 @@ def test_zarr_nocompute():
         assert a2.chunks == a.chunks
 
 
-@pytest.mark.skipif(
-    PY_VERSION < "3.6",
-    reason="Skipping TileDB with python 3.5 because the tiledb-py "
-    "conda-forge package is too old, and is not updatable.",
-)
 def test_tiledb_roundtrip():
     tiledb = pytest.importorskip("tiledb")
     # 1) load with default chunking
@@ -3851,11 +3845,6 @@ def test_tiledb_roundtrip():
         assert a.chunks == tdb.chunks
 
 
-@pytest.mark.skipif(
-    PY_VERSION < "3.6",
-    reason="Skipping TileDB with python 3.5 because the tiledb-py "
-    "conda-forge package is too old, and is not updatable.",
-)
 def test_tiledb_multiattr():
     tiledb = pytest.importorskip("tiledb")
     dom = tiledb.Domain(
diff --git a/dask/bag/tests/test_text.py b/dask/bag/tests/test_text.py
--- a/dask/bag/tests/test_text.py
+++ b/dask/bag/tests/test_text.py
@@ -3,7 +3,6 @@
 
 import dask
 from dask import compute
-from dask.compatibility import PY_VERSION
 from dask.utils import filetexts
 from dask.bytes import utils
 from dask.bag.text import read_text
@@ -38,8 +37,6 @@
 
 @pytest.mark.parametrize("fmt,bs,encoding", fmt_bs_enc)
 def test_read_text(fmt, bs, encoding):
-    if fmt == "zip" and PY_VERSION < "3.6":
-        pytest.skip("zipfile is read-only on py35")
     if fmt not in utils.compress:
         pytest.skip("compress function not provided for %s" % fmt)
     compress = utils.compress[fmt]
diff --git a/dask/bytes/tests/test_compression.py b/dask/bytes/tests/test_compression.py
--- a/dask/bytes/tests/test_compression.py
+++ b/dask/bytes/tests/test_compression.py
@@ -3,14 +3,11 @@
 import pytest
 from fsspec.compression import compr
 
-from dask.compatibility import PY_VERSION
 from dask.bytes.utils import compress
 
 
 @pytest.mark.parametrize("fmt,File", compr.items())
 def test_files(fmt, File):
-    if fmt == "zip" and PY_VERSION < "3.6":
-        pytest.skip("zipfile is read-only on py35")
     if fmt not in compress:
         pytest.skip("compression function not provided")
     if fmt is None:
diff --git a/dask/bytes/tests/test_local.py b/dask/bytes/tests/test_local.py
--- a/dask/bytes/tests/test_local.py
+++ b/dask/bytes/tests/test_local.py
@@ -8,7 +8,6 @@
 from toolz import concat, valmap, partial
 
 from dask import compute
-from dask.compatibility import PY_VERSION
 from dask.utils import filetexts
 from fsspec.implementations.local import LocalFileSystem
 from fsspec.compression import compr
@@ -258,8 +257,6 @@ def test_read_bytes_delimited():
 
 @pytest.mark.parametrize("fmt,blocksize", fmt_bs)
 def test_compression(fmt, blocksize):
-    if fmt == "zip" and PY_VERSION < "3.6":
-        pytest.skip("zipfile is read-only on py35")
     if fmt not in compress:
         pytest.skip("compression function not provided")
     files2 = valmap(compress[fmt], files)
@@ -311,8 +308,6 @@ def test_open_files_text_mode(encoding):
 @pytest.mark.parametrize("mode", ["rt", "rb"])
 @pytest.mark.parametrize("fmt", list(compr))
 def test_open_files_compression(mode, fmt):
-    if fmt == "zip" and PY_VERSION < "3.6":
-        pytest.skip("zipfile is read-only on py35")
     if fmt not in compress:
         pytest.skip("compression function not provided")
     files2 = valmap(compress[fmt], files)
diff --git a/dask/bytes/tests/test_s3.py b/dask/bytes/tests/test_s3.py
--- a/dask/bytes/tests/test_s3.py
+++ b/dask/bytes/tests/test_s3.py
@@ -15,7 +15,6 @@
 from toolz import concat, valmap, partial
 
 from dask import compute
-from dask.compatibility import PY_VERSION
 from dask.bytes.core import read_bytes, open_files
 from s3fs import S3FileSystem as DaskS3FileSystem
 from dask.bytes.utils import compress
@@ -335,8 +334,6 @@ def test_read_bytes_delimited(s3, blocksize):
     "fmt,blocksize", [(fmt, None) for fmt in compr] + [(fmt, 10) for fmt in compr]
 )
 def test_compression(s3, fmt, blocksize):
-    if fmt == "zip" and PY_VERSION < "3.6":
-        pytest.skip("zipfile is read-only on py35")
     if fmt not in compress:
         pytest.skip("compression function not provided")
     s3._cache.clear()
diff --git a/dask/dataframe/io/tests/test_csv.py b/dask/dataframe/io/tests/test_csv.py
--- a/dask/dataframe/io/tests/test_csv.py
+++ b/dask/dataframe/io/tests/test_csv.py
@@ -16,7 +16,6 @@
 import dask
 import dask.dataframe as dd
 from dask.base import compute_as_if_collection
-from dask.compatibility import PY_VERSION
 from dask.dataframe.io.csv import (
     text_blocks_to_pandas,
     pandas_read_text,
@@ -702,8 +701,6 @@ def test_read_csv_sensitive_to_enforce():
 
 @pytest.mark.parametrize("fmt,blocksize", fmt_bs)
 def test_read_csv_compression(fmt, blocksize):
-    if fmt == "zip" and PY_VERSION < "3.6":
-        pytest.skip("zipfile is read-only on py35")
     if fmt not in compress:
         pytest.skip("compress function not provided for %s" % fmt)
     files2 = valmap(compress[fmt], csv_files)