prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  0.3.2 Release
  Closes #562 
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `src/streamlink/__init__.py`
  Content:
  ```
  1 # coding: utf8
  2 """Streamlink extracts streams from various services.
  3 
  4 The main compontent of Streamlink is a command-line utility that
  5 launches the streams in a video player.
  6 
  7 An API is also provided that allows direct access to stream data.
  8 
  9 Full documentation is available at https://streamlink.github.io.
  10 
  11 """
  12 
  13 
  14 __title__ = "streamlink"
  15 __version__ = "0.3.1"
  16 __license__ = "Simplified BSD"
  17 __author__ = "Streamlink"
  18 __copyright__ = "Copyright 2016 Streamlink"
  19 __credits__ = [
  20     "Agustín Carrasco (@asermax)",
  21     "Andrew Bashore (@bashtech)",
  22     "Andy Mikhailenko (@neithere)",
  23     "Athanasios Oikonomou (@athoik)",
  24     "Brian Callahan (@ibara)",
  25     "Che (@chhe)",
  26     "Christopher Rosell (@streamlink)",
  27     "Daniel Meißner (@meise)",
  28     "Daniel Miranda (@danielkza)",
  29     "Daniel Wallace (@gtmanfred)",
  30     "David Arvelo (@darvelo)",
  31     "Dominik Dabrowski (@doda)",
  32     "Erik G (@tboss)",
  33     "Eric J (@wormeyman)",
  34     "Ethan Jones (@jonesz)",
  35     "Gaspard Jankowiak (@gapato)",
  36     "Jaime Marquínez Ferrándiz (@jaimeMF)",
  37     "Jan Tore Morken (@jantore)",
  38     "John Peterson (@john-peterson)",
  39     "Jon Bergli Heier (@sn4kebite)",
  40     "Joseph Glanville (@josephglanville)",
  41     "Julian Richen (@FireDart)",
  42     "Kacper (@kasper93)",
  43     "Martin Panter (@vadmium)",
  44     "Max Nordlund (@maxnordlund)",
  45     "Michael Cheah (@cheah)",
  46     "Moritz Blanke",
  47     "Niall McAndrew (@niallm90)",
  48     "Niels Kräupl (@Gamewalker)",
  49     "Pascal Romahn (@skulblakka)",
  50     "Sam Edwards (@dotsam)",
  51     "Stefan Breunig (@breunigs)",
  52     "Suhail Patel (@suhailpatel)",
  53     "Sunaga Takahiro (@sunaga720)",
  54     "Vitaly Evtushenko (@eltiren)",
  55     "Warnar Boekkooi (@boekkooi)",
  56     "@blxd",
  57     "@btiom",
  58     "@daslicious",
  59     "@MasterofJOKers",
  60     "@mammothb",
  61     "@medina",
  62     "@monkeyphysics",
  63     "@nixxquality",
  64     "@papplampe",
  65     "@Raziel-23",
  66     "@t0mm0",
  67     "@ToadKing",
  68     "@unintended",
  69     "@wolftankk",
  70     "@yeeeargh"
  71 ]
  72 
  73 from .api import streams
  74 from .exceptions import (StreamlinkError, PluginError, NoStreamsError,
  75                          NoPluginError, StreamError)
  76 from .session import Streamlink
  77
  ```
  
  Path: `setup.py`
  Content:
  ```
  1 #!/usr/bin/env python
  2 
  3 from os import environ
  4 from os.path import abspath, dirname, join
  5 from setuptools import setup, find_packages
  6 from sys import version_info, path as sys_path
  7 
  8 deps = []
  9 
  10 if version_info[0] == 2:
  11     # Require backport of concurrent.futures on Python 2
  12     deps.append("futures")
  13 
  14     # Require backport of argparse on Python 2.6
  15     if version_info[1] == 6:
  16         deps.append("argparse")
  17 
  18 # Require singledispatch on Python <3.4
  19 if version_info[0] == 2 or (version_info[0] == 3 and version_info[1] < 4):
  20     deps.append("singledispatch")
  21 
  22 # requests 2.0 does not work correctly on Python <2.6.3
  23 if (version_info[0] == 2 and version_info[1] == 6 and version_info[2] < 3):
  24     deps.append("requests>=1.0,<2.0")
  25 else:
  26     deps.append("requests>=1.0,!=2.12.0,!=2.12.1,<3.0")
  27 
  28 # this version of pycryptodome is known to work and has a Windows wheel for py2.7, py3.3-3.6
  29 deps.append("pycryptodome>=3.4.3,<4")
  30 
  31 # shutil.get_terminal_size and which were added in Python 3.3
  32 if version_info[0] == 2:
  33     deps.append("backports.shutil_which")
  34     deps.append("backports.shutil_get_terminal_size")
  35 
  36 # for localization
  37 deps.append("iso-639")
  38 deps.append("iso3166")
  39 
  40 # When we build an egg for the Win32 bootstrap we don't want dependency
  41 # information built into it.
  42 if environ.get("NO_DEPS"):
  43     deps = []
  44 
  45 srcdir = join(dirname(abspath(__file__)), "src/")
  46 sys_path.insert(0, srcdir)
  47 
  48 setup(name="streamlink",
  49       version="0.3.1",
  50       description="Streamlink is command-line utility that extracts streams "
  51                   "from various services and pipes them into a video player of "
  52                   "choice.",
  53       url="https://github.com/streamlink/streamlink",
  54       author="Streamlink",
  55       author_email="charlie@charliedrage.com",  # temp until we have a mailing list / global email
  56       license="Simplified BSD",
  57       packages=find_packages("src"),
  58       package_dir={"": "src"},
  59       entry_points={
  60           "console_scripts": ["streamlink=streamlink_cli.main:main"]
  61       },
  62       install_requires=deps,
  63       test_suite="tests",
  64       classifiers=["Development Status :: 5 - Production/Stable",
  65                    "Environment :: Console",
  66                    "Operating System :: POSIX",
  67                    "Operating System :: Microsoft :: Windows",
  68                    "Programming Language :: Python :: 2.6",
  69                    "Programming Language :: Python :: 2.7",
  70                    "Programming Language :: Python :: 3.3",
  71                    "Programming Language :: Python :: 3.4",
  72                    "Topic :: Internet :: WWW/HTTP",
  73                    "Topic :: Multimedia :: Sound/Audio",
  74                    "Topic :: Multimedia :: Video",
  75                    "Topic :: Utilities"])
  76
  ```
  --- 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
  @@ -46,7 +46,7 @@
   sys_path.insert(0, srcdir)
   
   setup(name="streamlink",
  -      version="0.3.1",
  +      version="0.3.2",
         description="Streamlink is command-line utility that extracts streams "
                     "from various services and pipes them into a video player of "
                     "choice.",
  diff --git a/src/streamlink/__init__.py b/src/streamlink/__init__.py
  --- a/src/streamlink/__init__.py
  +++ b/src/streamlink/__init__.py
  @@ -12,7 +12,7 @@
   
   
   __title__ = "streamlink"
  -__version__ = "0.3.1"
  +__version__ = "0.3.2"
   __license__ = "Simplified BSD"
   __author__ = "Streamlink"
   __copyright__ = "Copyright 2016 Streamlink"
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -46,7 +46,7 @@\n sys_path.insert(0, srcdir)\n \n setup(name=\"streamlink\",\n-      version=\"0.3.1\",\n+      version=\"0.3.2\",\n       description=\"Streamlink is command-line utility that extracts streams \"\n                   \"from various services and pipes them into a video player of \"\n                   \"choice.\",\ndiff --git a/src/streamlink/__init__.py b/src/streamlink/__init__.py\n--- a/src/streamlink/__init__.py\n+++ b/src/streamlink/__init__.py\n@@ -12,7 +12,7 @@\n \n \n __title__ = \"streamlink\"\n-__version__ = \"0.3.1\"\n+__version__ = \"0.3.2\"\n __license__ = \"Simplified BSD\"\n __author__ = \"Streamlink\"\n __copyright__ = \"Copyright 2016 Streamlink\"\n", "issue": "0.3.2 Release\nCloses #562 \n", "before_files": [{"content": "# coding: utf8\n\"\"\"Streamlink extracts streams from various services.\n\nThe main compontent of Streamlink is a command-line utility that\nlaunches the streams in a video player.\n\nAn API is also provided that allows direct access to stream data.\n\nFull documentation is available at https://streamlink.github.io.\n\n\"\"\"\n\n\n__title__ = \"streamlink\"\n__version__ = \"0.3.1\"\n__license__ = \"Simplified BSD\"\n__author__ = \"Streamlink\"\n__copyright__ = \"Copyright 2016 Streamlink\"\n__credits__ = [\n    \"Agust\u00edn Carrasco (@asermax)\",\n    \"Andrew Bashore (@bashtech)\",\n    \"Andy Mikhailenko (@neithere)\",\n    \"Athanasios Oikonomou (@athoik)\",\n    \"Brian Callahan (@ibara)\",\n    \"Che (@chhe)\",\n    \"Christopher Rosell (@streamlink)\",\n    \"Daniel Mei\u00dfner (@meise)\",\n    \"Daniel Miranda (@danielkza)\",\n    \"Daniel Wallace (@gtmanfred)\",\n    \"David Arvelo (@darvelo)\",\n    \"Dominik Dabrowski (@doda)\",\n    \"Erik G (@tboss)\",\n    \"Eric J (@wormeyman)\",\n    \"Ethan Jones (@jonesz)\",\n    \"Gaspard Jankowiak (@gapato)\",\n    \"Jaime Marqu\u00ednez Ferr\u00e1ndiz (@jaimeMF)\",\n    \"Jan Tore Morken (@jantore)\",\n    \"John Peterson (@john-peterson)\",\n    \"Jon Bergli Heier (@sn4kebite)\",\n    \"Joseph Glanville (@josephglanville)\",\n    \"Julian Richen (@FireDart)\",\n    \"Kacper (@kasper93)\",\n    \"Martin Panter (@vadmium)\",\n    \"Max Nordlund (@maxnordlund)\",\n    \"Michael Cheah (@cheah)\",\n    \"Moritz Blanke\",\n    \"Niall McAndrew (@niallm90)\",\n    \"Niels Kr\u00e4upl (@Gamewalker)\",\n    \"Pascal Romahn (@skulblakka)\",\n    \"Sam Edwards (@dotsam)\",\n    \"Stefan Breunig (@breunigs)\",\n    \"Suhail Patel (@suhailpatel)\",\n    \"Sunaga Takahiro (@sunaga720)\",\n    \"Vitaly Evtushenko (@eltiren)\",\n    \"Warnar Boekkooi (@boekkooi)\",\n    \"@blxd\",\n    \"@btiom\",\n    \"@daslicious\",\n    \"@MasterofJOKers\",\n    \"@mammothb\",\n    \"@medina\",\n    \"@monkeyphysics\",\n    \"@nixxquality\",\n    \"@papplampe\",\n    \"@Raziel-23\",\n    \"@t0mm0\",\n    \"@ToadKing\",\n    \"@unintended\",\n    \"@wolftankk\",\n    \"@yeeeargh\"\n]\n\nfrom .api import streams\nfrom .exceptions import (StreamlinkError, PluginError, NoStreamsError,\n                         NoPluginError, StreamError)\nfrom .session import Streamlink\n", "path": "src/streamlink/__init__.py"}, {"content": "#!/usr/bin/env python\n\nfrom os import environ\nfrom os.path import abspath, dirname, join\nfrom setuptools import setup, find_packages\nfrom sys import version_info, path as sys_path\n\ndeps = []\n\nif version_info[0] == 2:\n    # Require backport of concurrent.futures on Python 2\n    deps.append(\"futures\")\n\n    # Require backport of argparse on Python 2.6\n    if version_info[1] == 6:\n        deps.append(\"argparse\")\n\n# Require singledispatch on Python <3.4\nif version_info[0] == 2 or (version_info[0] == 3 and version_info[1] < 4):\n    deps.append(\"singledispatch\")\n\n# requests 2.0 does not work correctly on Python <2.6.3\nif (version_info[0] == 2 and version_info[1] == 6 and version_info[2] < 3):\n    deps.append(\"requests>=1.0,<2.0\")\nelse:\n    deps.append(\"requests>=1.0,!=2.12.0,!=2.12.1,<3.0\")\n\n# this version of pycryptodome is known to work and has a Windows wheel for py2.7, py3.3-3.6\ndeps.append(\"pycryptodome>=3.4.3,<4\")\n\n# shutil.get_terminal_size and which were added in Python 3.3\nif version_info[0] == 2:\n    deps.append(\"backports.shutil_which\")\n    deps.append(\"backports.shutil_get_terminal_size\")\n\n# for localization\ndeps.append(\"iso-639\")\ndeps.append(\"iso3166\")\n\n# When we build an egg for the Win32 bootstrap we don't want dependency\n# information built into it.\nif environ.get(\"NO_DEPS\"):\n    deps = []\n\nsrcdir = join(dirname(abspath(__file__)), \"src/\")\nsys_path.insert(0, srcdir)\n\nsetup(name=\"streamlink\",\n      version=\"0.3.1\",\n      description=\"Streamlink is command-line utility that extracts streams \"\n                  \"from various services and pipes them into a video player of \"\n                  \"choice.\",\n      url=\"https://github.com/streamlink/streamlink\",\n      author=\"Streamlink\",\n      author_email=\"charlie@charliedrage.com\",  # temp until we have a mailing list / global email\n      license=\"Simplified BSD\",\n      packages=find_packages(\"src\"),\n      package_dir={\"\": \"src\"},\n      entry_points={\n          \"console_scripts\": [\"streamlink=streamlink_cli.main:main\"]\n      },\n      install_requires=deps,\n      test_suite=\"tests\",\n      classifiers=[\"Development Status :: 5 - Production/Stable\",\n                   \"Environment :: Console\",\n                   \"Operating System :: POSIX\",\n                   \"Operating System :: Microsoft :: Windows\",\n                   \"Programming Language :: Python :: 2.6\",\n                   \"Programming Language :: Python :: 2.7\",\n                   \"Programming Language :: Python :: 3.3\",\n                   \"Programming Language :: Python :: 3.4\",\n                   \"Topic :: Internet :: WWW/HTTP\",\n                   \"Topic :: Multimedia :: Sound/Audio\",\n                   \"Topic :: Multimedia :: Video\",\n                   \"Topic :: Utilities\"])\n", "path": "setup.py"}], "after_files": [{"content": "# coding: utf8\n\"\"\"Streamlink extracts streams from various services.\n\nThe main compontent of Streamlink is a command-line utility that\nlaunches the streams in a video player.\n\nAn API is also provided that allows direct access to stream data.\n\nFull documentation is available at https://streamlink.github.io.\n\n\"\"\"\n\n\n__title__ = \"streamlink\"\n__version__ = \"0.3.2\"\n__license__ = \"Simplified BSD\"\n__author__ = \"Streamlink\"\n__copyright__ = \"Copyright 2016 Streamlink\"\n__credits__ = [\n    \"Agust\u00edn Carrasco (@asermax)\",\n    \"Andrew Bashore (@bashtech)\",\n    \"Andy Mikhailenko (@neithere)\",\n    \"Athanasios Oikonomou (@athoik)\",\n    \"Brian Callahan (@ibara)\",\n    \"Che (@chhe)\",\n    \"Christopher Rosell (@streamlink)\",\n    \"Daniel Mei\u00dfner (@meise)\",\n    \"Daniel Miranda (@danielkza)\",\n    \"Daniel Wallace (@gtmanfred)\",\n    \"David Arvelo (@darvelo)\",\n    \"Dominik Dabrowski (@doda)\",\n    \"Erik G (@tboss)\",\n    \"Eric J (@wormeyman)\",\n    \"Ethan Jones (@jonesz)\",\n    \"Gaspard Jankowiak (@gapato)\",\n    \"Jaime Marqu\u00ednez Ferr\u00e1ndiz (@jaimeMF)\",\n    \"Jan Tore Morken (@jantore)\",\n    \"John Peterson (@john-peterson)\",\n    \"Jon Bergli Heier (@sn4kebite)\",\n    \"Joseph Glanville (@josephglanville)\",\n    \"Julian Richen (@FireDart)\",\n    \"Kacper (@kasper93)\",\n    \"Martin Panter (@vadmium)\",\n    \"Max Nordlund (@maxnordlund)\",\n    \"Michael Cheah (@cheah)\",\n    \"Moritz Blanke\",\n    \"Niall McAndrew (@niallm90)\",\n    \"Niels Kr\u00e4upl (@Gamewalker)\",\n    \"Pascal Romahn (@skulblakka)\",\n    \"Sam Edwards (@dotsam)\",\n    \"Stefan Breunig (@breunigs)\",\n    \"Suhail Patel (@suhailpatel)\",\n    \"Sunaga Takahiro (@sunaga720)\",\n    \"Vitaly Evtushenko (@eltiren)\",\n    \"Warnar Boekkooi (@boekkooi)\",\n    \"@blxd\",\n    \"@btiom\",\n    \"@daslicious\",\n    \"@MasterofJOKers\",\n    \"@mammothb\",\n    \"@medina\",\n    \"@monkeyphysics\",\n    \"@nixxquality\",\n    \"@papplampe\",\n    \"@Raziel-23\",\n    \"@t0mm0\",\n    \"@ToadKing\",\n    \"@unintended\",\n    \"@wolftankk\",\n    \"@yeeeargh\"\n]\n\nfrom .api import streams\nfrom .exceptions import (StreamlinkError, PluginError, NoStreamsError,\n                         NoPluginError, StreamError)\nfrom .session import Streamlink\n", "path": "src/streamlink/__init__.py"}, {"content": "#!/usr/bin/env python\n\nfrom os import environ\nfrom os.path import abspath, dirname, join\nfrom setuptools import setup, find_packages\nfrom sys import version_info, path as sys_path\n\ndeps = []\n\nif version_info[0] == 2:\n    # Require backport of concurrent.futures on Python 2\n    deps.append(\"futures\")\n\n    # Require backport of argparse on Python 2.6\n    if version_info[1] == 6:\n        deps.append(\"argparse\")\n\n# Require singledispatch on Python <3.4\nif version_info[0] == 2 or (version_info[0] == 3 and version_info[1] < 4):\n    deps.append(\"singledispatch\")\n\n# requests 2.0 does not work correctly on Python <2.6.3\nif (version_info[0] == 2 and version_info[1] == 6 and version_info[2] < 3):\n    deps.append(\"requests>=1.0,<2.0\")\nelse:\n    deps.append(\"requests>=1.0,!=2.12.0,!=2.12.1,<3.0\")\n\n# this version of pycryptodome is known to work and has a Windows wheel for py2.7, py3.3-3.6\ndeps.append(\"pycryptodome>=3.4.3,<4\")\n\n# shutil.get_terminal_size and which were added in Python 3.3\nif version_info[0] == 2:\n    deps.append(\"backports.shutil_which\")\n    deps.append(\"backports.shutil_get_terminal_size\")\n\n# for localization\ndeps.append(\"iso-639\")\ndeps.append(\"iso3166\")\n\n# When we build an egg for the Win32 bootstrap we don't want dependency\n# information built into it.\nif environ.get(\"NO_DEPS\"):\n    deps = []\n\nsrcdir = join(dirname(abspath(__file__)), \"src/\")\nsys_path.insert(0, srcdir)\n\nsetup(name=\"streamlink\",\n      version=\"0.3.2\",\n      description=\"Streamlink is command-line utility that extracts streams \"\n                  \"from various services and pipes them into a video player of \"\n                  \"choice.\",\n      url=\"https://github.com/streamlink/streamlink\",\n      author=\"Streamlink\",\n      author_email=\"charlie@charliedrage.com\",  # temp until we have a mailing list / global email\n      license=\"Simplified BSD\",\n      packages=find_packages(\"src\"),\n      package_dir={\"\": \"src\"},\n      entry_points={\n          \"console_scripts\": [\"streamlink=streamlink_cli.main:main\"]\n      },\n      install_requires=deps,\n      test_suite=\"tests\",\n      classifiers=[\"Development Status :: 5 - Production/Stable\",\n                   \"Environment :: Console\",\n                   \"Operating System :: POSIX\",\n                   \"Operating System :: Microsoft :: Windows\",\n                   \"Programming Language :: Python :: 2.6\",\n                   \"Programming Language :: Python :: 2.7\",\n                   \"Programming Language :: Python :: 3.3\",\n                   \"Programming Language :: Python :: 3.4\",\n                   \"Topic :: Internet :: WWW/HTTP\",\n                   \"Topic :: Multimedia :: Sound/Audio\",\n                   \"Topic :: Multimedia :: Video\",\n                   \"Topic :: Utilities\"])\n", "path": "setup.py"}]}