prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Invalid deprecation of canny, perhaps others
  ```
  $ python -c "from skimage import filters as F; F.canny(0)"
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/home/stefan/src/scikit-image/skimage/_shared/utils.py", line 46, in __call__
      msg = 'Call to deprecated function ``%s``.' % func.__name__
  AttributeError: 'int' object has no attribute '__name__'
  ```
  
  
  --- 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/filters/__init__.py`
  Content:
  ```
  1 from .lpi_filter import inverse, wiener, LPIFilter2D
  2 from ._gaussian import gaussian_filter
  3 from .edges import (sobel, hsobel, vsobel, sobel_h, sobel_v,
  4                     scharr, hscharr, vscharr, scharr_h, scharr_v,
  5                     prewitt, hprewitt, vprewitt, prewitt_h, prewitt_v,
  6                     roberts, roberts_positive_diagonal,
  7                     roberts_negative_diagonal, roberts_pos_diag,
  8                     roberts_neg_diag)
  9 from ._rank_order import rank_order
  10 from ._gabor import gabor_kernel, gabor_filter
  11 from .thresholding import (threshold_adaptive, threshold_otsu, threshold_yen,
  12                            threshold_isodata)
  13 from . import rank
  14 from .rank import median
  15 
  16 from .._shared.utils import deprecated
  17 from .. import restoration
  18 denoise_bilateral = deprecated('skimage.restoration.denoise_bilateral')\
  19                         (restoration.denoise_bilateral)
  20 denoise_tv_bregman = deprecated('skimage.restoration.denoise_tv_bregman')\
  21                         (restoration.denoise_tv_bregman)
  22 denoise_tv_chambolle = deprecated('skimage.restoration.denoise_tv_chambolle')\
  23                         (restoration.denoise_tv_chambolle)
  24 
  25 # Backward compatibility v<0.11
  26 @deprecated
  27 def canny(*args, **kwargs):
  28     # Hack to avoid circular import
  29     from ..feature._canny import canny as canny_
  30     return canny_(*args, **kwargs)
  31 
  32 
  33 __all__ = ['inverse',
  34            'wiener',
  35            'LPIFilter2D',
  36            'gaussian_filter',
  37            'median',
  38            'canny',
  39            'sobel',
  40            'hsobel',
  41            'vsobel',
  42            'sobel_h',
  43            'sobel_v',
  44            'scharr',
  45            'hscharr',
  46            'vscharr',
  47            'scharr_h',
  48            'scharr_v',
  49            'prewitt',
  50            'hprewitt',
  51            'vprewitt',
  52            'prewitt_h',
  53            'prewitt_v',
  54            'roberts',
  55            'roberts_positive_diagonal',
  56            'roberts_negative_diagonal',
  57            'roberts_pos_diag',
  58            'roberts_neg_diag',
  59            'denoise_tv_chambolle',
  60            'denoise_bilateral',
  61            'denoise_tv_bregman',
  62            'rank_order',
  63            'gabor_kernel',
  64            'gabor_filter',
  65            'threshold_adaptive',
  66            'threshold_otsu',
  67            'threshold_yen',
  68            'threshold_isodata',
  69            'rank']
  70
  ```
  
  Path: `skimage/filter/__init__.py`
  Content:
  ```
  1 from .._shared.utils import skimage_deprecation
  2 from warnings import warn
  3 
  4 global _import_warned
  5 
  6 warn(skimage_deprecation('The `skimage.filter` module has been renamed '
  7                          'to `skimage.filters`.  This placeholder module '
  8                          'will be removed in v0.13.'))
  9 _import_warned = True
  10 
  11 del warn
  12 del skimage_deprecation
  13 
  14 from ..filters.lpi_filter import inverse, wiener, LPIFilter2D
  15 from ..filters._gaussian import gaussian_filter
  16 from ..filters.edges import (sobel, hsobel, vsobel, sobel_h, sobel_v,
  17                     scharr, hscharr, vscharr, scharr_h, scharr_v,
  18                     prewitt, hprewitt, vprewitt, prewitt_h, prewitt_v,
  19                     roberts, roberts_positive_diagonal,
  20                     roberts_negative_diagonal, roberts_pos_diag,
  21                     roberts_neg_diag)
  22 from ..filters._rank_order import rank_order
  23 from ..filters._gabor import gabor_kernel, gabor_filter
  24 from ..filters.thresholding import (threshold_adaptive, threshold_otsu, threshold_yen,
  25                            threshold_isodata)
  26 from ..filters import rank
  27 from ..filters.rank import median
  28 
  29 from skimage._shared.utils import deprecated
  30 from skimage import restoration
  31 denoise_bilateral = deprecated('skimage.restoration.denoise_bilateral')\
  32                         (restoration.denoise_bilateral)
  33 denoise_tv_bregman = deprecated('skimage.restoration.denoise_tv_bregman')\
  34                         (restoration.denoise_tv_bregman)
  35 denoise_tv_chambolle = deprecated('skimage.restoration.denoise_tv_chambolle')\
  36                         (restoration.denoise_tv_chambolle)
  37 
  38 # Backward compatibility v<0.11
  39 @deprecated
  40 def canny(*args, **kwargs):
  41     # Hack to avoid circular import
  42     from skimage.feature._canny import canny as canny_
  43     return canny_(*args, **kwargs)
  44 
  45 
  46 __all__ = ['inverse',
  47            'wiener',
  48            'LPIFilter2D',
  49            'gaussian_filter',
  50            'median',
  51            'canny',
  52            'sobel',
  53            'hsobel',
  54            'vsobel',
  55            'sobel_h',
  56            'sobel_v',
  57            'scharr',
  58            'hscharr',
  59            'vscharr',
  60            'scharr_h',
  61            'scharr_v',
  62            'prewitt',
  63            'hprewitt',
  64            'vprewitt',
  65            'prewitt_h',
  66            'prewitt_v',
  67            'roberts',
  68            'roberts_positive_diagonal',
  69            'roberts_negative_diagonal',
  70            'roberts_pos_diag',
  71            'roberts_neg_diag',
  72            'denoise_tv_chambolle',
  73            'denoise_bilateral',
  74            'denoise_tv_bregman',
  75            'rank_order',
  76            'gabor_kernel',
  77            'gabor_filter',
  78            'threshold_adaptive',
  79            'threshold_otsu',
  80            'threshold_yen',
  81            'threshold_isodata',
  82            'rank']
  83
  ```
  --- 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/skimage/filter/__init__.py b/skimage/filter/__init__.py
  --- a/skimage/filter/__init__.py
  +++ b/skimage/filter/__init__.py
  @@ -36,7 +36,7 @@
                           (restoration.denoise_tv_chambolle)
   
   # Backward compatibility v<0.11
  -@deprecated
  +@deprecated('skimage.feature.canny')
   def canny(*args, **kwargs):
       # Hack to avoid circular import
       from skimage.feature._canny import canny as canny_
  diff --git a/skimage/filters/__init__.py b/skimage/filters/__init__.py
  --- a/skimage/filters/__init__.py
  +++ b/skimage/filters/__init__.py
  @@ -23,7 +23,7 @@
                           (restoration.denoise_tv_chambolle)
   
   # Backward compatibility v<0.11
  -@deprecated
  +@deprecated('skimage.feature.canny')
   def canny(*args, **kwargs):
       # Hack to avoid circular import
       from ..feature._canny import canny as canny_
  
verification_info: {"golden_diff": "diff --git a/skimage/filter/__init__.py b/skimage/filter/__init__.py\n--- a/skimage/filter/__init__.py\n+++ b/skimage/filter/__init__.py\n@@ -36,7 +36,7 @@\n                         (restoration.denoise_tv_chambolle)\n \n # Backward compatibility v<0.11\n-@deprecated\n+@deprecated('skimage.feature.canny')\n def canny(*args, **kwargs):\n     # Hack to avoid circular import\n     from skimage.feature._canny import canny as canny_\ndiff --git a/skimage/filters/__init__.py b/skimage/filters/__init__.py\n--- a/skimage/filters/__init__.py\n+++ b/skimage/filters/__init__.py\n@@ -23,7 +23,7 @@\n                         (restoration.denoise_tv_chambolle)\n \n # Backward compatibility v<0.11\n-@deprecated\n+@deprecated('skimage.feature.canny')\n def canny(*args, **kwargs):\n     # Hack to avoid circular import\n     from ..feature._canny import canny as canny_\n", "issue": "Invalid deprecation of canny, perhaps others\n```\n$ python -c \"from skimage import filters as F; F.canny(0)\"\nTraceback (most recent call last):\n  File \"<string>\", line 1, in <module>\n  File \"/home/stefan/src/scikit-image/skimage/_shared/utils.py\", line 46, in __call__\n    msg = 'Call to deprecated function ``%s``.' % func.__name__\nAttributeError: 'int' object has no attribute '__name__'\n```\n\n", "before_files": [{"content": "from .lpi_filter import inverse, wiener, LPIFilter2D\nfrom ._gaussian import gaussian_filter\nfrom .edges import (sobel, hsobel, vsobel, sobel_h, sobel_v,\n                    scharr, hscharr, vscharr, scharr_h, scharr_v,\n                    prewitt, hprewitt, vprewitt, prewitt_h, prewitt_v,\n                    roberts, roberts_positive_diagonal,\n                    roberts_negative_diagonal, roberts_pos_diag,\n                    roberts_neg_diag)\nfrom ._rank_order import rank_order\nfrom ._gabor import gabor_kernel, gabor_filter\nfrom .thresholding import (threshold_adaptive, threshold_otsu, threshold_yen,\n                           threshold_isodata)\nfrom . import rank\nfrom .rank import median\n\nfrom .._shared.utils import deprecated\nfrom .. import restoration\ndenoise_bilateral = deprecated('skimage.restoration.denoise_bilateral')\\\n                        (restoration.denoise_bilateral)\ndenoise_tv_bregman = deprecated('skimage.restoration.denoise_tv_bregman')\\\n                        (restoration.denoise_tv_bregman)\ndenoise_tv_chambolle = deprecated('skimage.restoration.denoise_tv_chambolle')\\\n                        (restoration.denoise_tv_chambolle)\n\n# Backward compatibility v<0.11\n@deprecated\ndef canny(*args, **kwargs):\n    # Hack to avoid circular import\n    from ..feature._canny import canny as canny_\n    return canny_(*args, **kwargs)\n\n\n__all__ = ['inverse',\n           'wiener',\n           'LPIFilter2D',\n           'gaussian_filter',\n           'median',\n           'canny',\n           'sobel',\n           'hsobel',\n           'vsobel',\n           'sobel_h',\n           'sobel_v',\n           'scharr',\n           'hscharr',\n           'vscharr',\n           'scharr_h',\n           'scharr_v',\n           'prewitt',\n           'hprewitt',\n           'vprewitt',\n           'prewitt_h',\n           'prewitt_v',\n           'roberts',\n           'roberts_positive_diagonal',\n           'roberts_negative_diagonal',\n           'roberts_pos_diag',\n           'roberts_neg_diag',\n           'denoise_tv_chambolle',\n           'denoise_bilateral',\n           'denoise_tv_bregman',\n           'rank_order',\n           'gabor_kernel',\n           'gabor_filter',\n           'threshold_adaptive',\n           'threshold_otsu',\n           'threshold_yen',\n           'threshold_isodata',\n           'rank']\n", "path": "skimage/filters/__init__.py"}, {"content": "from .._shared.utils import skimage_deprecation\nfrom warnings import warn\n\nglobal _import_warned\n\nwarn(skimage_deprecation('The `skimage.filter` module has been renamed '\n                         'to `skimage.filters`.  This placeholder module '\n                         'will be removed in v0.13.'))\n_import_warned = True\n\ndel warn\ndel skimage_deprecation\n\nfrom ..filters.lpi_filter import inverse, wiener, LPIFilter2D\nfrom ..filters._gaussian import gaussian_filter\nfrom ..filters.edges import (sobel, hsobel, vsobel, sobel_h, sobel_v,\n                    scharr, hscharr, vscharr, scharr_h, scharr_v,\n                    prewitt, hprewitt, vprewitt, prewitt_h, prewitt_v,\n                    roberts, roberts_positive_diagonal,\n                    roberts_negative_diagonal, roberts_pos_diag,\n                    roberts_neg_diag)\nfrom ..filters._rank_order import rank_order\nfrom ..filters._gabor import gabor_kernel, gabor_filter\nfrom ..filters.thresholding import (threshold_adaptive, threshold_otsu, threshold_yen,\n                           threshold_isodata)\nfrom ..filters import rank\nfrom ..filters.rank import median\n\nfrom skimage._shared.utils import deprecated\nfrom skimage import restoration\ndenoise_bilateral = deprecated('skimage.restoration.denoise_bilateral')\\\n                        (restoration.denoise_bilateral)\ndenoise_tv_bregman = deprecated('skimage.restoration.denoise_tv_bregman')\\\n                        (restoration.denoise_tv_bregman)\ndenoise_tv_chambolle = deprecated('skimage.restoration.denoise_tv_chambolle')\\\n                        (restoration.denoise_tv_chambolle)\n\n# Backward compatibility v<0.11\n@deprecated\ndef canny(*args, **kwargs):\n    # Hack to avoid circular import\n    from skimage.feature._canny import canny as canny_\n    return canny_(*args, **kwargs)\n\n\n__all__ = ['inverse',\n           'wiener',\n           'LPIFilter2D',\n           'gaussian_filter',\n           'median',\n           'canny',\n           'sobel',\n           'hsobel',\n           'vsobel',\n           'sobel_h',\n           'sobel_v',\n           'scharr',\n           'hscharr',\n           'vscharr',\n           'scharr_h',\n           'scharr_v',\n           'prewitt',\n           'hprewitt',\n           'vprewitt',\n           'prewitt_h',\n           'prewitt_v',\n           'roberts',\n           'roberts_positive_diagonal',\n           'roberts_negative_diagonal',\n           'roberts_pos_diag',\n           'roberts_neg_diag',\n           'denoise_tv_chambolle',\n           'denoise_bilateral',\n           'denoise_tv_bregman',\n           'rank_order',\n           'gabor_kernel',\n           'gabor_filter',\n           'threshold_adaptive',\n           'threshold_otsu',\n           'threshold_yen',\n           'threshold_isodata',\n           'rank']\n", "path": "skimage/filter/__init__.py"}], "after_files": [{"content": "from .lpi_filter import inverse, wiener, LPIFilter2D\nfrom ._gaussian import gaussian_filter\nfrom .edges import (sobel, hsobel, vsobel, sobel_h, sobel_v,\n                    scharr, hscharr, vscharr, scharr_h, scharr_v,\n                    prewitt, hprewitt, vprewitt, prewitt_h, prewitt_v,\n                    roberts, roberts_positive_diagonal,\n                    roberts_negative_diagonal, roberts_pos_diag,\n                    roberts_neg_diag)\nfrom ._rank_order import rank_order\nfrom ._gabor import gabor_kernel, gabor_filter\nfrom .thresholding import (threshold_adaptive, threshold_otsu, threshold_yen,\n                           threshold_isodata)\nfrom . import rank\nfrom .rank import median\n\nfrom .._shared.utils import deprecated\nfrom .. import restoration\ndenoise_bilateral = deprecated('skimage.restoration.denoise_bilateral')\\\n                        (restoration.denoise_bilateral)\ndenoise_tv_bregman = deprecated('skimage.restoration.denoise_tv_bregman')\\\n                        (restoration.denoise_tv_bregman)\ndenoise_tv_chambolle = deprecated('skimage.restoration.denoise_tv_chambolle')\\\n                        (restoration.denoise_tv_chambolle)\n\n# Backward compatibility v<0.11\n@deprecated('skimage.feature.canny')\ndef canny(*args, **kwargs):\n    # Hack to avoid circular import\n    from ..feature._canny import canny as canny_\n    return canny_(*args, **kwargs)\n\n\n__all__ = ['inverse',\n           'wiener',\n           'LPIFilter2D',\n           'gaussian_filter',\n           'median',\n           'canny',\n           'sobel',\n           'hsobel',\n           'vsobel',\n           'sobel_h',\n           'sobel_v',\n           'scharr',\n           'hscharr',\n           'vscharr',\n           'scharr_h',\n           'scharr_v',\n           'prewitt',\n           'hprewitt',\n           'vprewitt',\n           'prewitt_h',\n           'prewitt_v',\n           'roberts',\n           'roberts_positive_diagonal',\n           'roberts_negative_diagonal',\n           'roberts_pos_diag',\n           'roberts_neg_diag',\n           'denoise_tv_chambolle',\n           'denoise_bilateral',\n           'denoise_tv_bregman',\n           'rank_order',\n           'gabor_kernel',\n           'gabor_filter',\n           'threshold_adaptive',\n           'threshold_otsu',\n           'threshold_yen',\n           'threshold_isodata',\n           'rank']\n", "path": "skimage/filters/__init__.py"}, {"content": "from .._shared.utils import skimage_deprecation\nfrom warnings import warn\n\nglobal _import_warned\n\nwarn(skimage_deprecation('The `skimage.filter` module has been renamed '\n                         'to `skimage.filters`.  This placeholder module '\n                         'will be removed in v0.13.'))\n_import_warned = True\n\ndel warn\ndel skimage_deprecation\n\nfrom ..filters.lpi_filter import inverse, wiener, LPIFilter2D\nfrom ..filters._gaussian import gaussian_filter\nfrom ..filters.edges import (sobel, hsobel, vsobel, sobel_h, sobel_v,\n                    scharr, hscharr, vscharr, scharr_h, scharr_v,\n                    prewitt, hprewitt, vprewitt, prewitt_h, prewitt_v,\n                    roberts, roberts_positive_diagonal,\n                    roberts_negative_diagonal, roberts_pos_diag,\n                    roberts_neg_diag)\nfrom ..filters._rank_order import rank_order\nfrom ..filters._gabor import gabor_kernel, gabor_filter\nfrom ..filters.thresholding import (threshold_adaptive, threshold_otsu, threshold_yen,\n                           threshold_isodata)\nfrom ..filters import rank\nfrom ..filters.rank import median\n\nfrom skimage._shared.utils import deprecated\nfrom skimage import restoration\ndenoise_bilateral = deprecated('skimage.restoration.denoise_bilateral')\\\n                        (restoration.denoise_bilateral)\ndenoise_tv_bregman = deprecated('skimage.restoration.denoise_tv_bregman')\\\n                        (restoration.denoise_tv_bregman)\ndenoise_tv_chambolle = deprecated('skimage.restoration.denoise_tv_chambolle')\\\n                        (restoration.denoise_tv_chambolle)\n\n# Backward compatibility v<0.11\n@deprecated('skimage.feature.canny')\ndef canny(*args, **kwargs):\n    # Hack to avoid circular import\n    from skimage.feature._canny import canny as canny_\n    return canny_(*args, **kwargs)\n\n\n__all__ = ['inverse',\n           'wiener',\n           'LPIFilter2D',\n           'gaussian_filter',\n           'median',\n           'canny',\n           'sobel',\n           'hsobel',\n           'vsobel',\n           'sobel_h',\n           'sobel_v',\n           'scharr',\n           'hscharr',\n           'vscharr',\n           'scharr_h',\n           'scharr_v',\n           'prewitt',\n           'hprewitt',\n           'vprewitt',\n           'prewitt_h',\n           'prewitt_v',\n           'roberts',\n           'roberts_positive_diagonal',\n           'roberts_negative_diagonal',\n           'roberts_pos_diag',\n           'roberts_neg_diag',\n           'denoise_tv_chambolle',\n           'denoise_bilateral',\n           'denoise_tv_bregman',\n           'rank_order',\n           'gabor_kernel',\n           'gabor_filter',\n           'threshold_adaptive',\n           'threshold_otsu',\n           'threshold_yen',\n           'threshold_isodata',\n           'rank']\n", "path": "skimage/filter/__init__.py"}]}