prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Can't run in Travis CI xenial
  I was testing the new Travis CI image:
  
  https://blog.travis-ci.com/2018-11-08-xenial-release
  https://docs.travis-ci.com/user/reference/xenial/
  
  My install script ran `pip install --user --upgrade cfn-lint` and then `cfn-lint my.cfn.yaml` which gave this error:
  
  ```Traceback (most recent call last):
    File "/home/travis/.local/bin/cfn-lint", line 7, in <module>
      from cfnlint.__main__ import main
    File "/home/travis/.local/lib/python2.7/site-packages/cfnlint/__main__.py", line 19, in <module>
      import cfnlint.core
    File "/home/travis/.local/lib/python2.7/site-packages/cfnlint/core.py", line 24, in <module>
      import cfnlint.maintenance
    File "/home/travis/.local/lib/python2.7/site-packages/cfnlint/maintenance.py", line 19, in <module>
      import requests
    File "/usr/lib/python2.7/dist-packages/requests/__init__.py", line 58, in <module>
      from . import utils
    File "/usr/lib/python2.7/dist-packages/requests/utils.py", line 25, in <module>
      from . import certs
  ImportError: cannot import name certs
  ```
  
  I "fixed" this problem by just changing to Python3 in my build script:
  
  ```
  pyenv global 3.7
  pip3 install --user --upgrade cfn-lint
  cfn-lint stack.cfn.yaml
  ```
  
  But there might be some other lingering issue here
  
  --- 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 """
  2   Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  3 
  4   Permission is hereby granted, free of charge, to any person obtaining a copy of this
  5   software and associated documentation files (the "Software"), to deal in the Software
  6   without restriction, including without limitation the rights to use, copy, modify,
  7   merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
  8   permit persons to whom the Software is furnished to do so.
  9 
  10   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
  11   INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
  12   PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  13   HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  14   OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  15   SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  16 """
  17 import codecs
  18 import re
  19 from setuptools import find_packages
  20 from setuptools import setup
  21 
  22 
  23 def get_version(filename):
  24     with codecs.open(filename, 'r', 'utf-8') as fp:
  25         contents = fp.read()
  26     return re.search(r"__version__ = ['\"]([^'\"]+)['\"]", contents).group(1)
  27 
  28 
  29 version = get_version('src/cfnlint/version.py')
  30 
  31 
  32 with open('README.md') as f:
  33     readme = f.read()
  34 
  35 setup(
  36     name='cfn-lint',
  37     version=version,
  38     description=('checks cloudformation for practices and behaviour \
  39         that could potentially be improved'),
  40     long_description=readme,
  41     long_description_content_type="text/markdown",
  42     keywords='aws, lint',
  43     author='kddejong',
  44     author_email='kddejong@amazon.com',
  45     url='https://github.com/awslabs/cfn-python-lint',
  46     package_dir={'': 'src'},
  47     package_data={'cfnlint': [
  48         'data/CloudSpecs/*.json',
  49         'data/AdditionalSpecs/*.json',
  50         'data/Serverless/*.json',
  51         'data/CfnLintCli/config/schema.json'
  52     ]},
  53     packages=find_packages('src'),
  54     zip_safe=False,
  55     install_requires=['pyyaml', 'six', 'requests', 'aws-sam-translator>=1.6.0', 'jsonpatch', 'jsonschema~=2.6.0', 'pathlib2'],
  56     python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
  57     entry_points={
  58         'console_scripts': [
  59             'cfn-lint = cfnlint.__main__:main'
  60         ]
  61     },
  62     license='MIT no attribution',
  63     test_suite="unittest",
  64     classifiers=[
  65         'Development Status :: 5 - Production/Stable',
  66         'Intended Audience :: Developers',
  67         'License :: OSI Approved :: MIT License',
  68         'Natural Language :: English',
  69         'Operating System :: OS Independent',
  70         'Programming Language :: Python :: 2',
  71         'Programming Language :: Python :: 2.7',
  72         'Programming Language :: Python :: 3',
  73         'Programming Language :: Python :: 3.4',
  74         'Programming Language :: Python :: 3.5',
  75         'Programming Language :: Python :: 3.6',
  76     ],
  77 )
  78
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -52,7 +52,15 @@
       ]},
       packages=find_packages('src'),
       zip_safe=False,
  -    install_requires=['pyyaml', 'six', 'requests', 'aws-sam-translator>=1.6.0', 'jsonpatch', 'jsonschema~=2.6.0', 'pathlib2'],
  +    install_requires=[
  +        'pyyaml',
  +        'six~=1.11',
  +        'requests>=2.15.0',
  +        'aws-sam-translator>=1.8.0',
  +        'jsonpatch',
  +        'jsonschema~=2.6',
  +        'pathlib2>=2.3.0;python_version<"3.4"'
  +    ],
       python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
       entry_points={
           'console_scripts': [
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -52,7 +52,15 @@\n     ]},\n     packages=find_packages('src'),\n     zip_safe=False,\n-    install_requires=['pyyaml', 'six', 'requests', 'aws-sam-translator>=1.6.0', 'jsonpatch', 'jsonschema~=2.6.0', 'pathlib2'],\n+    install_requires=[\n+        'pyyaml',\n+        'six~=1.11',\n+        'requests>=2.15.0',\n+        'aws-sam-translator>=1.8.0',\n+        'jsonpatch',\n+        'jsonschema~=2.6',\n+        'pathlib2>=2.3.0;python_version<\"3.4\"'\n+    ],\n     python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',\n     entry_points={\n         'console_scripts': [\n", "issue": "Can't run in Travis CI xenial\nI was testing the new Travis CI image:\r\n\r\nhttps://blog.travis-ci.com/2018-11-08-xenial-release\r\nhttps://docs.travis-ci.com/user/reference/xenial/\r\n\r\nMy install script ran `pip install --user --upgrade cfn-lint` and then `cfn-lint my.cfn.yaml` which gave this error:\r\n\r\n```Traceback (most recent call last):\r\n  File \"/home/travis/.local/bin/cfn-lint\", line 7, in <module>\r\n    from cfnlint.__main__ import main\r\n  File \"/home/travis/.local/lib/python2.7/site-packages/cfnlint/__main__.py\", line 19, in <module>\r\n    import cfnlint.core\r\n  File \"/home/travis/.local/lib/python2.7/site-packages/cfnlint/core.py\", line 24, in <module>\r\n    import cfnlint.maintenance\r\n  File \"/home/travis/.local/lib/python2.7/site-packages/cfnlint/maintenance.py\", line 19, in <module>\r\n    import requests\r\n  File \"/usr/lib/python2.7/dist-packages/requests/__init__.py\", line 58, in <module>\r\n    from . import utils\r\n  File \"/usr/lib/python2.7/dist-packages/requests/utils.py\", line 25, in <module>\r\n    from . import certs\r\nImportError: cannot import name certs\r\n```\r\n\r\nI \"fixed\" this problem by just changing to Python3 in my build script:\r\n\r\n```\r\npyenv global 3.7\r\npip3 install --user --upgrade cfn-lint\r\ncfn-lint stack.cfn.yaml\r\n```\r\n\r\nBut there might be some other lingering issue here\n", "before_files": [{"content": "\"\"\"\n  Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n  Permission is hereby granted, free of charge, to any person obtaining a copy of this\n  software and associated documentation files (the \"Software\"), to deal in the Software\n  without restriction, including without limitation the rights to use, copy, modify,\n  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to\n  permit persons to whom the Software is furnished to do so.\n\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n  INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n  PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\"\"\"\nimport codecs\nimport re\nfrom setuptools import find_packages\nfrom setuptools import setup\n\n\ndef get_version(filename):\n    with codecs.open(filename, 'r', 'utf-8') as fp:\n        contents = fp.read()\n    return re.search(r\"__version__ = ['\\\"]([^'\\\"]+)['\\\"]\", contents).group(1)\n\n\nversion = get_version('src/cfnlint/version.py')\n\n\nwith open('README.md') as f:\n    readme = f.read()\n\nsetup(\n    name='cfn-lint',\n    version=version,\n    description=('checks cloudformation for practices and behaviour \\\n        that could potentially be improved'),\n    long_description=readme,\n    long_description_content_type=\"text/markdown\",\n    keywords='aws, lint',\n    author='kddejong',\n    author_email='kddejong@amazon.com',\n    url='https://github.com/awslabs/cfn-python-lint',\n    package_dir={'': 'src'},\n    package_data={'cfnlint': [\n        'data/CloudSpecs/*.json',\n        'data/AdditionalSpecs/*.json',\n        'data/Serverless/*.json',\n        'data/CfnLintCli/config/schema.json'\n    ]},\n    packages=find_packages('src'),\n    zip_safe=False,\n    install_requires=['pyyaml', 'six', 'requests', 'aws-sam-translator>=1.6.0', 'jsonpatch', 'jsonschema~=2.6.0', 'pathlib2'],\n    python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',\n    entry_points={\n        'console_scripts': [\n            'cfn-lint = cfnlint.__main__:main'\n        ]\n    },\n    license='MIT no attribution',\n    test_suite=\"unittest\",\n    classifiers=[\n        'Development Status :: 5 - Production/Stable',\n        'Intended Audience :: Developers',\n        'License :: OSI Approved :: MIT License',\n        'Natural Language :: English',\n        'Operating System :: OS Independent',\n        'Programming Language :: Python :: 2',\n        'Programming Language :: Python :: 2.7',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.4',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n    ],\n)\n", "path": "setup.py"}], "after_files": [{"content": "\"\"\"\n  Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n  Permission is hereby granted, free of charge, to any person obtaining a copy of this\n  software and associated documentation files (the \"Software\"), to deal in the Software\n  without restriction, including without limitation the rights to use, copy, modify,\n  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to\n  permit persons to whom the Software is furnished to do so.\n\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n  INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n  PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\"\"\"\nimport codecs\nimport re\nfrom setuptools import find_packages\nfrom setuptools import setup\n\n\ndef get_version(filename):\n    with codecs.open(filename, 'r', 'utf-8') as fp:\n        contents = fp.read()\n    return re.search(r\"__version__ = ['\\\"]([^'\\\"]+)['\\\"]\", contents).group(1)\n\n\nversion = get_version('src/cfnlint/version.py')\n\n\nwith open('README.md') as f:\n    readme = f.read()\n\nsetup(\n    name='cfn-lint',\n    version=version,\n    description=('checks cloudformation for practices and behaviour \\\n        that could potentially be improved'),\n    long_description=readme,\n    long_description_content_type=\"text/markdown\",\n    keywords='aws, lint',\n    author='kddejong',\n    author_email='kddejong@amazon.com',\n    url='https://github.com/awslabs/cfn-python-lint',\n    package_dir={'': 'src'},\n    package_data={'cfnlint': [\n        'data/CloudSpecs/*.json',\n        'data/AdditionalSpecs/*.json',\n        'data/Serverless/*.json',\n        'data/CfnLintCli/config/schema.json'\n    ]},\n    packages=find_packages('src'),\n    zip_safe=False,\n    install_requires=[\n        'pyyaml',\n        'six~=1.11',\n        'requests>=2.15.0',\n        'aws-sam-translator>=1.8.0',\n        'jsonpatch',\n        'jsonschema~=2.6',\n        'pathlib2>=2.3.0;python_version<\"3.4\"'\n    ],\n    python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',\n    entry_points={\n        'console_scripts': [\n            'cfn-lint = cfnlint.__main__:main'\n        ]\n    },\n    license='MIT no attribution',\n    test_suite=\"unittest\",\n    classifiers=[\n        'Development Status :: 5 - Production/Stable',\n        'Intended Audience :: Developers',\n        'License :: OSI Approved :: MIT License',\n        'Natural Language :: English',\n        'Operating System :: OS Independent',\n        'Programming Language :: Python :: 2',\n        'Programming Language :: Python :: 2.7',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.4',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n    ],\n)\n", "path": "setup.py"}]}