prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Add a job for Python 3.9 to .travis.yml
  It looks like Travis support specifying such a Python version as `3.9-dev`.
  
  While I’m not sure we should officially support Python 3.9 it until its release, running tests on it will allow us to catch any issue early.
  
  </issue>
  <code>
  [start of setup.py]
  1 from os.path import dirname, join
  2 from pkg_resources import parse_version
  3 from setuptools import setup, find_packages, __version__ as setuptools_version
  4 
  5 
  6 with open(join(dirname(__file__), 'scrapy/VERSION'), 'rb') as f:
  7     version = f.read().decode('ascii').strip()
  8 
  9 
  10 def has_environment_marker_platform_impl_support():
  11     """Code extracted from 'pytest/setup.py'
  12     https://github.com/pytest-dev/pytest/blob/7538680c/setup.py#L31
  13 
  14     The first known release to support environment marker with range operators
  15     it is 18.5, see:
  16     https://setuptools.readthedocs.io/en/latest/history.html#id235
  17     """
  18     return parse_version(setuptools_version) >= parse_version('18.5')
  19 
  20 
  21 install_requires = [
  22     'Twisted>=17.9.0',
  23     'cryptography>=2.0',
  24     'cssselect>=0.9.1',
  25     'itemloaders>=1.0.1',
  26     'parsel>=1.5.0',
  27     'pyOpenSSL>=16.2.0',
  28     'queuelib>=1.4.2',
  29     'service_identity>=16.0.0',
  30     'w3lib>=1.17.0',
  31     'zope.interface>=4.1.3',
  32     'protego>=0.1.15',
  33     'itemadapter>=0.1.0',
  34 ]
  35 extras_require = {}
  36 cpython_dependencies = [
  37     'lxml>=3.5.0',
  38     'PyDispatcher>=2.0.5',
  39 ]
  40 if has_environment_marker_platform_impl_support():
  41     extras_require[':platform_python_implementation == "CPython"'] = cpython_dependencies
  42     extras_require[':platform_python_implementation == "PyPy"'] = [
  43         # Earlier lxml versions are affected by
  44         # https://foss.heptapod.net/pypy/pypy/-/issues/2498,
  45         # which was fixed in Cython 0.26, released on 2017-06-19, and used to
  46         # generate the C headers of lxml release tarballs published since then, the
  47         # first of which was:
  48         'lxml>=4.0.0',
  49         'PyPyDispatcher>=2.1.0',
  50     ]
  51 else:
  52     install_requires.extend(cpython_dependencies)
  53 
  54 
  55 setup(
  56     name='Scrapy',
  57     version=version,
  58     url='https://scrapy.org',
  59     project_urls={
  60         'Documentation': 'https://docs.scrapy.org/',
  61         'Source': 'https://github.com/scrapy/scrapy',
  62         'Tracker': 'https://github.com/scrapy/scrapy/issues',
  63     },
  64     description='A high-level Web Crawling and Web Scraping framework',
  65     long_description=open('README.rst').read(),
  66     author='Scrapy developers',
  67     maintainer='Pablo Hoffman',
  68     maintainer_email='pablo@pablohoffman.com',
  69     license='BSD',
  70     packages=find_packages(exclude=('tests', 'tests.*')),
  71     include_package_data=True,
  72     zip_safe=False,
  73     entry_points={
  74         'console_scripts': ['scrapy = scrapy.cmdline:execute']
  75     },
  76     classifiers=[
  77         'Framework :: Scrapy',
  78         'Development Status :: 5 - Production/Stable',
  79         'Environment :: Console',
  80         'Intended Audience :: Developers',
  81         'License :: OSI Approved :: BSD License',
  82         'Operating System :: OS Independent',
  83         'Programming Language :: Python',
  84         'Programming Language :: Python :: 3',
  85         'Programming Language :: Python :: 3.6',
  86         'Programming Language :: Python :: 3.7',
  87         'Programming Language :: Python :: 3.8',
  88         'Programming Language :: Python :: Implementation :: CPython',
  89         'Programming Language :: Python :: Implementation :: PyPy',
  90         'Topic :: Internet :: WWW/HTTP',
  91         'Topic :: Software Development :: Libraries :: Application Frameworks',
  92         'Topic :: Software Development :: Libraries :: Python Modules',
  93     ],
  94     python_requires='>=3.6',
  95     install_requires=install_requires,
  96     extras_require=extras_require,
  97 )
  98
  [end of setup.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -85,6 +85,7 @@
           'Programming Language :: Python :: 3.6',
           'Programming Language :: Python :: 3.7',
           'Programming Language :: Python :: 3.8',
  +        'Programming Language :: Python :: 3.9',
           'Programming Language :: Python :: Implementation :: CPython',
           'Programming Language :: Python :: Implementation :: PyPy',
           'Topic :: Internet :: WWW/HTTP',
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -85,6 +85,7 @@\n         'Programming Language :: Python :: 3.6',\n         'Programming Language :: Python :: 3.7',\n         'Programming Language :: Python :: 3.8',\n+        'Programming Language :: Python :: 3.9',\n         'Programming Language :: Python :: Implementation :: CPython',\n         'Programming Language :: Python :: Implementation :: PyPy',\n         'Topic :: Internet :: WWW/HTTP',\n", "issue": "Add a job for Python 3.9 to .travis.yml\nIt looks like Travis support specifying such a Python version as `3.9-dev`.\r\n\r\nWhile I\u2019m not sure we should officially support Python 3.9 it until its release, running tests on it will allow us to catch any issue early.\n", "before_files": [{"content": "from os.path import dirname, join\nfrom pkg_resources import parse_version\nfrom setuptools import setup, find_packages, __version__ as setuptools_version\n\n\nwith open(join(dirname(__file__), 'scrapy/VERSION'), 'rb') as f:\n    version = f.read().decode('ascii').strip()\n\n\ndef has_environment_marker_platform_impl_support():\n    \"\"\"Code extracted from 'pytest/setup.py'\n    https://github.com/pytest-dev/pytest/blob/7538680c/setup.py#L31\n\n    The first known release to support environment marker with range operators\n    it is 18.5, see:\n    https://setuptools.readthedocs.io/en/latest/history.html#id235\n    \"\"\"\n    return parse_version(setuptools_version) >= parse_version('18.5')\n\n\ninstall_requires = [\n    'Twisted>=17.9.0',\n    'cryptography>=2.0',\n    'cssselect>=0.9.1',\n    'itemloaders>=1.0.1',\n    'parsel>=1.5.0',\n    'pyOpenSSL>=16.2.0',\n    'queuelib>=1.4.2',\n    'service_identity>=16.0.0',\n    'w3lib>=1.17.0',\n    'zope.interface>=4.1.3',\n    'protego>=0.1.15',\n    'itemadapter>=0.1.0',\n]\nextras_require = {}\ncpython_dependencies = [\n    'lxml>=3.5.0',\n    'PyDispatcher>=2.0.5',\n]\nif has_environment_marker_platform_impl_support():\n    extras_require[':platform_python_implementation == \"CPython\"'] = cpython_dependencies\n    extras_require[':platform_python_implementation == \"PyPy\"'] = [\n        # Earlier lxml versions are affected by\n        # https://foss.heptapod.net/pypy/pypy/-/issues/2498,\n        # which was fixed in Cython 0.26, released on 2017-06-19, and used to\n        # generate the C headers of lxml release tarballs published since then, the\n        # first of which was:\n        'lxml>=4.0.0',\n        'PyPyDispatcher>=2.1.0',\n    ]\nelse:\n    install_requires.extend(cpython_dependencies)\n\n\nsetup(\n    name='Scrapy',\n    version=version,\n    url='https://scrapy.org',\n    project_urls={\n        'Documentation': 'https://docs.scrapy.org/',\n        'Source': 'https://github.com/scrapy/scrapy',\n        'Tracker': 'https://github.com/scrapy/scrapy/issues',\n    },\n    description='A high-level Web Crawling and Web Scraping framework',\n    long_description=open('README.rst').read(),\n    author='Scrapy developers',\n    maintainer='Pablo Hoffman',\n    maintainer_email='pablo@pablohoffman.com',\n    license='BSD',\n    packages=find_packages(exclude=('tests', 'tests.*')),\n    include_package_data=True,\n    zip_safe=False,\n    entry_points={\n        'console_scripts': ['scrapy = scrapy.cmdline:execute']\n    },\n    classifiers=[\n        'Framework :: Scrapy',\n        'Development Status :: 5 - Production/Stable',\n        'Environment :: Console',\n        'Intended Audience :: Developers',\n        'License :: OSI Approved :: BSD License',\n        'Operating System :: OS Independent',\n        'Programming Language :: Python',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.6',\n        'Programming Language :: Python :: 3.7',\n        'Programming Language :: Python :: 3.8',\n        'Programming Language :: Python :: Implementation :: CPython',\n        'Programming Language :: Python :: Implementation :: PyPy',\n        'Topic :: Internet :: WWW/HTTP',\n        'Topic :: Software Development :: Libraries :: Application Frameworks',\n        'Topic :: Software Development :: Libraries :: Python Modules',\n    ],\n    python_requires='>=3.6',\n    install_requires=install_requires,\n    extras_require=extras_require,\n)\n", "path": "setup.py"}]}