prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  python 3.10 issue
  I have an issue with python 3.10 and Flexget. Greenlet has been updated to 1.1.2 because the 1.0.0 version is not compatible with python 3.10. After that Flexget was installed successfully but I got the error message below.
  
  - FlexGet version: 3.1.137
  - Python version: 3.10
  - Installation method: pip
  - Using daemon (yes/no): no
  - OS and version: Linux / Slackware / 5.14.8 kernel
  
  Traceback (most recent call last):
    File "/usr/bin/flexget", line 5, in <module>
      from flexget import main
    File "/usr/lib/python3.10/site-packages/flexget/__init__.py", line 11, in <module>
      from flexget.manager import Manager  # noqa
    File "/usr/lib/python3.10/site-packages/flexget/manager.py", line 47, in <module>
      from flexget.ipc import IPCClient, IPCServer  # noqa
    File "/usr/lib/python3.10/site-packages/flexget/ipc.py", line 14, in <module>
      from flexget import terminal
    File "/usr/lib/python3.10/site-packages/flexget/terminal.py", line 7, in <module>
      from colorclass import Color, Windows
    File "/usr/lib/python3.10/site-packages/colorclass/__init__.py", line 11, in <module>
      from colorclass.codes import list_tags  # noqa
    File "/usr/lib/python3.10/site-packages/colorclass/codes.py", line 4, in <module>
      from collections import Mapping
  ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)
  
  Thanks!
  
  </issue>
  <code>
  [start of setup.py]
  1 import sys
  2 from pathlib import Path
  3 from typing import List
  4 
  5 from setuptools import find_packages, setup
  6 
  7 long_description = Path('README.rst').read_text()
  8 
  9 # Populates __version__ without importing the package
  10 __version__ = None
  11 with open('flexget/_version.py', encoding='utf-8') as ver_file:
  12     exec(ver_file.read())  # pylint: disable=W0122
  13 if not __version__:
  14     print('Could not find __version__ from flexget/_version.py')
  15     sys.exit(1)
  16 
  17 
  18 def load_requirements(filename: str) -> List[str]:
  19     return [
  20         line.strip()
  21         for line in Path(filename).read_text().splitlines()
  22         if not line.startswith('#')
  23     ]
  24 
  25 
  26 setup(
  27     name='FlexGet',
  28     version=__version__,
  29     description='FlexGet is a program aimed to automate downloading or processing content (torrents, podcasts, etc.) '
  30     'from different sources like RSS-feeds, html-pages, various sites and more.',
  31     long_description=long_description,
  32     long_description_content_type='text/x-rst',
  33     author='Marko Koivusalo',
  34     author_email='marko.koivusalo@gmail.com',
  35     license='MIT',
  36     url='https://flexget.com',
  37     project_urls={
  38         'Repository': 'https://github.com/Flexget/Flexget',
  39         'Issue Tracker': 'https://github.com/Flexget/Flexget/issues',
  40         'Forum': 'https://discuss.flexget.com',
  41     },
  42     packages=find_packages(exclude=['flexget.tests']),
  43     include_package_data=True,
  44     zip_safe=False,
  45     install_requires=load_requirements('requirements.txt'),
  46     tests_require=['pytest'],
  47     extras_require={'dev': load_requirements('dev-requirements.txt')},
  48     entry_points={
  49         'console_scripts': ['flexget = flexget:main'],
  50         'gui_scripts': [
  51             'flexget-headless = flexget:main'
  52         ],  # This is useful on Windows to avoid a cmd popup
  53     },
  54     python_requires='>=3.6',
  55     classifiers=[
  56         "Development Status :: 5 - Production/Stable",
  57         "License :: OSI Approved :: MIT License",
  58         "Operating System :: OS Independent",
  59         "Programming Language :: Python",
  60         "Programming Language :: Python :: 3.6",
  61         "Programming Language :: Python :: 3.7",
  62         "Programming Language :: Python :: 3.8",
  63         "Programming Language :: Python :: 3.9",
  64         "Programming Language :: Python :: Implementation :: CPython",
  65         "Programming Language :: Python :: Implementation :: PyPy",
  66     ],
  67 )
  68
  [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
  @@ -61,6 +61,7 @@
           "Programming Language :: Python :: 3.7",
           "Programming Language :: Python :: 3.8",
           "Programming Language :: Python :: 3.9",
  +        "Programming Language :: Python :: 3.10",
           "Programming Language :: Python :: Implementation :: CPython",
           "Programming Language :: Python :: Implementation :: PyPy",
       ],
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -61,6 +61,7 @@\n         \"Programming Language :: Python :: 3.7\",\n         \"Programming Language :: Python :: 3.8\",\n         \"Programming Language :: Python :: 3.9\",\n+        \"Programming Language :: Python :: 3.10\",\n         \"Programming Language :: Python :: Implementation :: CPython\",\n         \"Programming Language :: Python :: Implementation :: PyPy\",\n     ],\n", "issue": "python 3.10 issue\nI have an issue with python 3.10 and Flexget. Greenlet has been updated to 1.1.2 because the 1.0.0 version is not compatible with python 3.10. After that Flexget was installed successfully but I got the error message below.\r\n\r\n- FlexGet version: 3.1.137\r\n- Python version: 3.10\r\n- Installation method: pip\r\n- Using daemon (yes/no): no\r\n- OS and version: Linux / Slackware / 5.14.8 kernel\r\n\r\nTraceback (most recent call last):\r\n  File \"/usr/bin/flexget\", line 5, in <module>\r\n    from flexget import main\r\n  File \"/usr/lib/python3.10/site-packages/flexget/__init__.py\", line 11, in <module>\r\n    from flexget.manager import Manager  # noqa\r\n  File \"/usr/lib/python3.10/site-packages/flexget/manager.py\", line 47, in <module>\r\n    from flexget.ipc import IPCClient, IPCServer  # noqa\r\n  File \"/usr/lib/python3.10/site-packages/flexget/ipc.py\", line 14, in <module>\r\n    from flexget import terminal\r\n  File \"/usr/lib/python3.10/site-packages/flexget/terminal.py\", line 7, in <module>\r\n    from colorclass import Color, Windows\r\n  File \"/usr/lib/python3.10/site-packages/colorclass/__init__.py\", line 11, in <module>\r\n    from colorclass.codes import list_tags  # noqa\r\n  File \"/usr/lib/python3.10/site-packages/colorclass/codes.py\", line 4, in <module>\r\n    from collections import Mapping\r\nImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)\r\n\r\nThanks!\n", "before_files": [{"content": "import sys\nfrom pathlib import Path\nfrom typing import List\n\nfrom setuptools import find_packages, setup\n\nlong_description = Path('README.rst').read_text()\n\n# Populates __version__ without importing the package\n__version__ = None\nwith open('flexget/_version.py', encoding='utf-8') as ver_file:\n    exec(ver_file.read())  # pylint: disable=W0122\nif not __version__:\n    print('Could not find __version__ from flexget/_version.py')\n    sys.exit(1)\n\n\ndef load_requirements(filename: str) -> List[str]:\n    return [\n        line.strip()\n        for line in Path(filename).read_text().splitlines()\n        if not line.startswith('#')\n    ]\n\n\nsetup(\n    name='FlexGet',\n    version=__version__,\n    description='FlexGet is a program aimed to automate downloading or processing content (torrents, podcasts, etc.) '\n    'from different sources like RSS-feeds, html-pages, various sites and more.',\n    long_description=long_description,\n    long_description_content_type='text/x-rst',\n    author='Marko Koivusalo',\n    author_email='marko.koivusalo@gmail.com',\n    license='MIT',\n    url='https://flexget.com',\n    project_urls={\n        'Repository': 'https://github.com/Flexget/Flexget',\n        'Issue Tracker': 'https://github.com/Flexget/Flexget/issues',\n        'Forum': 'https://discuss.flexget.com',\n    },\n    packages=find_packages(exclude=['flexget.tests']),\n    include_package_data=True,\n    zip_safe=False,\n    install_requires=load_requirements('requirements.txt'),\n    tests_require=['pytest'],\n    extras_require={'dev': load_requirements('dev-requirements.txt')},\n    entry_points={\n        'console_scripts': ['flexget = flexget:main'],\n        'gui_scripts': [\n            'flexget-headless = flexget:main'\n        ],  # This is useful on Windows to avoid a cmd popup\n    },\n    python_requires='>=3.6',\n    classifiers=[\n        \"Development Status :: 5 - Production/Stable\",\n        \"License :: OSI Approved :: MIT License\",\n        \"Operating System :: OS Independent\",\n        \"Programming Language :: Python\",\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    ],\n)\n", "path": "setup.py"}]}