prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  icalendar 5.0 breaks the tests
  With icalendar 5.0, the test_ics_view test fails with
  ```
  File "/home/runner/work/wafer/wafer/wafer/schedule/tests/test_views.py", line 1526, in test_ics_view
  20
      self.assertEqual(event['dtstart'].params['value'], 'DATE-TIME')
  21
    File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/icalendar/caselessdict.py", line 40, in __getitem__
  22
      return super().__getitem__(key.upper())
  23
  KeyError: 'VALUE'
  ```
  
  but it works fine with 4.1
  
  There's nothing obvious in the icalendar changelog about this behaviour change, so more investriagtion is needed.
  
  
  </issue>
  <code>
  [start of setup.py]
  1 from glob import glob
  2 import subprocess
  3 
  4 from setuptools import find_packages, setup
  5 
  6 REQUIRES = [
  7     'Django>=2.2,<5',
  8     'bleach',
  9     'bleach-allowlist',
  10     'diff-match-patch',
  11     'django-bakery>=0.13.0',
  12     'django-crispy-forms',
  13     'django-markitup>=4.0.0',
  14     'django-registration-redux',
  15     'django-reversion',
  16     'django-select2',
  17     'djangorestframework',
  18     'drf-extensions>=0.5.0',
  19     'icalendar>=4.0,<5.0',
  20     'jsonfield',
  21     'markdown>=2.5',
  22     'pillow',
  23     'py3dns',
  24     'pyLibravatar',
  25     'pytz',
  26     'requests',
  27 ]
  28 
  29 SOURCES = []
  30 
  31 
  32 with open('README.rst', 'r') as f:
  33     long_description = f.read()
  34 
  35 
  36 def compile_translations():
  37     try:
  38         subprocess.check_call(['./manage.py', 'compilemessages'])
  39     except subprocess.CalledProcessError:
  40         print("WARNING: cannot compile translations.")
  41     return glob('wafer/locale/*/LC_MESSAGES/django.mo')
  42 
  43 
  44 setup(
  45     name="wafer",
  46     version="0.14.1a",
  47     url='http://github.com/CTPUG/wafer',
  48     license='ISC',
  49     description="A wafer-thin Django library for running small conferences.",
  50     long_description=long_description,
  51     long_description_content_type="text/x-rst",
  52     author='CTPUG',
  53     author_email='ctpug@googlegroups.com',
  54     packages=find_packages(),
  55     include_package_data=True,
  56     install_requires=REQUIRES,
  57     dependency_links=SOURCES,
  58     data_files=[
  59         ('locale', compile_translations()),
  60     ],
  61     setup_requires=[
  62         # Add setuptools-git, so we get correct behaviour for
  63         # include_package_data
  64         'setuptools_git >= 1.0',
  65     ],
  66     classifiers=[
  67         'Development Status :: 4 - Beta',
  68         'Intended Audience :: Developers',
  69         'License :: OSI Approved :: ISC License (ISCL)',
  70         'Operating System :: POSIX',
  71         'Programming Language :: Python :: 3',
  72         'Programming Language :: Python :: 3.6',
  73         'Programming Language :: Python :: 3.7',
  74         'Programming Language :: Python :: 3.8',
  75         'Framework :: Django',
  76         'Topic :: Software Development :: Libraries :: Python Modules',
  77         'Topic :: Internet :: WWW/HTTP',
  78     ],
  79 )
  80
  [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
  @@ -16,7 +16,7 @@
       'django-select2',
       'djangorestframework',
       'drf-extensions>=0.5.0',
  -    'icalendar>=4.0,<5.0',
  +    'icalendar>=4.0',
       'jsonfield',
       'markdown>=2.5',
       'pillow',
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -16,7 +16,7 @@\n     'django-select2',\n     'djangorestframework',\n     'drf-extensions>=0.5.0',\n-    'icalendar>=4.0,<5.0',\n+    'icalendar>=4.0',\n     'jsonfield',\n     'markdown>=2.5',\n     'pillow',\n", "issue": "icalendar 5.0 breaks the tests\nWith icalendar 5.0, the test_ics_view test fails with\r\n```\r\nFile \"/home/runner/work/wafer/wafer/wafer/schedule/tests/test_views.py\", line 1526, in test_ics_view\r\n20\r\n    self.assertEqual(event['dtstart'].params['value'], 'DATE-TIME')\r\n21\r\n  File \"/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/icalendar/caselessdict.py\", line 40, in __getitem__\r\n22\r\n    return super().__getitem__(key.upper())\r\n23\r\nKeyError: 'VALUE'\r\n```\r\n\r\nbut it works fine with 4.1\r\n\r\nThere's nothing obvious in the icalendar changelog about this behaviour change, so more investriagtion is needed.\r\n\n", "before_files": [{"content": "from glob import glob\nimport subprocess\n\nfrom setuptools import find_packages, setup\n\nREQUIRES = [\n    'Django>=2.2,<5',\n    'bleach',\n    'bleach-allowlist',\n    'diff-match-patch',\n    'django-bakery>=0.13.0',\n    'django-crispy-forms',\n    'django-markitup>=4.0.0',\n    'django-registration-redux',\n    'django-reversion',\n    'django-select2',\n    'djangorestframework',\n    'drf-extensions>=0.5.0',\n    'icalendar>=4.0,<5.0',\n    'jsonfield',\n    'markdown>=2.5',\n    'pillow',\n    'py3dns',\n    'pyLibravatar',\n    'pytz',\n    'requests',\n]\n\nSOURCES = []\n\n\nwith open('README.rst', 'r') as f:\n    long_description = f.read()\n\n\ndef compile_translations():\n    try:\n        subprocess.check_call(['./manage.py', 'compilemessages'])\n    except subprocess.CalledProcessError:\n        print(\"WARNING: cannot compile translations.\")\n    return glob('wafer/locale/*/LC_MESSAGES/django.mo')\n\n\nsetup(\n    name=\"wafer\",\n    version=\"0.14.1a\",\n    url='http://github.com/CTPUG/wafer',\n    license='ISC',\n    description=\"A wafer-thin Django library for running small conferences.\",\n    long_description=long_description,\n    long_description_content_type=\"text/x-rst\",\n    author='CTPUG',\n    author_email='ctpug@googlegroups.com',\n    packages=find_packages(),\n    include_package_data=True,\n    install_requires=REQUIRES,\n    dependency_links=SOURCES,\n    data_files=[\n        ('locale', compile_translations()),\n    ],\n    setup_requires=[\n        # Add setuptools-git, so we get correct behaviour for\n        # include_package_data\n        'setuptools_git >= 1.0',\n    ],\n    classifiers=[\n        'Development Status :: 4 - Beta',\n        'Intended Audience :: Developers',\n        'License :: OSI Approved :: ISC License (ISCL)',\n        'Operating System :: POSIX',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.6',\n        'Programming Language :: Python :: 3.7',\n        'Programming Language :: Python :: 3.8',\n        'Framework :: Django',\n        'Topic :: Software Development :: Libraries :: Python Modules',\n        'Topic :: Internet :: WWW/HTTP',\n    ],\n)\n", "path": "setup.py"}]}