We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Push to PyPi failing
```
error in cirq setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
```

See https://github.com/quantumlib/Cirq/runs/2851981344


--- 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 # Copyright 2018 The Cirq Developers
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     https://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 
15 import io
16 import os
17 from setuptools import setup
18 
19 # This reads the __version__ variable from cirq/_version.py
20 __version__ = ''
21 
22 from dev_tools import modules
23 from dev_tools.requirements import explode
24 
25 exec(open('cirq-core/cirq/_version.py').read())
26 
27 name = 'cirq'
28 
29 description = (
30     'A framework for creating, editing, and invoking '
31     'Noisy Intermediate Scale Quantum (NISQ) circuits.'
32 )
33 
34 # README file as long_description.
35 long_description = io.open('README.rst', encoding='utf-8').read()
36 
37 # If CIRQ_PRE_RELEASE_VERSION is set then we update the version to this value.
38 # It is assumed that it ends with one of `.devN`, `.aN`, `.bN`, `.rcN` and hence
39 # it will be a pre-release version on PyPi. See
40 # https://packaging.python.org/guides/distributing-packages-using-setuptools/#pre-release-versioning
41 # for more details.
42 if 'CIRQ_PRE_RELEASE_VERSION' in os.environ:
43     __version__ = os.environ['CIRQ_PRE_RELEASE_VERSION']
44     long_description = (
45         "**This is a development version of Cirq and may be "
46         "unstable.**\n\n**For the latest stable release of Cirq "
47         "see**\n`here <https://pypi.org/project/cirq>`__.\n\n" + long_description
48     )
49 
50 # Sanity check
51 assert __version__, 'Version string cannot be empty'
52 
53 # This is a pure metapackage that installs all our packages
54 requirements = [f'{p.name}=={p.version}' for p in modules.list_modules()]
55 
56 dev_requirements = explode('dev_tools/requirements/deps/dev-tools.txt')
57 dev_requirements = [r.strip() for r in dev_requirements]
58 
59 setup(
60     name=name,
61     version=__version__,
62     url='http://github.com/quantumlib/cirq',
63     author='The Cirq Developers',
64     author_email='cirq-dev@googlegroups.com',
65     python_requires='>=3.6.0',
66     install_requires=requirements,
67     extras_require={
68         'dev_env': dev_requirements,
69     },
70     license='Apache 2',
71     description=description,
72     long_description=long_description,
73 )
74
```
--- 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
@@ -54,7 +54,9 @@
 requirements = [f'{p.name}=={p.version}' for p in modules.list_modules()]
 
 dev_requirements = explode('dev_tools/requirements/deps/dev-tools.txt')
-dev_requirements = [r.strip() for r in dev_requirements]
+
+# filter out direct urls (https://github.com/pypa/pip/issues/6301)
+dev_requirements = [r.strip() for r in dev_requirements if "git+http" not in r]
 
 setup(
     name=name,

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -54,7 +54,9 @@\n requirements = [f'{p.name}=={p.version}' for p in modules.list_modules()]\n \n dev_requirements = explode('dev_tools/requirements/deps/dev-tools.txt')\n-dev_requirements = [r.strip() for r in dev_requirements]\n+\n+# filter out direct urls (https://github.com/pypa/pip/issues/6301)\n+dev_requirements = [r.strip() for r in dev_requirements if \"git+http\" not in r]\n \n setup(\n     name=name,\n", "issue": "Push to PyPi failing\n```\r\nerror in cirq setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.\r\n```\r\n\r\nSee https://github.com/quantumlib/Cirq/runs/2851981344\r\n\n", "before_files": [{"content": "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport io\nimport os\nfrom setuptools import setup\n\n# This reads the __version__ variable from cirq/_version.py\n__version__ = ''\n\nfrom dev_tools import modules\nfrom dev_tools.requirements import explode\n\nexec(open('cirq-core/cirq/_version.py').read())\n\nname = 'cirq'\n\ndescription = (\n    'A framework for creating, editing, and invoking '\n    'Noisy Intermediate Scale Quantum (NISQ) circuits.'\n)\n\n# README file as long_description.\nlong_description = io.open('README.rst', encoding='utf-8').read()\n\n# If CIRQ_PRE_RELEASE_VERSION is set then we update the version to this value.\n# It is assumed that it ends with one of `.devN`, `.aN`, `.bN`, `.rcN` and hence\n# it will be a pre-release version on PyPi. See\n# https://packaging.python.org/guides/distributing-packages-using-setuptools/#pre-release-versioning\n# for more details.\nif 'CIRQ_PRE_RELEASE_VERSION' in os.environ:\n    __version__ = os.environ['CIRQ_PRE_RELEASE_VERSION']\n    long_description = (\n        \"**This is a development version of Cirq and may be \"\n        \"unstable.**\\n\\n**For the latest stable release of Cirq \"\n        \"see**\\n`here <https://pypi.org/project/cirq>`__.\\n\\n\" + long_description\n    )\n\n# Sanity check\nassert __version__, 'Version string cannot be empty'\n\n# This is a pure metapackage that installs all our packages\nrequirements = [f'{p.name}=={p.version}' for p in modules.list_modules()]\n\ndev_requirements = explode('dev_tools/requirements/deps/dev-tools.txt')\ndev_requirements = [r.strip() for r in dev_requirements]\n\nsetup(\n    name=name,\n    version=__version__,\n    url='http://github.com/quantumlib/cirq',\n    author='The Cirq Developers',\n    author_email='cirq-dev@googlegroups.com',\n    python_requires='>=3.6.0',\n    install_requires=requirements,\n    extras_require={\n        'dev_env': dev_requirements,\n    },\n    license='Apache 2',\n    description=description,\n    long_description=long_description,\n)\n", "path": "setup.py"}], "after_files": [{"content": "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport io\nimport os\nfrom setuptools import setup\n\n# This reads the __version__ variable from cirq/_version.py\n__version__ = ''\n\nfrom dev_tools import modules\nfrom dev_tools.requirements import explode\n\nexec(open('cirq-core/cirq/_version.py').read())\n\nname = 'cirq'\n\ndescription = (\n    'A framework for creating, editing, and invoking '\n    'Noisy Intermediate Scale Quantum (NISQ) circuits.'\n)\n\n# README file as long_description.\nlong_description = io.open('README.rst', encoding='utf-8').read()\n\n# If CIRQ_PRE_RELEASE_VERSION is set then we update the version to this value.\n# It is assumed that it ends with one of `.devN`, `.aN`, `.bN`, `.rcN` and hence\n# it will be a pre-release version on PyPi. See\n# https://packaging.python.org/guides/distributing-packages-using-setuptools/#pre-release-versioning\n# for more details.\nif 'CIRQ_PRE_RELEASE_VERSION' in os.environ:\n    __version__ = os.environ['CIRQ_PRE_RELEASE_VERSION']\n    long_description = (\n        \"**This is a development version of Cirq and may be \"\n        \"unstable.**\\n\\n**For the latest stable release of Cirq \"\n        \"see**\\n`here <https://pypi.org/project/cirq>`__.\\n\\n\" + long_description\n    )\n\n# Sanity check\nassert __version__, 'Version string cannot be empty'\n\n# This is a pure metapackage that installs all our packages\nrequirements = [f'{p.name}=={p.version}' for p in modules.list_modules()]\n\ndev_requirements = explode('dev_tools/requirements/deps/dev-tools.txt')\n\n# filter out direct urls (https://github.com/pypa/pip/issues/6301)\ndev_requirements = [r.strip() for r in dev_requirements if \"git+http\" not in r]\n\nsetup(\n    name=name,\n    version=__version__,\n    url='http://github.com/quantumlib/cirq',\n    author='The Cirq Developers',\n    author_email='cirq-dev@googlegroups.com',\n    python_requires='>=3.6.0',\n    install_requires=requirements,\n    extras_require={\n        'dev_env': dev_requirements,\n    },\n    license='Apache 2',\n    description=description,\n    long_description=long_description,\n)\n", "path": "setup.py"}]}