We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Switch from "uritemplate" to "uritemplate.py"
There are at least 2 URI template packages on the PyPI: [uritemplate](https://pypi.python.org/pypi/uritemplate/0.6) and [uritemplate.py](https://pypi.python.org/pypi/uritemplate.py/0.3.0). Both of these packages use `uritemplate` as the package name to be imported, which causes a conflict when both are installed (see https://github.com/sigmavirus24/uritemplate/issues/14).

I propose that this project depend on  `uritemplate.py` because:
- `uritemplate.py` is API-compatible with `uritemplate`, but the reverse is not true. I have confirmed that this library works with uritemplate.py.
- Other projects depend on `uritemplate.py`. For example, we are currently working on a project that depends on both `github3.py` (GitHub API client) and `google-api-python-client`. Installing both results in an immediate `ImportError` due to the `uritemplate` conflict.

This  is a simple, low-risk change that would aid compatibility with other projects.

Thoughts?


--- 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 2014 Google Inc. All Rights Reserved.
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 #      http://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 """Setup script for Google API Python client.
16 
17 Also installs included versions of third party libraries, if those libraries
18 are not already installed.
19 """
20 from __future__ import print_function
21 
22 import sys
23 
24 if sys.version_info < (2, 6):
25   print('google-api-python-client requires python version >= 2.6.',
26         file=sys.stderr)
27   sys.exit(1)
28 if (3, 1) <= sys.version_info < (3, 3):
29   print('google-api-python-client requires python3 version >= 3.3.',
30         file=sys.stderr)
31   sys.exit(1)
32 
33 from setuptools import setup
34 import pkg_resources
35 
36 def _DetectBadness():
37   import os
38   if 'SKIP_GOOGLEAPICLIENT_COMPAT_CHECK' in os.environ:
39     return
40   o2c_pkg = None
41   try:
42     o2c_pkg = pkg_resources.get_distribution('oauth2client')
43   except pkg_resources.DistributionNotFound:
44     pass
45   oauth2client = None
46   try:
47     import oauth2client
48   except ImportError:
49     pass
50   if o2c_pkg is None and oauth2client is not None:
51     raise RuntimeError(
52         'Previous version of google-api-python-client detected; due to a '
53         'packaging issue, we cannot perform an in-place upgrade. Please remove '
54         'the old version and re-install this package.'
55     )
56 
57 _DetectBadness()
58 
59 packages = [
60     'apiclient',
61     'googleapiclient',
62     'googleapiclient/discovery_cache',
63 ]
64 
65 install_requires = [
66     'httplib2>=0.8,<1',
67     'oauth2client>=1.5.0,<4.0.0',
68     'six>=1.6.1,<2',
69     'uritemplate>=0.6,<1',
70 ]
71 
72 if sys.version_info < (2, 7):
73   install_requires.append('argparse')
74 
75 long_desc = """The Google API Client for Python is a client library for
76 accessing the Plus, Moderator, and many other Google APIs."""
77 
78 import googleapiclient
79 version = googleapiclient.__version__
80 
81 setup(
82     name="google-api-python-client",
83     version=version,
84     description="Google API Client Library for Python",
85     long_description=long_desc,
86     author="Google Inc.",
87     url="http://github.com/google/google-api-python-client/",
88     install_requires=install_requires,
89     packages=packages,
90     package_data={},
91     license="Apache 2.0",
92     keywords="google api client",
93     classifiers=[
94         'Programming Language :: Python :: 2',
95         'Programming Language :: Python :: 2.6',
96         'Programming Language :: Python :: 2.7',
97         'Programming Language :: Python :: 3',
98         'Programming Language :: Python :: 3.3',
99         'Programming Language :: Python :: 3.4',
100         'Development Status :: 5 - Production/Stable',
101         'Intended Audience :: Developers',
102         'License :: OSI Approved :: Apache Software License',
103         'Operating System :: OS Independent',
104         'Topic :: Internet :: WWW/HTTP',
105     ],
106 )
107
```
--- 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
@@ -66,7 +66,7 @@
     'httplib2>=0.8,<1',
     'oauth2client>=1.5.0,<4.0.0',
     'six>=1.6.1,<2',
-    'uritemplate>=0.6,<1',
+    'uritemplate>=3.0.0,<4',
 ]
 
 if sys.version_info < (2, 7):

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -66,7 +66,7 @@\n     'httplib2>=0.8,<1',\n     'oauth2client>=1.5.0,<4.0.0',\n     'six>=1.6.1,<2',\n-    'uritemplate>=0.6,<1',\n+    'uritemplate>=3.0.0,<4',\n ]\n \n if sys.version_info < (2, 7):\n", "issue": "Switch from \"uritemplate\" to \"uritemplate.py\"\nThere are at least 2 URI template packages on the PyPI: [uritemplate](https://pypi.python.org/pypi/uritemplate/0.6) and [uritemplate.py](https://pypi.python.org/pypi/uritemplate.py/0.3.0). Both of these packages use `uritemplate` as the package name to be imported, which causes a conflict when both are installed (see https://github.com/sigmavirus24/uritemplate/issues/14).\n\nI propose that this project depend on  `uritemplate.py` because:\n- `uritemplate.py` is API-compatible with `uritemplate`, but the reverse is not true. I have confirmed that this library works with uritemplate.py.\n- Other projects depend on `uritemplate.py`. For example, we are currently working on a project that depends on both `github3.py` (GitHub API client) and `google-api-python-client`. Installing both results in an immediate `ImportError` due to the `uritemplate` conflict.\n\nThis  is a simple, low-risk change that would aid compatibility with other projects.\n\nThoughts?\n\n", "before_files": [{"content": "# Copyright 2014 Google Inc. All Rights Reserved.\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#      http://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\n\"\"\"Setup script for Google API Python client.\n\nAlso installs included versions of third party libraries, if those libraries\nare not already installed.\n\"\"\"\nfrom __future__ import print_function\n\nimport sys\n\nif sys.version_info < (2, 6):\n  print('google-api-python-client requires python version >= 2.6.',\n        file=sys.stderr)\n  sys.exit(1)\nif (3, 1) <= sys.version_info < (3, 3):\n  print('google-api-python-client requires python3 version >= 3.3.',\n        file=sys.stderr)\n  sys.exit(1)\n\nfrom setuptools import setup\nimport pkg_resources\n\ndef _DetectBadness():\n  import os\n  if 'SKIP_GOOGLEAPICLIENT_COMPAT_CHECK' in os.environ:\n    return\n  o2c_pkg = None\n  try:\n    o2c_pkg = pkg_resources.get_distribution('oauth2client')\n  except pkg_resources.DistributionNotFound:\n    pass\n  oauth2client = None\n  try:\n    import oauth2client\n  except ImportError:\n    pass\n  if o2c_pkg is None and oauth2client is not None:\n    raise RuntimeError(\n        'Previous version of google-api-python-client detected; due to a '\n        'packaging issue, we cannot perform an in-place upgrade. Please remove '\n        'the old version and re-install this package.'\n    )\n\n_DetectBadness()\n\npackages = [\n    'apiclient',\n    'googleapiclient',\n    'googleapiclient/discovery_cache',\n]\n\ninstall_requires = [\n    'httplib2>=0.8,<1',\n    'oauth2client>=1.5.0,<4.0.0',\n    'six>=1.6.1,<2',\n    'uritemplate>=0.6,<1',\n]\n\nif sys.version_info < (2, 7):\n  install_requires.append('argparse')\n\nlong_desc = \"\"\"The Google API Client for Python is a client library for\naccessing the Plus, Moderator, and many other Google APIs.\"\"\"\n\nimport googleapiclient\nversion = googleapiclient.__version__\n\nsetup(\n    name=\"google-api-python-client\",\n    version=version,\n    description=\"Google API Client Library for Python\",\n    long_description=long_desc,\n    author=\"Google Inc.\",\n    url=\"http://github.com/google/google-api-python-client/\",\n    install_requires=install_requires,\n    packages=packages,\n    package_data={},\n    license=\"Apache 2.0\",\n    keywords=\"google api client\",\n    classifiers=[\n        'Programming Language :: Python :: 2',\n        'Programming Language :: Python :: 2.6',\n        'Programming Language :: Python :: 2.7',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.3',\n        'Programming Language :: Python :: 3.4',\n        'Development Status :: 5 - Production/Stable',\n        'Intended Audience :: Developers',\n        'License :: OSI Approved :: Apache Software License',\n        'Operating System :: OS Independent',\n        'Topic :: Internet :: WWW/HTTP',\n    ],\n)\n", "path": "setup.py"}], "after_files": [{"content": "# Copyright 2014 Google Inc. All Rights Reserved.\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#      http://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\n\"\"\"Setup script for Google API Python client.\n\nAlso installs included versions of third party libraries, if those libraries\nare not already installed.\n\"\"\"\nfrom __future__ import print_function\n\nimport sys\n\nif sys.version_info < (2, 6):\n  print('google-api-python-client requires python version >= 2.6.',\n        file=sys.stderr)\n  sys.exit(1)\nif (3, 1) <= sys.version_info < (3, 3):\n  print('google-api-python-client requires python3 version >= 3.3.',\n        file=sys.stderr)\n  sys.exit(1)\n\nfrom setuptools import setup\nimport pkg_resources\n\ndef _DetectBadness():\n  import os\n  if 'SKIP_GOOGLEAPICLIENT_COMPAT_CHECK' in os.environ:\n    return\n  o2c_pkg = None\n  try:\n    o2c_pkg = pkg_resources.get_distribution('oauth2client')\n  except pkg_resources.DistributionNotFound:\n    pass\n  oauth2client = None\n  try:\n    import oauth2client\n  except ImportError:\n    pass\n  if o2c_pkg is None and oauth2client is not None:\n    raise RuntimeError(\n        'Previous version of google-api-python-client detected; due to a '\n        'packaging issue, we cannot perform an in-place upgrade. Please remove '\n        'the old version and re-install this package.'\n    )\n\n_DetectBadness()\n\npackages = [\n    'apiclient',\n    'googleapiclient',\n    'googleapiclient/discovery_cache',\n]\n\ninstall_requires = [\n    'httplib2>=0.8,<1',\n    'oauth2client>=1.5.0,<4.0.0',\n    'six>=1.6.1,<2',\n    'uritemplate>=3.0.0,<4',\n]\n\nif sys.version_info < (2, 7):\n  install_requires.append('argparse')\n\nlong_desc = \"\"\"The Google API Client for Python is a client library for\naccessing the Plus, Moderator, and many other Google APIs.\"\"\"\n\nimport googleapiclient\nversion = googleapiclient.__version__\n\nsetup(\n    name=\"google-api-python-client\",\n    version=version,\n    description=\"Google API Client Library for Python\",\n    long_description=long_desc,\n    author=\"Google Inc.\",\n    url=\"http://github.com/google/google-api-python-client/\",\n    install_requires=install_requires,\n    packages=packages,\n    package_data={},\n    license=\"Apache 2.0\",\n    keywords=\"google api client\",\n    classifiers=[\n        'Programming Language :: Python :: 2',\n        'Programming Language :: Python :: 2.6',\n        'Programming Language :: Python :: 2.7',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.3',\n        'Programming Language :: Python :: 3.4',\n        'Development Status :: 5 - Production/Stable',\n        'Intended Audience :: Developers',\n        'License :: OSI Approved :: Apache Software License',\n        'Operating System :: OS Independent',\n        'Topic :: Internet :: WWW/HTTP',\n    ],\n)\n", "path": "setup.py"}]}