prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  DEPR: `VisibleDeprecationWarning` considered noisy
  Context:
  yt doesn't use builtin `DeprecationWarning`s but instead uses a custom class `VisibleDeprecationWarning`, whose sole intent is to work around Python's default warning filters which hide `DeprecationWarning`s by default (the idea being that they should only be made visible if users opt-in).
  
  The design currently used in yt made sense a while back, because we want deprecation warnings to reach all users, not just maintainers of dependent code with high quality standards. The trade-off being that our warnings will surface to users no matter how many layers of dependencies there are between the code being written and yt; for instance, if `yt_astro_analysis` or `trident` uses deprecated yt API, *their* users don't have much control over it and it can be argued they shouldn't see these "noisy" warnings by default. 
  
  Since Python 3.7 ([PEP 565](https://peps.python.org/pep-0565/)), `DeprecationWarnings` attributed to the `__main__` module are again showed by default, meaning they will reach direct users (including in REPLs) but will not surface (by default) when deprecated API calls live in an intermediate dependency layer.
  
  It seems to me that our current solution isn't necessary anymore and that we should use simple `DeprecationWarning`s from now on.
  
  </issue>
  <code>
  [start of yt/_maintenance/deprecation.py]
  1 import warnings
  2 from functools import wraps
  3 from types import FunctionType
  4 from typing import Dict, Optional
  5 
  6 
  7 class VisibleDeprecationWarning(UserWarning):
  8     """Visible deprecation warning, adapted from NumPy
  9 
  10     The nose runner does not show users DeprecationWarning.
  11     This ensures that a deprecation warning is visible to users
  12     if that is desired.
  13     """
  14 
  15     # this class becomes useless after the tests are migrated from nose to pytest
  16 
  17     pass
  18 
  19 
  20 def issue_deprecation_warning(
  21     msg: str,
  22     *,
  23     stacklevel: int,
  24     since: str,
  25     removal: Optional[str] = None,
  26 ):
  27     """
  28     Parameters
  29     ----------
  30     msg : str
  31         A text message explaining that the code surrounding the call to this function is
  32         deprecated, and what should be changed on the user side to avoid it.
  33 
  34     stacklevel: int
  35         Number of stack frames to be skipped when pointing at caller code, starting from
  36         *this* function's frame. In general 3 is a minimum.
  37 
  38     since and removal: str version numbers, indicating the anticipated removal date
  39 
  40     Notes
  41     -----
  42 
  43     removal can be left empty if it is not clear how many minor releases are expected to
  44     happen before the next major.
  45 
  46     removal and since arguments are keyword-only to forbid accidentally swapping them.
  47 
  48     Examples
  49     --------
  50     >>> issue_deprecation_warning(
  51     ...     "This code is deprecated.", stacklevel=3, since="4.0"
  52     ... )
  53     """
  54 
  55     msg += f"\nDeprecated since yt {since}"
  56     if removal is not None:
  57         msg += f"\nThis feature is planned for removal in yt {removal}"
  58     warnings.warn(msg, VisibleDeprecationWarning, stacklevel=stacklevel)
  59 
  60 
  61 def future_positional_only(positions2names: Dict[int, str], /, **depr_kwargs):
  62     """Warn users when using a future positional-only argument as keyword.
  63     Note that positional-only arguments are available from Python 3.8
  64     See https://www.python.org/dev/peps/pep-0570/
  65     """
  66 
  67     def outer(func: FunctionType):
  68         @wraps(func)
  69         def inner(*args, **kwargs):
  70             for no, name in sorted(positions2names.items()):
  71                 if name not in kwargs:
  72                     continue
  73                 value = kwargs[name]
  74                 issue_deprecation_warning(
  75                     f"Using the {name!r} argument as keyword (on position {no}) "
  76                     "is deprecated. "
  77                     "Pass the argument as positional to suppress this warning, "
  78                     f"i.e., use {func.__name__}({value!r}, ...)",
  79                     stacklevel=3,
  80                     **depr_kwargs,
  81                 )
  82             return func(*args, **kwargs)
  83 
  84         return inner
  85 
  86     return outer
  87
  [end of yt/_maintenance/deprecation.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/yt/_maintenance/deprecation.py b/yt/_maintenance/deprecation.py
  --- a/yt/_maintenance/deprecation.py
  +++ b/yt/_maintenance/deprecation.py
  @@ -4,19 +4,6 @@
   from typing import Dict, Optional
   
   
  -class VisibleDeprecationWarning(UserWarning):
  -    """Visible deprecation warning, adapted from NumPy
  -
  -    The nose runner does not show users DeprecationWarning.
  -    This ensures that a deprecation warning is visible to users
  -    if that is desired.
  -    """
  -
  -    # this class becomes useless after the tests are migrated from nose to pytest
  -
  -    pass
  -
  -
   def issue_deprecation_warning(
       msg: str,
       *,
  @@ -55,7 +42,7 @@
       msg += f"\nDeprecated since yt {since}"
       if removal is not None:
           msg += f"\nThis feature is planned for removal in yt {removal}"
  -    warnings.warn(msg, VisibleDeprecationWarning, stacklevel=stacklevel)
  +    warnings.warn(msg, DeprecationWarning, stacklevel=stacklevel)
   
   
   def future_positional_only(positions2names: Dict[int, str], /, **depr_kwargs):
  
verification_info: {"golden_diff": "diff --git a/yt/_maintenance/deprecation.py b/yt/_maintenance/deprecation.py\n--- a/yt/_maintenance/deprecation.py\n+++ b/yt/_maintenance/deprecation.py\n@@ -4,19 +4,6 @@\n from typing import Dict, Optional\n \n \n-class VisibleDeprecationWarning(UserWarning):\n-    \"\"\"Visible deprecation warning, adapted from NumPy\n-\n-    The nose runner does not show users DeprecationWarning.\n-    This ensures that a deprecation warning is visible to users\n-    if that is desired.\n-    \"\"\"\n-\n-    # this class becomes useless after the tests are migrated from nose to pytest\n-\n-    pass\n-\n-\n def issue_deprecation_warning(\n     msg: str,\n     *,\n@@ -55,7 +42,7 @@\n     msg += f\"\\nDeprecated since yt {since}\"\n     if removal is not None:\n         msg += f\"\\nThis feature is planned for removal in yt {removal}\"\n-    warnings.warn(msg, VisibleDeprecationWarning, stacklevel=stacklevel)\n+    warnings.warn(msg, DeprecationWarning, stacklevel=stacklevel)\n \n \n def future_positional_only(positions2names: Dict[int, str], /, **depr_kwargs):\n", "issue": "DEPR: `VisibleDeprecationWarning` considered noisy\nContext:\r\nyt doesn't use builtin `DeprecationWarning`s but instead uses a custom class `VisibleDeprecationWarning`, whose sole intent is to work around Python's default warning filters which hide `DeprecationWarning`s by default (the idea being that they should only be made visible if users opt-in).\r\n\r\nThe design currently used in yt made sense a while back, because we want deprecation warnings to reach all users, not just maintainers of dependent code with high quality standards. The trade-off being that our warnings will surface to users no matter how many layers of dependencies there are between the code being written and yt; for instance, if `yt_astro_analysis` or `trident` uses deprecated yt API, *their* users don't have much control over it and it can be argued they shouldn't see these \"noisy\" warnings by default. \r\n\r\nSince Python 3.7 ([PEP 565](https://peps.python.org/pep-0565/)), `DeprecationWarnings` attributed to the `__main__` module are again showed by default, meaning they will reach direct users (including in REPLs) but will not surface (by default) when deprecated API calls live in an intermediate dependency layer.\r\n\r\nIt seems to me that our current solution isn't necessary anymore and that we should use simple `DeprecationWarning`s from now on.\n", "before_files": [{"content": "import warnings\nfrom functools import wraps\nfrom types import FunctionType\nfrom typing import Dict, Optional\n\n\nclass VisibleDeprecationWarning(UserWarning):\n    \"\"\"Visible deprecation warning, adapted from NumPy\n\n    The nose runner does not show users DeprecationWarning.\n    This ensures that a deprecation warning is visible to users\n    if that is desired.\n    \"\"\"\n\n    # this class becomes useless after the tests are migrated from nose to pytest\n\n    pass\n\n\ndef issue_deprecation_warning(\n    msg: str,\n    *,\n    stacklevel: int,\n    since: str,\n    removal: Optional[str] = None,\n):\n    \"\"\"\n    Parameters\n    ----------\n    msg : str\n        A text message explaining that the code surrounding the call to this function is\n        deprecated, and what should be changed on the user side to avoid it.\n\n    stacklevel: int\n        Number of stack frames to be skipped when pointing at caller code, starting from\n        *this* function's frame. In general 3 is a minimum.\n\n    since and removal: str version numbers, indicating the anticipated removal date\n\n    Notes\n    -----\n\n    removal can be left empty if it is not clear how many minor releases are expected to\n    happen before the next major.\n\n    removal and since arguments are keyword-only to forbid accidentally swapping them.\n\n    Examples\n    --------\n    >>> issue_deprecation_warning(\n    ...     \"This code is deprecated.\", stacklevel=3, since=\"4.0\"\n    ... )\n    \"\"\"\n\n    msg += f\"\\nDeprecated since yt {since}\"\n    if removal is not None:\n        msg += f\"\\nThis feature is planned for removal in yt {removal}\"\n    warnings.warn(msg, VisibleDeprecationWarning, stacklevel=stacklevel)\n\n\ndef future_positional_only(positions2names: Dict[int, str], /, **depr_kwargs):\n    \"\"\"Warn users when using a future positional-only argument as keyword.\n    Note that positional-only arguments are available from Python 3.8\n    See https://www.python.org/dev/peps/pep-0570/\n    \"\"\"\n\n    def outer(func: FunctionType):\n        @wraps(func)\n        def inner(*args, **kwargs):\n            for no, name in sorted(positions2names.items()):\n                if name not in kwargs:\n                    continue\n                value = kwargs[name]\n                issue_deprecation_warning(\n                    f\"Using the {name!r} argument as keyword (on position {no}) \"\n                    \"is deprecated. \"\n                    \"Pass the argument as positional to suppress this warning, \"\n                    f\"i.e., use {func.__name__}({value!r}, ...)\",\n                    stacklevel=3,\n                    **depr_kwargs,\n                )\n            return func(*args, **kwargs)\n\n        return inner\n\n    return outer\n", "path": "yt/_maintenance/deprecation.py"}]}