We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Deprecate Python 2.6 after release of 0.12


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `skimage/__init__.py`
Content:
```
1 """Image Processing SciKit (Toolbox for SciPy)
2 
3 ``scikit-image`` (a.k.a. ``skimage``) is a collection of algorithms for image
4 processing and computer vision.
5 
6 The main package of ``skimage`` only provides a few utilities for converting
7 between image data types; for most features, you need to import one of the
8 following subpackages:
9 
10 Subpackages
11 -----------
12 color
13     Color space conversion.
14 data
15     Test images and example data.
16 draw
17     Drawing primitives (lines, text, etc.) that operate on NumPy arrays.
18 exposure
19     Image intensity adjustment, e.g., histogram equalization, etc.
20 feature
21     Feature detection and extraction, e.g., texture analysis corners, etc.
22 filters
23     Sharpening, edge finding, rank filters, thresholding, etc.
24 graph
25     Graph-theoretic operations, e.g., shortest paths.
26 io
27     Reading, saving, and displaying images and video.
28 measure
29     Measurement of image properties, e.g., similarity and contours.
30 morphology
31     Morphological operations, e.g., opening or skeletonization.
32 novice
33     Simplified interface for teaching purposes.
34 restoration
35     Restoration algorithms, e.g., deconvolution algorithms, denoising, etc.
36 segmentation
37     Partitioning an image into multiple regions.
38 transform
39     Geometric and other transforms, e.g., rotation or the Radon transform.
40 util
41     Generic utilities.
42 viewer
43     A simple graphical user interface for visualizing results and exploring
44     parameters.
45 
46 Utility Functions
47 -----------------
48 img_as_float
49     Convert an image to floating point format, with values in [0, 1].
50 img_as_uint
51     Convert an image to unsigned integer format, with values in [0, 65535].
52 img_as_int
53     Convert an image to signed integer format, with values in [-32768, 32767].
54 img_as_ubyte
55     Convert an image to unsigned byte format, with values in [0, 255].
56 
57 """
58 
59 import os.path as osp
60 import imp
61 import functools
62 import warnings
63 import sys
64 
65 pkg_dir = osp.abspath(osp.dirname(__file__))
66 data_dir = osp.join(pkg_dir, 'data')
67 
68 __version__ = '0.12dev'
69 
70 try:
71     imp.find_module('nose')
72 except ImportError:
73     def _test(doctest=False, verbose=False):
74         """This would run all unit tests, but nose couldn't be
75         imported so the test suite can not run.
76         """
77         raise ImportError("Could not load nose. Unit tests not available.")
78 
79 else:
80     def _test(doctest=False, verbose=False):
81         """Run all unit tests."""
82         import nose
83         args = ['', pkg_dir, '--exe', '--ignore-files=^_test']
84         if verbose:
85             args.extend(['-v', '-s'])
86         if doctest:
87             args.extend(['--with-doctest', '--ignore-files=^\.',
88                          '--ignore-files=^setup\.py$$', '--ignore-files=test'])
89             # Make sure warnings do not break the doc tests
90             with warnings.catch_warnings():
91                 warnings.simplefilter("ignore")
92                 success = nose.run('skimage', argv=args)
93         else:
94             success = nose.run('skimage', argv=args)
95         # Return sys.exit code
96         if success:
97             return 0
98         else:
99             return 1
100 
101 
102 # do not use `test` as function name as this leads to a recursion problem with
103 # the nose test suite
104 test = _test
105 test_verbose = functools.partial(test, verbose=True)
106 test_verbose.__doc__ = test.__doc__
107 doctest = functools.partial(test, doctest=True)
108 doctest.__doc__ = doctest.__doc__
109 doctest_verbose = functools.partial(test, doctest=True, verbose=True)
110 doctest_verbose.__doc__ = doctest.__doc__
111 
112 
113 # Logic for checking for improper install and importing while in the source
114 # tree when package has not been installed inplace.
115 # Code adapted from scikit-learn's __check_build module.
116 _INPLACE_MSG = """
117 It appears that you are importing a local scikit-image source tree. For
118 this, you need to have an inplace install. Maybe you are in the source
119 directory and you need to try from another location."""
120 
121 _STANDARD_MSG = """
122 Your install of scikit-image appears to be broken.
123 Try re-installing the package following the instructions at:
124 http://scikit-image.org/docs/stable/install.html """
125 
126 
127 def _raise_build_error(e):
128     # Raise a comprehensible error
129     local_dir = osp.split(__file__)[0]
130     msg = _STANDARD_MSG
131     if local_dir == "skimage":
132         # Picking up the local install: this will work only if the
133         # install is an 'inplace build'
134         msg = _INPLACE_MSG
135     raise ImportError("""%s
136 It seems that scikit-image has not been built correctly.
137 %s""" % (e, msg))
138 
139 try:
140     # This variable is injected in the __builtins__ by the build
141     # process. It used to enable importing subpackages of skimage when
142     # the binaries are not built
143     __SKIMAGE_SETUP__
144 except NameError:
145     __SKIMAGE_SETUP__ = False
146 
147 if __SKIMAGE_SETUP__:
148     sys.stderr.write('Partial import of skimage during the build process.\n')
149     # We are not importing the rest of the scikit during the build
150     # process, as it may not be compiled yet
151 else:
152     try:
153         from ._shared import geometry
154         del geometry
155     except ImportError as e:
156         _raise_build_error(e)
157     from .util.dtype import *
158 
159 del warnings, functools, osp, imp, sys
160
```
--- 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/skimage/__init__.py b/skimage/__init__.py
--- a/skimage/__init__.py
+++ b/skimage/__init__.py
@@ -156,4 +156,9 @@
         _raise_build_error(e)
     from .util.dtype import *
 
+
+if sys.version.startswith('2.6'):
+    warnings.warn("Python 2.6 is deprecated and will not be supported in scikit-image 0.13+")
+
+
 del warnings, functools, osp, imp, sys

{"golden_diff": "diff --git a/skimage/__init__.py b/skimage/__init__.py\n--- a/skimage/__init__.py\n+++ b/skimage/__init__.py\n@@ -156,4 +156,9 @@\n         _raise_build_error(e)\n     from .util.dtype import *\n \n+\n+if sys.version.startswith('2.6'):\n+    warnings.warn(\"Python 2.6 is deprecated and will not be supported in scikit-image 0.13+\")\n+\n+\n del warnings, functools, osp, imp, sys\n", "issue": "Deprecate Python 2.6 after release of 0.12\n\n", "before_files": [{"content": "\"\"\"Image Processing SciKit (Toolbox for SciPy)\n\n``scikit-image`` (a.k.a. ``skimage``) is a collection of algorithms for image\nprocessing and computer vision.\n\nThe main package of ``skimage`` only provides a few utilities for converting\nbetween image data types; for most features, you need to import one of the\nfollowing subpackages:\n\nSubpackages\n-----------\ncolor\n    Color space conversion.\ndata\n    Test images and example data.\ndraw\n    Drawing primitives (lines, text, etc.) that operate on NumPy arrays.\nexposure\n    Image intensity adjustment, e.g., histogram equalization, etc.\nfeature\n    Feature detection and extraction, e.g., texture analysis corners, etc.\nfilters\n    Sharpening, edge finding, rank filters, thresholding, etc.\ngraph\n    Graph-theoretic operations, e.g., shortest paths.\nio\n    Reading, saving, and displaying images and video.\nmeasure\n    Measurement of image properties, e.g., similarity and contours.\nmorphology\n    Morphological operations, e.g., opening or skeletonization.\nnovice\n    Simplified interface for teaching purposes.\nrestoration\n    Restoration algorithms, e.g., deconvolution algorithms, denoising, etc.\nsegmentation\n    Partitioning an image into multiple regions.\ntransform\n    Geometric and other transforms, e.g., rotation or the Radon transform.\nutil\n    Generic utilities.\nviewer\n    A simple graphical user interface for visualizing results and exploring\n    parameters.\n\nUtility Functions\n-----------------\nimg_as_float\n    Convert an image to floating point format, with values in [0, 1].\nimg_as_uint\n    Convert an image to unsigned integer format, with values in [0, 65535].\nimg_as_int\n    Convert an image to signed integer format, with values in [-32768, 32767].\nimg_as_ubyte\n    Convert an image to unsigned byte format, with values in [0, 255].\n\n\"\"\"\n\nimport os.path as osp\nimport imp\nimport functools\nimport warnings\nimport sys\n\npkg_dir = osp.abspath(osp.dirname(__file__))\ndata_dir = osp.join(pkg_dir, 'data')\n\n__version__ = '0.12dev'\n\ntry:\n    imp.find_module('nose')\nexcept ImportError:\n    def _test(doctest=False, verbose=False):\n        \"\"\"This would run all unit tests, but nose couldn't be\n        imported so the test suite can not run.\n        \"\"\"\n        raise ImportError(\"Could not load nose. Unit tests not available.\")\n\nelse:\n    def _test(doctest=False, verbose=False):\n        \"\"\"Run all unit tests.\"\"\"\n        import nose\n        args = ['', pkg_dir, '--exe', '--ignore-files=^_test']\n        if verbose:\n            args.extend(['-v', '-s'])\n        if doctest:\n            args.extend(['--with-doctest', '--ignore-files=^\\.',\n                         '--ignore-files=^setup\\.py$$', '--ignore-files=test'])\n            # Make sure warnings do not break the doc tests\n            with warnings.catch_warnings():\n                warnings.simplefilter(\"ignore\")\n                success = nose.run('skimage', argv=args)\n        else:\n            success = nose.run('skimage', argv=args)\n        # Return sys.exit code\n        if success:\n            return 0\n        else:\n            return 1\n\n\n# do not use `test` as function name as this leads to a recursion problem with\n# the nose test suite\ntest = _test\ntest_verbose = functools.partial(test, verbose=True)\ntest_verbose.__doc__ = test.__doc__\ndoctest = functools.partial(test, doctest=True)\ndoctest.__doc__ = doctest.__doc__\ndoctest_verbose = functools.partial(test, doctest=True, verbose=True)\ndoctest_verbose.__doc__ = doctest.__doc__\n\n\n# Logic for checking for improper install and importing while in the source\n# tree when package has not been installed inplace.\n# Code adapted from scikit-learn's __check_build module.\n_INPLACE_MSG = \"\"\"\nIt appears that you are importing a local scikit-image source tree. For\nthis, you need to have an inplace install. Maybe you are in the source\ndirectory and you need to try from another location.\"\"\"\n\n_STANDARD_MSG = \"\"\"\nYour install of scikit-image appears to be broken.\nTry re-installing the package following the instructions at:\nhttp://scikit-image.org/docs/stable/install.html \"\"\"\n\n\ndef _raise_build_error(e):\n    # Raise a comprehensible error\n    local_dir = osp.split(__file__)[0]\n    msg = _STANDARD_MSG\n    if local_dir == \"skimage\":\n        # Picking up the local install: this will work only if the\n        # install is an 'inplace build'\n        msg = _INPLACE_MSG\n    raise ImportError(\"\"\"%s\nIt seems that scikit-image has not been built correctly.\n%s\"\"\" % (e, msg))\n\ntry:\n    # This variable is injected in the __builtins__ by the build\n    # process. It used to enable importing subpackages of skimage when\n    # the binaries are not built\n    __SKIMAGE_SETUP__\nexcept NameError:\n    __SKIMAGE_SETUP__ = False\n\nif __SKIMAGE_SETUP__:\n    sys.stderr.write('Partial import of skimage during the build process.\\n')\n    # We are not importing the rest of the scikit during the build\n    # process, as it may not be compiled yet\nelse:\n    try:\n        from ._shared import geometry\n        del geometry\n    except ImportError as e:\n        _raise_build_error(e)\n    from .util.dtype import *\n\ndel warnings, functools, osp, imp, sys\n", "path": "skimage/__init__.py"}], "after_files": [{"content": "\"\"\"Image Processing SciKit (Toolbox for SciPy)\n\n``scikit-image`` (a.k.a. ``skimage``) is a collection of algorithms for image\nprocessing and computer vision.\n\nThe main package of ``skimage`` only provides a few utilities for converting\nbetween image data types; for most features, you need to import one of the\nfollowing subpackages:\n\nSubpackages\n-----------\ncolor\n    Color space conversion.\ndata\n    Test images and example data.\ndraw\n    Drawing primitives (lines, text, etc.) that operate on NumPy arrays.\nexposure\n    Image intensity adjustment, e.g., histogram equalization, etc.\nfeature\n    Feature detection and extraction, e.g., texture analysis corners, etc.\nfilters\n    Sharpening, edge finding, rank filters, thresholding, etc.\ngraph\n    Graph-theoretic operations, e.g., shortest paths.\nio\n    Reading, saving, and displaying images and video.\nmeasure\n    Measurement of image properties, e.g., similarity and contours.\nmorphology\n    Morphological operations, e.g., opening or skeletonization.\nnovice\n    Simplified interface for teaching purposes.\nrestoration\n    Restoration algorithms, e.g., deconvolution algorithms, denoising, etc.\nsegmentation\n    Partitioning an image into multiple regions.\ntransform\n    Geometric and other transforms, e.g., rotation or the Radon transform.\nutil\n    Generic utilities.\nviewer\n    A simple graphical user interface for visualizing results and exploring\n    parameters.\n\nUtility Functions\n-----------------\nimg_as_float\n    Convert an image to floating point format, with values in [0, 1].\nimg_as_uint\n    Convert an image to unsigned integer format, with values in [0, 65535].\nimg_as_int\n    Convert an image to signed integer format, with values in [-32768, 32767].\nimg_as_ubyte\n    Convert an image to unsigned byte format, with values in [0, 255].\n\n\"\"\"\n\nimport os.path as osp\nimport imp\nimport functools\nimport warnings\nimport sys\n\npkg_dir = osp.abspath(osp.dirname(__file__))\ndata_dir = osp.join(pkg_dir, 'data')\n\n__version__ = '0.12dev'\n\ntry:\n    imp.find_module('nose')\nexcept ImportError:\n    def _test(doctest=False, verbose=False):\n        \"\"\"This would run all unit tests, but nose couldn't be\n        imported so the test suite can not run.\n        \"\"\"\n        raise ImportError(\"Could not load nose. Unit tests not available.\")\n\nelse:\n    def _test(doctest=False, verbose=False):\n        \"\"\"Run all unit tests.\"\"\"\n        import nose\n        args = ['', pkg_dir, '--exe', '--ignore-files=^_test']\n        if verbose:\n            args.extend(['-v', '-s'])\n        if doctest:\n            args.extend(['--with-doctest', '--ignore-files=^\\.',\n                         '--ignore-files=^setup\\.py$$', '--ignore-files=test'])\n            # Make sure warnings do not break the doc tests\n            with warnings.catch_warnings():\n                warnings.simplefilter(\"ignore\")\n                success = nose.run('skimage', argv=args)\n        else:\n            success = nose.run('skimage', argv=args)\n        # Return sys.exit code\n        if success:\n            return 0\n        else:\n            return 1\n\n\n# do not use `test` as function name as this leads to a recursion problem with\n# the nose test suite\ntest = _test\ntest_verbose = functools.partial(test, verbose=True)\ntest_verbose.__doc__ = test.__doc__\ndoctest = functools.partial(test, doctest=True)\ndoctest.__doc__ = doctest.__doc__\ndoctest_verbose = functools.partial(test, doctest=True, verbose=True)\ndoctest_verbose.__doc__ = doctest.__doc__\n\n\n# Logic for checking for improper install and importing while in the source\n# tree when package has not been installed inplace.\n# Code adapted from scikit-learn's __check_build module.\n_INPLACE_MSG = \"\"\"\nIt appears that you are importing a local scikit-image source tree. For\nthis, you need to have an inplace install. Maybe you are in the source\ndirectory and you need to try from another location.\"\"\"\n\n_STANDARD_MSG = \"\"\"\nYour install of scikit-image appears to be broken.\nTry re-installing the package following the instructions at:\nhttp://scikit-image.org/docs/stable/install.html \"\"\"\n\n\ndef _raise_build_error(e):\n    # Raise a comprehensible error\n    local_dir = osp.split(__file__)[0]\n    msg = _STANDARD_MSG\n    if local_dir == \"skimage\":\n        # Picking up the local install: this will work only if the\n        # install is an 'inplace build'\n        msg = _INPLACE_MSG\n    raise ImportError(\"\"\"%s\nIt seems that scikit-image has not been built correctly.\n%s\"\"\" % (e, msg))\n\ntry:\n    # This variable is injected in the __builtins__ by the build\n    # process. It used to enable importing subpackages of skimage when\n    # the binaries are not built\n    __SKIMAGE_SETUP__\nexcept NameError:\n    __SKIMAGE_SETUP__ = False\n\nif __SKIMAGE_SETUP__:\n    sys.stderr.write('Partial import of skimage during the build process.\\n')\n    # We are not importing the rest of the scikit during the build\n    # process, as it may not be compiled yet\nelse:\n    try:\n        from ._shared import geometry\n        del geometry\n    except ImportError as e:\n        _raise_build_error(e)\n    from .util.dtype import *\n\n\nif sys.version.startswith('2.6'):\n    warnings.warn(\"Python 2.6 is deprecated and will not be supported in scikit-image 0.13+\")\n\n\ndel warnings, functools, osp, imp, sys\n", "path": "skimage/__init__.py"}]}