Repository: dask/distributed

Issue:
distributed 2.0.0 is installed in a python 2 environment
Doing a simple `pip install dask distributed` results in the following:

```
Successfully built distributed
ERROR: distributed 2.0.0 has requirement dask>=2, but you'll have dask 1.2.2 which is incompatible.
Installing collected packages: dask, cloudpickle, msgpack, sortedcontainers, tblib, toolz, heapdict, zict, distributed
Successfully installed cloudpickle-1.2.1 dask-1.2.2 distributed-2.0.0 heapdict-1.0.0 msgpack-0.6.1 sortedcontainers-2.1.0 tblib-1.4.0 toolz-0.9.0 zict-1.0.0
```
I think the metadata on `distributed 2.0.0` is not set correctly since it is still installed although it seems incompatible 


Discussion:
Ahh whoops. So what do we do now? First we'll need to fix master by setting a `python_requires` in setup.py. But how do we fix what's released?

IIRC, Django did the same thing. I'll see what I can find.
https://stackoverflow.com/a/47692662

https://code.djangoproject.com/ticket/28878

So right now, as a user, you can do 

```
# requirements.txt
distributed>=1.28,<2.0; python_version<"3.5"
distributed>=2.0; python_version>="3.5"
```
https://github.com/dask/distributed/pull/2806 fixes things going forward.

I'm not sure there's anything we can do about the bad package out on PyPI. I think you'll have to pin `distributed<2` in your requirements.txt The PyPI admins updated the metadata for Django, but it's the internet and people complained.

At least after https://github.com/dask/distributed/pull/2806 you'll get a failure at install time, rather than when attempting to import distributed.
Is deleting the 2.0.0 release an option after 2.0.1 was uploaded? Or maybe a [post release](https://www.python.org/dev/peps/pep-0440/#post-releases)? No idea how pip would interpret a post release.
Deleting is generally frowned upon.

Would a post release fix the install for python 2 users? Or would pip see that distributed 2.0.0 (not post) allegedly supports Py2, and install that?

> On Jun 26, 2019, at 07:04, Christoph Paulik <notifications@github.com> wrote:
> 
> Is deleting the 2.0.0 release an option after 2.0.1 was uploaded? Or maybe a post release? No idea how pip would interpret a post release.
> 
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub, or mute the thread.

> Would a post release fix the install for python 2 users? Or would pip see that distributed 2.0.0 (not post) allegedly supports Py2, and install that?

My guess is that pip would download the 2.0.0 release.

Personally I'm fine with deleting the old file.  We've (I've) done this before when we botched a release.
Personally my inclination is to add a `python_requires` keyword, republish, and then delete the old file.

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -23,9 +23,10 @@
     version=versioneer.get_version(),
     cmdclass=versioneer.get_cmdclass(),
     description="Distributed scheduler for Dask",
-    url="https://distributed.readthedocs.io/en/latest/",
+    url="https://distributed.dask.org",
     maintainer="Matthew Rocklin",
     maintainer_email="mrocklin@gmail.com",
+    python_requires=">=3.5",
     license="BSD",
     package_data={
         "": ["templates/index.html", "template.html"],


Test patch: