We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Futures python module is included in Python3
Insights-core currently installs the [futures module](https://pypi.org/project/futures/) in all cases for the [development] target in [setup.py](https://github.com/RedHatInsights/insights-core/blob/7dc392df90a2535014cc1ec7f5df9c03a9d3d95d/setup.py#L64).  This module is only necessary for Python2 since it is included in Python3.  This is only used in one place in [collect.py](https://github.com/RedHatInsights/insights-core/blob/7dc392df90a2535014cc1ec7f5df9c03a9d3d95d/insights/collect.py#L286).

The `futures` module states:

> It **does not** work on Python 3 due to Python 2 syntax being used in the codebase. Python 3 users should not attempt to install it, since the package is already included in the standard library.

When installed it causes the latest version of `pip` to fail when installing into a virtual environment:

```python
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /home/bfahr/work/insights/insights-core/venv36/bin/python3.6 /home/bfahr/work/insights/insights-core/venv36/lib64/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-vujizkqz/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel
       cwd: None
  Complete output (29 lines):
  Traceback (most recent call last):
    File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
      "__main__", mod_spec)
    File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
      exec(code, run_globals)
    File "/home/bfahr/work/insights/insights-core/venv36/lib64/python3.6/site-packages/pip/__main__.py", line 29, in <module>
      from pip._internal.cli.main import main as _main
    File "/home/bfahr/work/insights/insights-core/venv36/lib64/python3.6/site-packages/pip/_internal/cli/main.py", line 9, in <module>
      from pip._internal.cli.autocompletion import autocomplete
    File "/home/bfahr/work/insights/insights-core/venv36/lib64/python3.6/site-packages/pip/_internal/cli/autocompletion.py", line 10, in <module>
      from pip._internal.cli.main_parser import create_main_parser
    File "/home/bfahr/work/insights/insights-core/venv36/lib64/python3.6/site-packages/pip/_internal/cli/main_parser.py", line 8, in <module>
      from pip._internal.cli import cmdoptions
    File "/home/bfahr/work/insights/insights-core/venv36/lib64/python3.6/site-packages/pip/_internal/cli/cmdoptions.py", line 23, in <module>
      from pip._internal.cli.parser import ConfigOptionParser
    File "/home/bfahr/work/insights/insights-core/venv36/lib64/python3.6/site-packages/pip/_internal/cli/parser.py", line 12, in <module>
      from pip._internal.configuration import Configuration, ConfigurationError
    File "/home/bfahr/work/insights/insights-core/venv36/lib64/python3.6/site-packages/pip/_internal/configuration.py", line 27, in <module>
      from pip._internal.utils.misc import ensure_dir, enum
    File "/home/bfahr/work/insights/insights-core/venv36/lib64/python3.6/site-packages/pip/_internal/utils/misc.py", line 38, in <module>
      from pip._vendor.tenacity import retry, stop_after_delay, wait_fixed
    File "/home/bfahr/work/insights/insights-core/venv36/lib64/python3.6/site-packages/pip/_vendor/tenacity/__init__.py", line 35, in <module>
      from concurrent import futures
    File "/home/bfahr/work/insights/insights-core/venv36/lib64/python3.6/site-packages/concurrent/futures/__init__.py", line 8, in <module>
      from concurrent.futures._base import (FIRST_COMPLETED,
    File "/home/bfahr/work/insights/insights-core/venv36/lib64/python3.6/site-packages/concurrent/futures/_base.py", line 357
      raise type(self._exception), self._exception, self._traceback
                                 ^
  SyntaxError: invalid syntax
  ----------------------------------------
```

It was only used to create a thread pool for parallel collection in the client.  We don't currently use this feature and since `futures` is not installed by the client RPM it would never be used.  It is included in the default python on RHEL8 so it could be used if so desired, but again we don't currently use it.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
```
1 import os
2 import sys
3 from setuptools import setup, find_packages
4 
5 __here__ = os.path.dirname(os.path.abspath(__file__))
6 
7 package_info = dict.fromkeys(["RELEASE", "COMMIT", "VERSION", "NAME"])
8 
9 for name in package_info:
10     with open(os.path.join(__here__, "insights", name)) as f:
11         package_info[name] = f.read().strip()
12 
13 entry_points = {
14     'console_scripts': [
15         'insights-collect = insights.collect:main',
16         'insights-run = insights:main',
17         'insights = insights.command_parser:main',
18         'insights-cat = insights.tools.cat:main',
19         'insights-dupkeycheck = insights.tools.dupkeycheck:main',
20         'insights-inspect = insights.tools.insights_inspect:main',
21         'insights-info = insights.tools.query:main',
22         'insights-ocpshell= insights.ocpshell:main',
23         'client = insights.client:run',
24         'mangle = insights.util.mangle:main'
25     ]
26 }
27 
28 runtime = set([
29     'six',
30     'requests',
31     'redis',
32     'cachecontrol',
33     'cachecontrol[redis]',
34     'cachecontrol[filecache]',
35     'defusedxml',
36     'lockfile',
37     'jinja2<=2.11.3',
38 ])
39 
40 if (sys.version_info < (2, 7)):
41     runtime.add('pyyaml>=3.10,<=3.13')
42 else:
43     runtime.add('pyyaml')
44 
45 
46 def maybe_require(pkg):
47     try:
48         __import__(pkg)
49     except ImportError:
50         runtime.add(pkg)
51 
52 
53 maybe_require("importlib")
54 maybe_require("argparse")
55 
56 
57 client = set([
58     'requests',
59     'python-gnupg==0.4.6',
60     'oyaml'
61 ])
62 
63 develop = set([
64     'futures==3.0.5',
65     'wheel',
66 ])
67 
68 docs = set([
69     'docutils',
70     'Sphinx',
71     'nbsphinx',
72     'sphinx_rtd_theme',
73     'ipython',
74     'colorama',
75     'jinja2<=2.11.3',
76     'Pygments',
77     'jedi<0.18.0',    # Open issue with jedi 0.18.0 and iPython <= 7.19
78                       # https://github.com/davidhalter/jedi/issues/1714
79 ])
80 
81 testing = set([
82     'coverage==4.3.4',
83     'pytest==3.0.6',
84     'pytest-cov==2.4.0',
85     'mock==2.0.0',
86 ])
87 
88 cluster = set([
89     'ansible',
90     'pandas',
91     'colorama',
92 ])
93 
94 openshift = set([
95     'openshift'
96 ])
97 
98 linting = set([
99     'flake8==2.6.2',
100 ])
101 
102 optional = set([
103     'python-cjson',
104     'python-logstash',
105     'python-statsd',
106     'watchdog',
107 ])
108 
109 if __name__ == "__main__":
110     # allows for runtime modification of rpm name
111     name = os.environ.get("INSIGHTS_CORE_NAME", package_info["NAME"])
112 
113     setup(
114         name=name,
115         version=package_info["VERSION"],
116         description="Insights Core is a data collection and analysis framework",
117         long_description=open("README.rst").read(),
118         url="https://github.com/redhatinsights/insights-core",
119         author="Red Hat, Inc.",
120         author_email="insights@redhat.com",
121         packages=find_packages(),
122         install_requires=list(runtime),
123         package_data={'': ['LICENSE']},
124         license='Apache 2.0',
125         extras_require={
126             'develop': list(runtime | develop | client | docs | linting | testing | cluster),
127             'develop26': list(runtime | develop | client | linting | testing | cluster),
128             'client': list(runtime | client),
129             'client-develop': list(runtime | develop | client | linting | testing),
130             'cluster': list(runtime | cluster),
131             'openshift': list(runtime | openshift),
132             'optional': list(optional),
133             'docs': list(docs),
134             'linting': list(linting | client),
135             'testing': list(testing | client)
136         },
137         classifiers=[
138             'Development Status :: 5 - Production/Stable',
139             'Intended Audience :: Developers',
140             'Natural Language :: English',
141             'License :: OSI Approved :: Apache Software License',
142             'Programming Language :: Python',
143             'Programming Language :: Python :: 2.6',
144             'Programming Language :: Python :: 2.7',
145             'Programming Language :: Python :: 3.3',
146             'Programming Language :: Python :: 3.4',
147             'Programming Language :: Python :: 3.5',
148             'Programming Language :: Python :: 3.6'
149         ],
150         entry_points=entry_points,
151         include_package_data=True
152     )
153
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -61,7 +61,6 @@
 ])
 
 develop = set([
-    'futures==3.0.5',
     'wheel',
 ])

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -61,7 +61,6 @@\n ])\n \n develop = set([\n-    'futures==3.0.5',\n     'wheel',\n ])\n", "issue": "Futures python module is included in Python3\nInsights-core currently installs the [futures module](https://pypi.org/project/futures/) in all cases for the [development] target in [setup.py](https://github.com/RedHatInsights/insights-core/blob/7dc392df90a2535014cc1ec7f5df9c03a9d3d95d/setup.py#L64).  This module is only necessary for Python2 since it is included in Python3.  This is only used in one place in [collect.py](https://github.com/RedHatInsights/insights-core/blob/7dc392df90a2535014cc1ec7f5df9c03a9d3d95d/insights/collect.py#L286).\r\n\r\nThe `futures` module states:\r\n\r\n> It **does not** work on Python 3 due to Python 2 syntax being used in the codebase. Python 3 users should not attempt to install it, since the package is already included in the standard library.\r\n\r\nWhen installed it causes the latest version of `pip` to fail when installing into a virtual environment:\r\n\r\n```python\r\n  Installing build dependencies ... error\r\n  ERROR: Command errored out with exit status 1:\r\n   command: /home/bfahr/work/insights/insights-core/venv36/bin/python3.6 /home/bfahr/work/insights/insights-core/venv36/lib64/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-vujizkqz/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel\r\n       cwd: None\r\n  Complete output (29 lines):\r\n  Traceback (most recent call last):\r\n    File \"/usr/lib64/python3.6/runpy.py\", line 193, in _run_module_as_main\r\n      \"__main__\", mod_spec)\r\n    File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\r\n      exec(code, run_globals)\r\n    File \"/home/bfahr/work/insights/insights-core/venv36/lib64/python3.6/site-packages/pip/__main__.py\", line 29, in <module>\r\n      from pip._internal.cli.main import main as _main\r\n    File \"/home/bfahr/work/insights/insights-core/venv36/lib64/python3.6/site-packages/pip/_internal/cli/main.py\", line 9, in <module>\r\n      from pip._internal.cli.autocompletion import autocomplete\r\n    File \"/home/bfahr/work/insights/insights-core/venv36/lib64/python3.6/site-packages/pip/_internal/cli/autocompletion.py\", line 10, in <module>\r\n      from pip._internal.cli.main_parser import create_main_parser\r\n    File \"/home/bfahr/work/insights/insights-core/venv36/lib64/python3.6/site-packages/pip/_internal/cli/main_parser.py\", line 8, in <module>\r\n      from pip._internal.cli import cmdoptions\r\n    File \"/home/bfahr/work/insights/insights-core/venv36/lib64/python3.6/site-packages/pip/_internal/cli/cmdoptions.py\", line 23, in <module>\r\n      from pip._internal.cli.parser import ConfigOptionParser\r\n    File \"/home/bfahr/work/insights/insights-core/venv36/lib64/python3.6/site-packages/pip/_internal/cli/parser.py\", line 12, in <module>\r\n      from pip._internal.configuration import Configuration, ConfigurationError\r\n    File \"/home/bfahr/work/insights/insights-core/venv36/lib64/python3.6/site-packages/pip/_internal/configuration.py\", line 27, in <module>\r\n      from pip._internal.utils.misc import ensure_dir, enum\r\n    File \"/home/bfahr/work/insights/insights-core/venv36/lib64/python3.6/site-packages/pip/_internal/utils/misc.py\", line 38, in <module>\r\n      from pip._vendor.tenacity import retry, stop_after_delay, wait_fixed\r\n    File \"/home/bfahr/work/insights/insights-core/venv36/lib64/python3.6/site-packages/pip/_vendor/tenacity/__init__.py\", line 35, in <module>\r\n      from concurrent import futures\r\n    File \"/home/bfahr/work/insights/insights-core/venv36/lib64/python3.6/site-packages/concurrent/futures/__init__.py\", line 8, in <module>\r\n      from concurrent.futures._base import (FIRST_COMPLETED,\r\n    File \"/home/bfahr/work/insights/insights-core/venv36/lib64/python3.6/site-packages/concurrent/futures/_base.py\", line 357\r\n      raise type(self._exception), self._exception, self._traceback\r\n                                 ^\r\n  SyntaxError: invalid syntax\r\n  ----------------------------------------\r\n```\r\n\r\nIt was only used to create a thread pool for parallel collection in the client.  We don't currently use this feature and since `futures` is not installed by the client RPM it would never be used.  It is included in the default python on RHEL8 so it could be used if so desired, but again we don't currently use it.\n", "before_files": [{"content": "import os\nimport sys\nfrom setuptools import setup, find_packages\n\n__here__ = os.path.dirname(os.path.abspath(__file__))\n\npackage_info = dict.fromkeys([\"RELEASE\", \"COMMIT\", \"VERSION\", \"NAME\"])\n\nfor name in package_info:\n    with open(os.path.join(__here__, \"insights\", name)) as f:\n        package_info[name] = f.read().strip()\n\nentry_points = {\n    'console_scripts': [\n        'insights-collect = insights.collect:main',\n        'insights-run = insights:main',\n        'insights = insights.command_parser:main',\n        'insights-cat = insights.tools.cat:main',\n        'insights-dupkeycheck = insights.tools.dupkeycheck:main',\n        'insights-inspect = insights.tools.insights_inspect:main',\n        'insights-info = insights.tools.query:main',\n        'insights-ocpshell= insights.ocpshell:main',\n        'client = insights.client:run',\n        'mangle = insights.util.mangle:main'\n    ]\n}\n\nruntime = set([\n    'six',\n    'requests',\n    'redis',\n    'cachecontrol',\n    'cachecontrol[redis]',\n    'cachecontrol[filecache]',\n    'defusedxml',\n    'lockfile',\n    'jinja2<=2.11.3',\n])\n\nif (sys.version_info < (2, 7)):\n    runtime.add('pyyaml>=3.10,<=3.13')\nelse:\n    runtime.add('pyyaml')\n\n\ndef maybe_require(pkg):\n    try:\n        __import__(pkg)\n    except ImportError:\n        runtime.add(pkg)\n\n\nmaybe_require(\"importlib\")\nmaybe_require(\"argparse\")\n\n\nclient = set([\n    'requests',\n    'python-gnupg==0.4.6',\n    'oyaml'\n])\n\ndevelop = set([\n    'futures==3.0.5',\n    'wheel',\n])\n\ndocs = set([\n    'docutils',\n    'Sphinx',\n    'nbsphinx',\n    'sphinx_rtd_theme',\n    'ipython',\n    'colorama',\n    'jinja2<=2.11.3',\n    'Pygments',\n    'jedi<0.18.0',    # Open issue with jedi 0.18.0 and iPython <= 7.19\n                      # https://github.com/davidhalter/jedi/issues/1714\n])\n\ntesting = set([\n    'coverage==4.3.4',\n    'pytest==3.0.6',\n    'pytest-cov==2.4.0',\n    'mock==2.0.0',\n])\n\ncluster = set([\n    'ansible',\n    'pandas',\n    'colorama',\n])\n\nopenshift = set([\n    'openshift'\n])\n\nlinting = set([\n    'flake8==2.6.2',\n])\n\noptional = set([\n    'python-cjson',\n    'python-logstash',\n    'python-statsd',\n    'watchdog',\n])\n\nif __name__ == \"__main__\":\n    # allows for runtime modification of rpm name\n    name = os.environ.get(\"INSIGHTS_CORE_NAME\", package_info[\"NAME\"])\n\n    setup(\n        name=name,\n        version=package_info[\"VERSION\"],\n        description=\"Insights Core is a data collection and analysis framework\",\n        long_description=open(\"README.rst\").read(),\n        url=\"https://github.com/redhatinsights/insights-core\",\n        author=\"Red Hat, Inc.\",\n        author_email=\"insights@redhat.com\",\n        packages=find_packages(),\n        install_requires=list(runtime),\n        package_data={'': ['LICENSE']},\n        license='Apache 2.0',\n        extras_require={\n            'develop': list(runtime | develop | client | docs | linting | testing | cluster),\n            'develop26': list(runtime | develop | client | linting | testing | cluster),\n            'client': list(runtime | client),\n            'client-develop': list(runtime | develop | client | linting | testing),\n            'cluster': list(runtime | cluster),\n            'openshift': list(runtime | openshift),\n            'optional': list(optional),\n            'docs': list(docs),\n            'linting': list(linting | client),\n            'testing': list(testing | client)\n        },\n        classifiers=[\n            'Development Status :: 5 - Production/Stable',\n            'Intended Audience :: Developers',\n            'Natural Language :: English',\n            'License :: OSI Approved :: Apache Software License',\n            'Programming Language :: Python',\n            'Programming Language :: Python :: 2.6',\n            'Programming Language :: Python :: 2.7',\n            'Programming Language :: Python :: 3.3',\n            'Programming Language :: Python :: 3.4',\n            'Programming Language :: Python :: 3.5',\n            'Programming Language :: Python :: 3.6'\n        ],\n        entry_points=entry_points,\n        include_package_data=True\n    )\n", "path": "setup.py"}], "after_files": [{"content": "import os\nimport sys\nfrom setuptools import setup, find_packages\n\n__here__ = os.path.dirname(os.path.abspath(__file__))\n\npackage_info = dict.fromkeys([\"RELEASE\", \"COMMIT\", \"VERSION\", \"NAME\"])\n\nfor name in package_info:\n    with open(os.path.join(__here__, \"insights\", name)) as f:\n        package_info[name] = f.read().strip()\n\nentry_points = {\n    'console_scripts': [\n        'insights-collect = insights.collect:main',\n        'insights-run = insights:main',\n        'insights = insights.command_parser:main',\n        'insights-cat = insights.tools.cat:main',\n        'insights-dupkeycheck = insights.tools.dupkeycheck:main',\n        'insights-inspect = insights.tools.insights_inspect:main',\n        'insights-info = insights.tools.query:main',\n        'insights-ocpshell= insights.ocpshell:main',\n        'client = insights.client:run',\n        'mangle = insights.util.mangle:main'\n    ]\n}\n\nruntime = set([\n    'six',\n    'requests',\n    'redis',\n    'cachecontrol',\n    'cachecontrol[redis]',\n    'cachecontrol[filecache]',\n    'defusedxml',\n    'lockfile',\n    'jinja2<=2.11.3',\n])\n\nif (sys.version_info < (2, 7)):\n    runtime.add('pyyaml>=3.10,<=3.13')\nelse:\n    runtime.add('pyyaml')\n\n\ndef maybe_require(pkg):\n    try:\n        __import__(pkg)\n    except ImportError:\n        runtime.add(pkg)\n\n\nmaybe_require(\"importlib\")\nmaybe_require(\"argparse\")\n\n\nclient = set([\n    'requests',\n    'python-gnupg==0.4.6',\n    'oyaml'\n])\n\ndevelop = set([\n    'wheel',\n])\n\ndocs = set([\n    'docutils',\n    'Sphinx',\n    'nbsphinx',\n    'sphinx_rtd_theme',\n    'ipython',\n    'colorama',\n    'jinja2<=2.11.3',\n    'Pygments',\n    'jedi<0.18.0',    # Open issue with jedi 0.18.0 and iPython <= 7.19\n                      # https://github.com/davidhalter/jedi/issues/1714\n])\n\ntesting = set([\n    'coverage==4.3.4',\n    'pytest==3.0.6',\n    'pytest-cov==2.4.0',\n    'mock==2.0.0',\n])\n\ncluster = set([\n    'ansible',\n    'pandas',\n    'colorama',\n])\n\nopenshift = set([\n    'openshift'\n])\n\nlinting = set([\n    'flake8==2.6.2',\n])\n\noptional = set([\n    'python-cjson',\n    'python-logstash',\n    'python-statsd',\n    'watchdog',\n])\n\nif __name__ == \"__main__\":\n    # allows for runtime modification of rpm name\n    name = os.environ.get(\"INSIGHTS_CORE_NAME\", package_info[\"NAME\"])\n\n    setup(\n        name=name,\n        version=package_info[\"VERSION\"],\n        description=\"Insights Core is a data collection and analysis framework\",\n        long_description=open(\"README.rst\").read(),\n        url=\"https://github.com/redhatinsights/insights-core\",\n        author=\"Red Hat, Inc.\",\n        author_email=\"insights@redhat.com\",\n        packages=find_packages(),\n        install_requires=list(runtime),\n        package_data={'': ['LICENSE']},\n        license='Apache 2.0',\n        extras_require={\n            'develop': list(runtime | develop | client | docs | linting | testing | cluster),\n            'develop26': list(runtime | develop | client | linting | testing | cluster),\n            'client': list(runtime | client),\n            'client-develop': list(runtime | develop | client | linting | testing),\n            'cluster': list(runtime | cluster),\n            'openshift': list(runtime | openshift),\n            'optional': list(optional),\n            'docs': list(docs),\n            'linting': list(linting | client),\n            'testing': list(testing | client)\n        },\n        classifiers=[\n            'Development Status :: 5 - Production/Stable',\n            'Intended Audience :: Developers',\n            'Natural Language :: English',\n            'License :: OSI Approved :: Apache Software License',\n            'Programming Language :: Python',\n            'Programming Language :: Python :: 2.6',\n            'Programming Language :: Python :: 2.7',\n            'Programming Language :: Python :: 3.3',\n            'Programming Language :: Python :: 3.4',\n            'Programming Language :: Python :: 3.5',\n            'Programming Language :: Python :: 3.6'\n        ],\n        entry_points=entry_points,\n        include_package_data=True\n    )\n", "path": "setup.py"}]}