We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Drop support for Python 3.3


--- 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 import glob
2 import imp
3 import io
4 import os
5 from os import path
6 import re
7 import sys
8 
9 from setuptools import Extension, find_packages, setup
10 
11 MYDIR = path.abspath(os.path.dirname(__file__))
12 
13 VERSION = imp.load_source('version', path.join('.', 'falcon', 'version.py'))
14 VERSION = VERSION.__version__
15 
16 # NOTE(kgriffs): python-mimeparse is better-maintained fork of mimeparse
17 REQUIRES = ['six>=1.4.0', 'python-mimeparse>=1.5.2']
18 
19 try:
20     sys.pypy_version_info
21     PYPY = True
22 except AttributeError:
23     PYPY = False
24 
25 if PYPY:
26     CYTHON = False
27 else:
28     try:
29         from Cython.Distutils import build_ext
30         CYTHON = True
31     except ImportError:
32         # TODO(kgriffs): pip now ignores all output, so the user
33         # may not see this message. See also:
34         #
35         #   https://github.com/pypa/pip/issues/2732
36         #
37         print('\nNOTE: Cython not installed. '
38               'Falcon will still work fine, but may run '
39               'a bit slower.\n')
40         CYTHON = False
41 
42 if CYTHON:
43     def list_modules(dirname):
44         filenames = glob.glob(path.join(dirname, '*.py'))
45 
46         module_names = []
47         for name in filenames:
48             module, ext = path.splitext(path.basename(name))
49             if module != '__init__':
50                 module_names.append(module)
51 
52         return module_names
53 
54     package_names = ['falcon', 'falcon.util', 'falcon.routing', 'falcon.media']
55     ext_modules = [
56         Extension(
57             package + '.' + module,
58             [path.join(*(package.split('.') + [module + '.py']))]
59         )
60         for package in package_names
61         for module in list_modules(path.join(MYDIR, *package.split('.')))
62     ]
63 
64     cmdclass = {'build_ext': build_ext}
65 
66 else:
67     cmdclass = {}
68     ext_modules = []
69 
70 
71 def load_description():
72     in_raw = False
73 
74     description_lines = []
75 
76     # NOTE(kgriffs): PyPI does not support the raw directive
77     for readme_line in io.open('README.rst', 'r', encoding='utf-8'):
78         if readme_line.startswith('.. raw::'):
79             in_raw = True
80         elif in_raw:
81             if readme_line and not re.match('\s', readme_line):
82                 in_raw = False
83 
84         if not in_raw:
85             description_lines.append(readme_line)
86 
87     return ''.join(description_lines)
88 
89 
90 setup(
91     name='falcon',
92     version=VERSION,
93     description='An unladen web framework for building APIs and app backends.',
94     long_description=load_description(),
95     classifiers=[
96         'Development Status :: 5 - Production/Stable',
97         'Environment :: Web Environment',
98         'Natural Language :: English',
99         'Intended Audience :: Developers',
100         'Intended Audience :: System Administrators',
101         'License :: OSI Approved :: Apache Software License',
102         'Operating System :: MacOS :: MacOS X',
103         'Operating System :: Microsoft :: Windows',
104         'Operating System :: POSIX',
105         'Topic :: Internet :: WWW/HTTP :: WSGI',
106         'Topic :: Software Development :: Libraries :: Application Frameworks',
107         'Programming Language :: Python',
108         'Programming Language :: Python :: Implementation :: CPython',
109         'Programming Language :: Python :: Implementation :: PyPy',
110         'Programming Language :: Python :: 2.7',
111         'Programming Language :: Python :: 3.3',
112         'Programming Language :: Python :: 3.4',
113         'Programming Language :: Python :: 3.5',
114         'Programming Language :: Python :: 3.6',
115     ],
116     keywords='wsgi web api framework rest http cloud',
117     author='Kurt Griffiths',
118     author_email='mail@kgriffs.com',
119     url='http://falconframework.org',
120     license='Apache 2.0',
121     packages=find_packages(exclude=['tests']),
122     include_package_data=True,
123     zip_safe=False,
124     python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*',
125     install_requires=REQUIRES,
126     cmdclass=cmdclass,
127     ext_modules=ext_modules,
128     tests_require=['testtools', 'requests', 'pyyaml', 'pytest', 'pytest-runner'],
129     entry_points={
130         'console_scripts': [
131             'falcon-bench = falcon.cmd.bench:main',
132             'falcon-print-routes = falcon.cmd.print_routes:main'
133         ]
134     }
135 )
136
```

Path: `falcon/media/msgpack.py`
Content:
```
1 from __future__ import absolute_import
2 
3 from falcon import errors
4 from falcon.media import BaseHandler
5 
6 
7 class MessagePackHandler(BaseHandler):
8     """Handler built using the :py:mod:`msgpack` module.
9 
10     This handler uses ``msgpack.unpackb()`` and ``msgpack.packb()``. The
11     MessagePack ``bin`` type is used to distinguish between Unicode strings
12     (``str`` on Python 3, ``unicode`` on Python 2) and byte strings
13     (``bytes`` on Python 2/3, or ``str`` on Python 2).
14 
15     Note:
16         This handler requires the extra ``msgpack`` package, which must be
17         installed in addition to ``falcon`` from PyPI:
18 
19         .. code::
20 
21             $ pip install msgpack
22 
23         Python 2.6 users will need to use the deprecated ``msgpack-python``
24         package instead, pinned to version 0.4.8.
25     """
26 
27     def __init__(self):
28         import msgpack
29 
30         self.msgpack = msgpack
31         self.packer = msgpack.Packer(
32             encoding='utf-8',
33             autoreset=True,
34             use_bin_type=True,
35         )
36 
37     def deserialize(self, raw):
38         try:
39             # NOTE(jmvrbanac): Using unpackb since we would need to manage
40             # a buffer for Unpacker() which wouldn't gain us much.
41             return self.msgpack.unpackb(raw, encoding='utf-8')
42         except ValueError as err:
43             raise errors.HTTPBadRequest(
44                 'Invalid MessagePack',
45                 'Could not parse MessagePack body - {0}'.format(err)
46             )
47 
48     def serialize(self, media):
49         return self.packer.pack(media)
50
```
--- 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()

```

diff --git a/falcon/media/msgpack.py b/falcon/media/msgpack.py
--- a/falcon/media/msgpack.py
+++ b/falcon/media/msgpack.py
@@ -19,9 +19,6 @@
         .. code::
 
             $ pip install msgpack
-
-        Python 2.6 users will need to use the deprecated ``msgpack-python``
-        package instead, pinned to version 0.4.8.
     """
 
     def __init__(self):
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -107,8 +107,9 @@
         'Programming Language :: Python',
         'Programming Language :: Python :: Implementation :: CPython',
         'Programming Language :: Python :: Implementation :: PyPy',
+        'Programming Language :: Python :: 2',
         'Programming Language :: Python :: 2.7',
-        'Programming Language :: Python :: 3.3',
+        'Programming Language :: Python :: 3',
         'Programming Language :: Python :: 3.4',
         'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: 3.6',
@@ -121,7 +122,7 @@
     packages=find_packages(exclude=['tests']),
     include_package_data=True,
     zip_safe=False,
-    python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*',
+    python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
     install_requires=REQUIRES,
     cmdclass=cmdclass,
     ext_modules=ext_modules,

{"golden_diff": "diff --git a/falcon/media/msgpack.py b/falcon/media/msgpack.py\n--- a/falcon/media/msgpack.py\n+++ b/falcon/media/msgpack.py\n@@ -19,9 +19,6 @@\n         .. code::\n \n             $ pip install msgpack\n-\n-        Python 2.6 users will need to use the deprecated ``msgpack-python``\n-        package instead, pinned to version 0.4.8.\n     \"\"\"\n \n     def __init__(self):\ndiff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -107,8 +107,9 @@\n         'Programming Language :: Python',\n         'Programming Language :: Python :: Implementation :: CPython',\n         'Programming Language :: Python :: Implementation :: PyPy',\n+        'Programming Language :: Python :: 2',\n         'Programming Language :: Python :: 2.7',\n-        'Programming Language :: Python :: 3.3',\n+        'Programming Language :: Python :: 3',\n         'Programming Language :: Python :: 3.4',\n         'Programming Language :: Python :: 3.5',\n         'Programming Language :: Python :: 3.6',\n@@ -121,7 +122,7 @@\n     packages=find_packages(exclude=['tests']),\n     include_package_data=True,\n     zip_safe=False,\n-    python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*',\n+    python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',\n     install_requires=REQUIRES,\n     cmdclass=cmdclass,\n     ext_modules=ext_modules,\n", "issue": "Drop support for Python 3.3\n\n", "before_files": [{"content": "import glob\nimport imp\nimport io\nimport os\nfrom os import path\nimport re\nimport sys\n\nfrom setuptools import Extension, find_packages, setup\n\nMYDIR = path.abspath(os.path.dirname(__file__))\n\nVERSION = imp.load_source('version', path.join('.', 'falcon', 'version.py'))\nVERSION = VERSION.__version__\n\n# NOTE(kgriffs): python-mimeparse is better-maintained fork of mimeparse\nREQUIRES = ['six>=1.4.0', 'python-mimeparse>=1.5.2']\n\ntry:\n    sys.pypy_version_info\n    PYPY = True\nexcept AttributeError:\n    PYPY = False\n\nif PYPY:\n    CYTHON = False\nelse:\n    try:\n        from Cython.Distutils import build_ext\n        CYTHON = True\n    except ImportError:\n        # TODO(kgriffs): pip now ignores all output, so the user\n        # may not see this message. See also:\n        #\n        #   https://github.com/pypa/pip/issues/2732\n        #\n        print('\\nNOTE: Cython not installed. '\n              'Falcon will still work fine, but may run '\n              'a bit slower.\\n')\n        CYTHON = False\n\nif CYTHON:\n    def list_modules(dirname):\n        filenames = glob.glob(path.join(dirname, '*.py'))\n\n        module_names = []\n        for name in filenames:\n            module, ext = path.splitext(path.basename(name))\n            if module != '__init__':\n                module_names.append(module)\n\n        return module_names\n\n    package_names = ['falcon', 'falcon.util', 'falcon.routing', 'falcon.media']\n    ext_modules = [\n        Extension(\n            package + '.' + module,\n            [path.join(*(package.split('.') + [module + '.py']))]\n        )\n        for package in package_names\n        for module in list_modules(path.join(MYDIR, *package.split('.')))\n    ]\n\n    cmdclass = {'build_ext': build_ext}\n\nelse:\n    cmdclass = {}\n    ext_modules = []\n\n\ndef load_description():\n    in_raw = False\n\n    description_lines = []\n\n    # NOTE(kgriffs): PyPI does not support the raw directive\n    for readme_line in io.open('README.rst', 'r', encoding='utf-8'):\n        if readme_line.startswith('.. raw::'):\n            in_raw = True\n        elif in_raw:\n            if readme_line and not re.match('\\s', readme_line):\n                in_raw = False\n\n        if not in_raw:\n            description_lines.append(readme_line)\n\n    return ''.join(description_lines)\n\n\nsetup(\n    name='falcon',\n    version=VERSION,\n    description='An unladen web framework for building APIs and app backends.',\n    long_description=load_description(),\n    classifiers=[\n        'Development Status :: 5 - Production/Stable',\n        'Environment :: Web Environment',\n        'Natural Language :: English',\n        'Intended Audience :: Developers',\n        'Intended Audience :: System Administrators',\n        'License :: OSI Approved :: Apache Software License',\n        'Operating System :: MacOS :: MacOS X',\n        'Operating System :: Microsoft :: Windows',\n        'Operating System :: POSIX',\n        'Topic :: Internet :: WWW/HTTP :: WSGI',\n        'Topic :: Software Development :: Libraries :: Application Frameworks',\n        'Programming Language :: Python',\n        'Programming Language :: Python :: Implementation :: CPython',\n        'Programming Language :: Python :: Implementation :: PyPy',\n        'Programming Language :: Python :: 2.7',\n        'Programming Language :: Python :: 3.3',\n        'Programming Language :: Python :: 3.4',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n    ],\n    keywords='wsgi web api framework rest http cloud',\n    author='Kurt Griffiths',\n    author_email='mail@kgriffs.com',\n    url='http://falconframework.org',\n    license='Apache 2.0',\n    packages=find_packages(exclude=['tests']),\n    include_package_data=True,\n    zip_safe=False,\n    python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*',\n    install_requires=REQUIRES,\n    cmdclass=cmdclass,\n    ext_modules=ext_modules,\n    tests_require=['testtools', 'requests', 'pyyaml', 'pytest', 'pytest-runner'],\n    entry_points={\n        'console_scripts': [\n            'falcon-bench = falcon.cmd.bench:main',\n            'falcon-print-routes = falcon.cmd.print_routes:main'\n        ]\n    }\n)\n", "path": "setup.py"}, {"content": "from __future__ import absolute_import\n\nfrom falcon import errors\nfrom falcon.media import BaseHandler\n\n\nclass MessagePackHandler(BaseHandler):\n    \"\"\"Handler built using the :py:mod:`msgpack` module.\n\n    This handler uses ``msgpack.unpackb()`` and ``msgpack.packb()``. The\n    MessagePack ``bin`` type is used to distinguish between Unicode strings\n    (``str`` on Python 3, ``unicode`` on Python 2) and byte strings\n    (``bytes`` on Python 2/3, or ``str`` on Python 2).\n\n    Note:\n        This handler requires the extra ``msgpack`` package, which must be\n        installed in addition to ``falcon`` from PyPI:\n\n        .. code::\n\n            $ pip install msgpack\n\n        Python 2.6 users will need to use the deprecated ``msgpack-python``\n        package instead, pinned to version 0.4.8.\n    \"\"\"\n\n    def __init__(self):\n        import msgpack\n\n        self.msgpack = msgpack\n        self.packer = msgpack.Packer(\n            encoding='utf-8',\n            autoreset=True,\n            use_bin_type=True,\n        )\n\n    def deserialize(self, raw):\n        try:\n            # NOTE(jmvrbanac): Using unpackb since we would need to manage\n            # a buffer for Unpacker() which wouldn't gain us much.\n            return self.msgpack.unpackb(raw, encoding='utf-8')\n        except ValueError as err:\n            raise errors.HTTPBadRequest(\n                'Invalid MessagePack',\n                'Could not parse MessagePack body - {0}'.format(err)\n            )\n\n    def serialize(self, media):\n        return self.packer.pack(media)\n", "path": "falcon/media/msgpack.py"}], "after_files": [{"content": "import glob\nimport imp\nimport io\nimport os\nfrom os import path\nimport re\nimport sys\n\nfrom setuptools import Extension, find_packages, setup\n\nMYDIR = path.abspath(os.path.dirname(__file__))\n\nVERSION = imp.load_source('version', path.join('.', 'falcon', 'version.py'))\nVERSION = VERSION.__version__\n\n# NOTE(kgriffs): python-mimeparse is better-maintained fork of mimeparse\nREQUIRES = ['six>=1.4.0', 'python-mimeparse>=1.5.2']\n\ntry:\n    sys.pypy_version_info\n    PYPY = True\nexcept AttributeError:\n    PYPY = False\n\nif PYPY:\n    CYTHON = False\nelse:\n    try:\n        from Cython.Distutils import build_ext\n        CYTHON = True\n    except ImportError:\n        # TODO(kgriffs): pip now ignores all output, so the user\n        # may not see this message. See also:\n        #\n        #   https://github.com/pypa/pip/issues/2732\n        #\n        print('\\nNOTE: Cython not installed. '\n              'Falcon will still work fine, but may run '\n              'a bit slower.\\n')\n        CYTHON = False\n\nif CYTHON:\n    def list_modules(dirname):\n        filenames = glob.glob(path.join(dirname, '*.py'))\n\n        module_names = []\n        for name in filenames:\n            module, ext = path.splitext(path.basename(name))\n            if module != '__init__':\n                module_names.append(module)\n\n        return module_names\n\n    package_names = ['falcon', 'falcon.util', 'falcon.routing', 'falcon.media']\n    ext_modules = [\n        Extension(\n            package + '.' + module,\n            [path.join(*(package.split('.') + [module + '.py']))]\n        )\n        for package in package_names\n        for module in list_modules(path.join(MYDIR, *package.split('.')))\n    ]\n\n    cmdclass = {'build_ext': build_ext}\n\nelse:\n    cmdclass = {}\n    ext_modules = []\n\n\ndef load_description():\n    in_raw = False\n\n    description_lines = []\n\n    # NOTE(kgriffs): PyPI does not support the raw directive\n    for readme_line in io.open('README.rst', 'r', encoding='utf-8'):\n        if readme_line.startswith('.. raw::'):\n            in_raw = True\n        elif in_raw:\n            if readme_line and not re.match('\\s', readme_line):\n                in_raw = False\n\n        if not in_raw:\n            description_lines.append(readme_line)\n\n    return ''.join(description_lines)\n\n\nsetup(\n    name='falcon',\n    version=VERSION,\n    description='An unladen web framework for building APIs and app backends.',\n    long_description=load_description(),\n    classifiers=[\n        'Development Status :: 5 - Production/Stable',\n        'Environment :: Web Environment',\n        'Natural Language :: English',\n        'Intended Audience :: Developers',\n        'Intended Audience :: System Administrators',\n        'License :: OSI Approved :: Apache Software License',\n        'Operating System :: MacOS :: MacOS X',\n        'Operating System :: Microsoft :: Windows',\n        'Operating System :: POSIX',\n        'Topic :: Internet :: WWW/HTTP :: WSGI',\n        'Topic :: Software Development :: Libraries :: Application Frameworks',\n        'Programming Language :: Python',\n        'Programming Language :: Python :: Implementation :: CPython',\n        'Programming Language :: Python :: Implementation :: PyPy',\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    keywords='wsgi web api framework rest http cloud',\n    author='Kurt Griffiths',\n    author_email='mail@kgriffs.com',\n    url='http://falconframework.org',\n    license='Apache 2.0',\n    packages=find_packages(exclude=['tests']),\n    include_package_data=True,\n    zip_safe=False,\n    python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',\n    install_requires=REQUIRES,\n    cmdclass=cmdclass,\n    ext_modules=ext_modules,\n    tests_require=['testtools', 'requests', 'pyyaml', 'pytest', 'pytest-runner'],\n    entry_points={\n        'console_scripts': [\n            'falcon-bench = falcon.cmd.bench:main',\n            'falcon-print-routes = falcon.cmd.print_routes:main'\n        ]\n    }\n)\n", "path": "setup.py"}, {"content": "from __future__ import absolute_import\n\nfrom falcon import errors\nfrom falcon.media import BaseHandler\n\n\nclass MessagePackHandler(BaseHandler):\n    \"\"\"Handler built using the :py:mod:`msgpack` module.\n\n    This handler uses ``msgpack.unpackb()`` and ``msgpack.packb()``. The\n    MessagePack ``bin`` type is used to distinguish between Unicode strings\n    (``str`` on Python 3, ``unicode`` on Python 2) and byte strings\n    (``bytes`` on Python 2/3, or ``str`` on Python 2).\n\n    Note:\n        This handler requires the extra ``msgpack`` package, which must be\n        installed in addition to ``falcon`` from PyPI:\n\n        .. code::\n\n            $ pip install msgpack\n    \"\"\"\n\n    def __init__(self):\n        import msgpack\n\n        self.msgpack = msgpack\n        self.packer = msgpack.Packer(\n            encoding='utf-8',\n            autoreset=True,\n            use_bin_type=True,\n        )\n\n    def deserialize(self, raw):\n        try:\n            # NOTE(jmvrbanac): Using unpackb since we would need to manage\n            # a buffer for Unpacker() which wouldn't gain us much.\n            return self.msgpack.unpackb(raw, encoding='utf-8')\n        except ValueError as err:\n            raise errors.HTTPBadRequest(\n                'Invalid MessagePack',\n                'Could not parse MessagePack body - {0}'.format(err)\n            )\n\n    def serialize(self, media):\n        return self.packer.pack(media)\n", "path": "falcon/media/msgpack.py"}]}