Repository: PrefectHQ/prefect

Issue:
pip is installing incompatible versions
Current minimal example:
```
conda create -n break python=3.6 -y
source activate break
cd prefect/ # navigate to repo directory
pip install .
```
and you'll see:
```
...
requests 2.20.1 has requirement idna<2.8,>=2.5, but you'll have idna 2.8 which is incompatible.
...
```
because apparently [pip doesn't have a dependency resolver](https://github.com/pypa/pip/issues/988).

Moreover, because each CLI command runs through requirement dependency checks (can we turn this off?), our docker containers / installs are broken.

`idna 2.8` was released [4 hours ago](https://pypi.org/project/idna/#history) as of this writing.

**Possible fixes**:
- We _could_ fix this immediately by including `idna<2.8` in our `requirements`, but this feels like a can of worms --> we shouldn't have to be responsible for dependencies that we don't explicitly rely on and this won't prevent it from happening again in the future
- we could create `environment.yml` files and start using `conda` (which _does_ have a dependency resolver), but this creates some additional burden on us to: 1. we'd need to install miniconda in our docker containers and 2. we'd need some additional testing to make sure our `environment.yml` files stay up to date (integration tests could handle this piece well actually)


Discussion:
Another possible solution raised by @jlowin : investigate using pipfiles
**Proposal**: refactor `requirements.ini` back into a standard `requirements.txt` with `dev-requirements.txt`, etc. for the extras packages.  Then we could: 
1. do `pip install .` in a fresh environment to use `pip` for installations
2. do `conda install --yes --file requirements.txt` followed by `pip install . --no-deps` to let `conda` handle the dependencies
3. any variation of the above with a final `pip install . --no-deps`
4. we _could_, in theory, add a CI job to create the environment in a different way but that might be excessive

Basically the idea here is to setup our package in such a way that users can use their favorite dependency manager.  I think in doing so we can claim this issue is "closed" in the sense that there are easy workarounds (e.g. "use conda") if `pip` breaks again.

**cc:** @jlowin 
Interesting idea. Sad to see `requirements.ini` go but if it helps us solve these problems -- or at least make a promise to users that there is a clean way to solve these problems -- then I'm for it.

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -1,35 +1,21 @@
 # Licensed under LICENSE.md; also available at https://www.prefect.io/licenses/alpha-eula
 
-import configparser
 import sys
 
 from setuptools import find_packages, setup
 
 import versioneer
 
-config = configparser.ConfigParser()
-config.read("requirements.ini")
-
 ## base requirements
-install_requires = ["".join(req) for req in config["base"].items()]
-
-## section dependencies
-includes = {}
-for section in config.sections():
-    includes[section] = config[section].pop("include", "").split(",")
+install_requires = open("requirements.txt").read().strip().split("\n")
+dev_requires = open("dev-requirements.txt").read().strip().split("\n")
 
 extras = {
-    "dev": ["".join(req) for req in config["dev"].items()],
-    "viz": ["".join(req) for req in config["viz"].items()],
-    "templates": ["".join(req) for req in config["templates"].items()],
+    "dev": dev_requires,
+    "viz": ["bokeh >= 0.13.0, < 0.14", "graphviz >= 0.8.3"],
+    "templates": ["jinja2 >= 2.0, < 3.0"],
 }
 
-## process include keyword for related sections
-for section in extras:
-    for other in includes[section]:
-        extras[section] += extras.get(other.strip(), [])
-
-
 if sys.version_info >= (3, 6):
     extras["dev"] += ["black"]
 


Test patch: