We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Python 2 Deprecated
The 0.4.0 release of torchaudio was the last one supporting python 2, and master no longer officially supports python 2. We're looking to strip the code of python 2 references.
- [x] No longer use package `six` and `backports` for cross-compatibility
- [x] Convert to inline type hinting
- [x] No `__future__` import
- [x] ~~Change string formatting style~~
- [x] Remove mention of python 2.7 in `setup.py`
- [x] Remove older code path in [_check_module_exists](https://github.com/pytorch/audio/blob/master/torchaudio/common_utils.py#L26) and no longer need to check python 3 is not used [at the end of the file](https://github.com/pytorch/audio/blob/master/torchaudio/common_utils.py#L38)
- [x] Update `unicode_decoder` to python 3 only, [here](https://github.com/pytorch/audio/blob/master/torchaudio/datasets/utils.py#L22).
- [x] Replace calls to [makedir_exist_ok](https://github.com/pytorch/audio/blob/master/torchaudio/datasets/utils.py#L51) to `os.makedirs(.., exist_ok=True)`

--- 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 #!/usr/bin/env python
2 import os
3 import shutil
4 import subprocess
5 from pathlib import Path
6 from setuptools import setup, find_packages
7 import distutils.command.clean
8 
9 from build_tools import setup_helpers
10 
11 ROOT_DIR = Path(__file__).parent.resolve()
12 
13 
14 # Creating the version file
15 version = '0.8.0a0'
16 sha = 'Unknown'
17 
18 try:
19     sha = subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd=ROOT_DIR).decode('ascii').strip()
20 except Exception:
21     pass
22 
23 if os.getenv('BUILD_VERSION'):
24     version = os.getenv('BUILD_VERSION')
25 elif sha != 'Unknown':
26     version += '+' + sha[:7]
27 print('-- Building version ' + version)
28 
29 version_path = ROOT_DIR / 'torchaudio' / 'version.py'
30 with open(version_path, 'w') as f:
31     f.write("__version__ = '{}'\n".format(version))
32     f.write("git_version = {}\n".format(repr(sha)))
33 
34 pytorch_package_version = os.getenv('PYTORCH_VERSION')
35 
36 pytorch_package_dep = 'torch'
37 if pytorch_package_version is not None:
38     pytorch_package_dep += "==" + pytorch_package_version
39 
40 
41 class clean(distutils.command.clean.clean):
42     def run(self):
43         # Run default behavior first
44         distutils.command.clean.clean.run(self)
45 
46         # Remove torchaudio extension
47         for path in (ROOT_DIR / 'torchaudio').glob('**/*.so'):
48             print(f'removing \'{path}\'')
49             path.unlink()
50         # Remove build directory
51         build_dirs = [
52             ROOT_DIR / 'build',
53         ]
54         for path in build_dirs:
55             if path.exists():
56                 print(f'removing \'{path}\' (and everything under it)')
57                 shutil.rmtree(str(path), ignore_errors=True)
58 
59 
60 setup(
61     name="torchaudio",
62     version=version,
63     description="An audio package for PyTorch",
64     url="https://github.com/pytorch/audio",
65     author="Soumith Chintala, David Pollack, Sean Naren, Peter Goldsborough",
66     author_email="soumith@pytorch.org",
67     classifiers=[
68         "Environment :: Plugins",
69         "Intended Audience :: Developers",
70         "Intended Audience :: Science/Research",
71         "License :: OSI Approved :: BSD License",
72         "Operating System :: MacOS :: MacOS X",
73         "Operating System :: Microsoft :: Windows",
74         "Operating System :: POSIX",
75         "Programming Language :: C++",
76         "Programming Language :: Python :: 2.7",
77         "Programming Language :: Python :: 3",
78         "Programming Language :: Python :: Implementation :: CPython",
79         "Topic :: Multimedia :: Sound/Audio",
80         "Topic :: Scientific/Engineering :: Artificial Intelligence"
81     ],
82     packages=find_packages(exclude=["build*", "test*", "torchaudio.csrc*", "third_party*", "build_tools*"]),
83     ext_modules=setup_helpers.get_ext_modules(),
84     cmdclass={
85         'build_ext': setup_helpers.BuildExtension.with_options(no_python_abi_suffix=True),
86         'clean': clean,
87     },
88     install_requires=[pytorch_package_dep],
89     zip_safe=False,
90 )
91
```
--- 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/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -73,8 +73,9 @@
         "Operating System :: Microsoft :: Windows",
         "Operating System :: POSIX",
         "Programming Language :: C++",
-        "Programming Language :: Python :: 2.7",
-        "Programming Language :: Python :: 3",
+        "Programming Language :: Python :: 3.6",
+        "Programming Language :: Python :: 3.7",
+        "Programming Language :: Python :: 3.8",
         "Programming Language :: Python :: Implementation :: CPython",
         "Topic :: Multimedia :: Sound/Audio",
         "Topic :: Scientific/Engineering :: Artificial Intelligence"

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -73,8 +73,9 @@\n         \"Operating System :: Microsoft :: Windows\",\n         \"Operating System :: POSIX\",\n         \"Programming Language :: C++\",\n-        \"Programming Language :: Python :: 2.7\",\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         \"Topic :: Multimedia :: Sound/Audio\",\n         \"Topic :: Scientific/Engineering :: Artificial Intelligence\"\n", "issue": "Python 2 Deprecated\nThe 0.4.0 release of torchaudio was the last one supporting python 2, and master no longer officially supports python 2. We're looking to strip the code of python 2 references.\r\n- [x] No longer use package `six` and `backports` for cross-compatibility\r\n- [x] Convert to inline type hinting\r\n- [x] No `__future__` import\r\n- [x] ~~Change string formatting style~~\r\n- [x] Remove mention of python 2.7 in `setup.py`\r\n- [x] Remove older code path in [_check_module_exists](https://github.com/pytorch/audio/blob/master/torchaudio/common_utils.py#L26) and no longer need to check python 3 is not used [at the end of the file](https://github.com/pytorch/audio/blob/master/torchaudio/common_utils.py#L38)\r\n- [x] Update `unicode_decoder` to python 3 only, [here](https://github.com/pytorch/audio/blob/master/torchaudio/datasets/utils.py#L22).\r\n- [x] Replace calls to [makedir_exist_ok](https://github.com/pytorch/audio/blob/master/torchaudio/datasets/utils.py#L51) to `os.makedirs(.., exist_ok=True)`\n", "before_files": [{"content": "#!/usr/bin/env python\nimport os\nimport shutil\nimport subprocess\nfrom pathlib import Path\nfrom setuptools import setup, find_packages\nimport distutils.command.clean\n\nfrom build_tools import setup_helpers\n\nROOT_DIR = Path(__file__).parent.resolve()\n\n\n# Creating the version file\nversion = '0.8.0a0'\nsha = 'Unknown'\n\ntry:\n    sha = subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd=ROOT_DIR).decode('ascii').strip()\nexcept Exception:\n    pass\n\nif os.getenv('BUILD_VERSION'):\n    version = os.getenv('BUILD_VERSION')\nelif sha != 'Unknown':\n    version += '+' + sha[:7]\nprint('-- Building version ' + version)\n\nversion_path = ROOT_DIR / 'torchaudio' / 'version.py'\nwith open(version_path, 'w') as f:\n    f.write(\"__version__ = '{}'\\n\".format(version))\n    f.write(\"git_version = {}\\n\".format(repr(sha)))\n\npytorch_package_version = os.getenv('PYTORCH_VERSION')\n\npytorch_package_dep = 'torch'\nif pytorch_package_version is not None:\n    pytorch_package_dep += \"==\" + pytorch_package_version\n\n\nclass clean(distutils.command.clean.clean):\n    def run(self):\n        # Run default behavior first\n        distutils.command.clean.clean.run(self)\n\n        # Remove torchaudio extension\n        for path in (ROOT_DIR / 'torchaudio').glob('**/*.so'):\n            print(f'removing \\'{path}\\'')\n            path.unlink()\n        # Remove build directory\n        build_dirs = [\n            ROOT_DIR / 'build',\n        ]\n        for path in build_dirs:\n            if path.exists():\n                print(f'removing \\'{path}\\' (and everything under it)')\n                shutil.rmtree(str(path), ignore_errors=True)\n\n\nsetup(\n    name=\"torchaudio\",\n    version=version,\n    description=\"An audio package for PyTorch\",\n    url=\"https://github.com/pytorch/audio\",\n    author=\"Soumith Chintala, David Pollack, Sean Naren, Peter Goldsborough\",\n    author_email=\"soumith@pytorch.org\",\n    classifiers=[\n        \"Environment :: Plugins\",\n        \"Intended Audience :: Developers\",\n        \"Intended Audience :: Science/Research\",\n        \"License :: OSI Approved :: BSD License\",\n        \"Operating System :: MacOS :: MacOS X\",\n        \"Operating System :: Microsoft :: Windows\",\n        \"Operating System :: POSIX\",\n        \"Programming Language :: C++\",\n        \"Programming Language :: Python :: 2.7\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: Implementation :: CPython\",\n        \"Topic :: Multimedia :: Sound/Audio\",\n        \"Topic :: Scientific/Engineering :: Artificial Intelligence\"\n    ],\n    packages=find_packages(exclude=[\"build*\", \"test*\", \"torchaudio.csrc*\", \"third_party*\", \"build_tools*\"]),\n    ext_modules=setup_helpers.get_ext_modules(),\n    cmdclass={\n        'build_ext': setup_helpers.BuildExtension.with_options(no_python_abi_suffix=True),\n        'clean': clean,\n    },\n    install_requires=[pytorch_package_dep],\n    zip_safe=False,\n)\n", "path": "setup.py"}], "after_files": [{"content": "#!/usr/bin/env python\nimport os\nimport shutil\nimport subprocess\nfrom pathlib import Path\nfrom setuptools import setup, find_packages\nimport distutils.command.clean\n\nfrom build_tools import setup_helpers\n\nROOT_DIR = Path(__file__).parent.resolve()\n\n\n# Creating the version file\nversion = '0.8.0a0'\nsha = 'Unknown'\n\ntry:\n    sha = subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd=ROOT_DIR).decode('ascii').strip()\nexcept Exception:\n    pass\n\nif os.getenv('BUILD_VERSION'):\n    version = os.getenv('BUILD_VERSION')\nelif sha != 'Unknown':\n    version += '+' + sha[:7]\nprint('-- Building version ' + version)\n\nversion_path = ROOT_DIR / 'torchaudio' / 'version.py'\nwith open(version_path, 'w') as f:\n    f.write(\"__version__ = '{}'\\n\".format(version))\n    f.write(\"git_version = {}\\n\".format(repr(sha)))\n\npytorch_package_version = os.getenv('PYTORCH_VERSION')\n\npytorch_package_dep = 'torch'\nif pytorch_package_version is not None:\n    pytorch_package_dep += \"==\" + pytorch_package_version\n\n\nclass clean(distutils.command.clean.clean):\n    def run(self):\n        # Run default behavior first\n        distutils.command.clean.clean.run(self)\n\n        # Remove torchaudio extension\n        for path in (ROOT_DIR / 'torchaudio').glob('**/*.so'):\n            print(f'removing \\'{path}\\'')\n            path.unlink()\n        # Remove build directory\n        build_dirs = [\n            ROOT_DIR / 'build',\n        ]\n        for path in build_dirs:\n            if path.exists():\n                print(f'removing \\'{path}\\' (and everything under it)')\n                shutil.rmtree(str(path), ignore_errors=True)\n\n\nsetup(\n    name=\"torchaudio\",\n    version=version,\n    description=\"An audio package for PyTorch\",\n    url=\"https://github.com/pytorch/audio\",\n    author=\"Soumith Chintala, David Pollack, Sean Naren, Peter Goldsborough\",\n    author_email=\"soumith@pytorch.org\",\n    classifiers=[\n        \"Environment :: Plugins\",\n        \"Intended Audience :: Developers\",\n        \"Intended Audience :: Science/Research\",\n        \"License :: OSI Approved :: BSD License\",\n        \"Operating System :: MacOS :: MacOS X\",\n        \"Operating System :: Microsoft :: Windows\",\n        \"Operating System :: POSIX\",\n        \"Programming Language :: C++\",\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        \"Topic :: Multimedia :: Sound/Audio\",\n        \"Topic :: Scientific/Engineering :: Artificial Intelligence\"\n    ],\n    packages=find_packages(exclude=[\"build*\", \"test*\", \"torchaudio.csrc*\", \"third_party*\", \"build_tools*\"]),\n    ext_modules=setup_helpers.get_ext_modules(),\n    cmdclass={\n        'build_ext': setup_helpers.BuildExtension.with_options(no_python_abi_suffix=True),\n        'clean': clean,\n    },\n    install_requires=[pytorch_package_dep],\n    zip_safe=False,\n)\n", "path": "setup.py"}]}