prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Add support for Django 4.0
  Currently failing tests (See #632)
  
  --- 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 from glob import glob
  2 import subprocess
  3 
  4 from setuptools import find_packages, setup
  5 
  6 REQUIRES = [
  7     'Django>=2.2,<4',
  8     'bleach',
  9     'bleach-allowlist',
  10     'diff-match-patch',
  11     'django-bakery>=0.12.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',
  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.13.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 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
  @@ -8,7 +8,7 @@
       'bleach',
       'bleach-allowlist',
       'diff-match-patch',
  -    'django-bakery>=0.12.0',
  +    'django-bakery>=0.13.0',
       'django-crispy-forms',
       'django-markitup>=4.0.0',
       'django-registration-redux',
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -8,7 +8,7 @@\n     'bleach',\n     'bleach-allowlist',\n     'diff-match-patch',\n-    'django-bakery>=0.12.0',\n+    'django-bakery>=0.13.0',\n     'django-crispy-forms',\n     'django-markitup>=4.0.0',\n     'django-registration-redux',\n", "issue": "Add support for Django 4.0\nCurrently failing tests (See #632)\n", "before_files": [{"content": "from glob import glob\nimport subprocess\n\nfrom setuptools import find_packages, setup\n\nREQUIRES = [\n    'Django>=2.2,<4',\n    'bleach',\n    'bleach-allowlist',\n    'diff-match-patch',\n    'django-bakery>=0.12.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',\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.13.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"}], "after_files": [{"content": "from glob import glob\nimport subprocess\n\nfrom setuptools import find_packages, setup\n\nREQUIRES = [\n    'Django>=2.2,<4',\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',\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.13.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"}]}