prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Improve our warnings in line with PEP 565
  See astropy/astropy#8465
  
  </issue>
  <code>
  [start of sunpy/util/exceptions.py]
  1 # Licensed under a 3-clause BSD style license - see LICENSE.rst
  2 """
  3 This module contains errors/exceptions and warnings of general use for
  4 sunpy. Exceptions that are specific to a given subpackage should *not*
  5 be here, but rather in the particular subpackage.
  6 """
  7 
  8 class SunpyWarning(Warning):
  9     """
  10     The base warning class from which all Sunpy warnings should inherit.
  11     """
  12 
  13 
  14 class SunpyUserWarning(UserWarning, SunpyWarning):
  15     """
  16     The primary warning class for Sunpy.
  17 
  18     Use this if you do not need a specific sub-class.
  19     """
  20 
  21 
  22 class SunpyDeprecationWarning(SunpyWarning):
  23     """
  24     A warning class to indicate a deprecated feature.
  25     """
  26
  [end of sunpy/util/exceptions.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/sunpy/util/exceptions.py b/sunpy/util/exceptions.py
  --- a/sunpy/util/exceptions.py
  +++ b/sunpy/util/exceptions.py
  @@ -4,6 +4,8 @@
   sunpy. Exceptions that are specific to a given subpackage should *not*
   be here, but rather in the particular subpackage.
   """
  +import sys
  +
   
   class SunpyWarning(Warning):
       """
  @@ -19,7 +21,11 @@
       """
   
   
  -class SunpyDeprecationWarning(SunpyWarning):
  +# For PEP 565 (https://www.python.org/dev/peps/pep-0565/) compliance.
  +DeprecationClass = DeprecationWarning if sys.version_info >= (3, 7) else FutureWarning
  +
  +
  +class SunpyDeprecationWarning(DeprecationClass, SunpyWarning):
       """
       A warning class to indicate a deprecated feature.
       """
  
verification_info: {"golden_diff": "diff --git a/sunpy/util/exceptions.py b/sunpy/util/exceptions.py\n--- a/sunpy/util/exceptions.py\n+++ b/sunpy/util/exceptions.py\n@@ -4,6 +4,8 @@\n sunpy. Exceptions that are specific to a given subpackage should *not*\n be here, but rather in the particular subpackage.\n \"\"\"\n+import sys\n+\n \n class SunpyWarning(Warning):\n     \"\"\"\n@@ -19,7 +21,11 @@\n     \"\"\"\n \n \n-class SunpyDeprecationWarning(SunpyWarning):\n+# For PEP 565 (https://www.python.org/dev/peps/pep-0565/) compliance.\n+DeprecationClass = DeprecationWarning if sys.version_info >= (3, 7) else FutureWarning\n+\n+\n+class SunpyDeprecationWarning(DeprecationClass, SunpyWarning):\n     \"\"\"\n     A warning class to indicate a deprecated feature.\n     \"\"\"\n", "issue": "Improve our warnings in line with PEP 565\nSee astropy/astropy#8465\n", "before_files": [{"content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"\nThis module contains errors/exceptions and warnings of general use for\nsunpy. Exceptions that are specific to a given subpackage should *not*\nbe here, but rather in the particular subpackage.\n\"\"\"\n\nclass SunpyWarning(Warning):\n    \"\"\"\n    The base warning class from which all Sunpy warnings should inherit.\n    \"\"\"\n\n\nclass SunpyUserWarning(UserWarning, SunpyWarning):\n    \"\"\"\n    The primary warning class for Sunpy.\n\n    Use this if you do not need a specific sub-class.\n    \"\"\"\n\n\nclass SunpyDeprecationWarning(SunpyWarning):\n    \"\"\"\n    A warning class to indicate a deprecated feature.\n    \"\"\"\n", "path": "sunpy/util/exceptions.py"}]}