prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Drop Python 2.6 support
  For the most relevant discussion about the topic, see #1294.
  
  Plan:
  1. In the upcoming minor release, I'm going to include `warnings.warn(msg, DeprecationWarning)`. with the message saying "Python v2.6 support is deprecated and is going to be dropped entirely in the upcoming v0.11.0 release. Update your Python version if you want to have access to the latest features and bug fixes in MongoEngine."
  2. In v0.11.0 (most likely shipped with #1428), I'll update the way we do dict comprehensions and other relics of the past, thus making it truly incompatible with v2.6.
  
  Cc @lafrech @gukoff 
  
  </issue>
  <code>
  [start of mongoengine/python_support.py]
  1 """Helper functions and types to aid with Python 2.5 - 3 support."""
  2 
  3 import sys
  4 import pymongo
  5 
  6 
  7 if pymongo.version_tuple[0] < 3:
  8     IS_PYMONGO_3 = False
  9 else:
  10     IS_PYMONGO_3 = True
  11 
  12 PY3 = sys.version_info[0] == 3
  13 
  14 if PY3:
  15     import codecs
  16     from io import BytesIO as StringIO
  17 
  18     # return s converted to binary.  b('test') should be equivalent to b'test'
  19     def b(s):
  20         return codecs.latin_1_encode(s)[0]
  21 
  22     bin_type = bytes
  23     txt_type = str
  24 else:
  25     try:
  26         from cStringIO import StringIO
  27     except ImportError:
  28         from StringIO import StringIO
  29 
  30     # Conversion to binary only necessary in Python 3
  31     def b(s):
  32         return s
  33 
  34     bin_type = str
  35     txt_type = unicode
  36 
  37 str_types = (bin_type, txt_type)
  38
  [end of mongoengine/python_support.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/mongoengine/python_support.py b/mongoengine/python_support.py
  --- a/mongoengine/python_support.py
  +++ b/mongoengine/python_support.py
  @@ -1,9 +1,22 @@
  -"""Helper functions and types to aid with Python 2.5 - 3 support."""
  +"""Helper functions and types to aid with Python 2.6 - 3 support."""
   
   import sys
  +import warnings
  +
   import pymongo
   
   
  +# Show a deprecation warning for people using Python v2.6
  +# TODO remove in mongoengine v0.11.0
  +if sys.version_info[0] == 2 and sys.version_info[1] == 6:
  +    warnings.warn(
  +        'Python v2.6 support is deprecated and is going to be dropped '
  +        'entirely in the upcoming v0.11.0 release. Update your Python '
  +        'version if you want to have access to the latest features and '
  +        'bug fixes in MongoEngine.',
  +        DeprecationWarning
  +    )
  +
   if pymongo.version_tuple[0] < 3:
       IS_PYMONGO_3 = False
   else:
  
verification_info: {"golden_diff": "diff --git a/mongoengine/python_support.py b/mongoengine/python_support.py\n--- a/mongoengine/python_support.py\n+++ b/mongoengine/python_support.py\n@@ -1,9 +1,22 @@\n-\"\"\"Helper functions and types to aid with Python 2.5 - 3 support.\"\"\"\n+\"\"\"Helper functions and types to aid with Python 2.6 - 3 support.\"\"\"\n \n import sys\n+import warnings\n+\n import pymongo\n \n \n+# Show a deprecation warning for people using Python v2.6\n+# TODO remove in mongoengine v0.11.0\n+if sys.version_info[0] == 2 and sys.version_info[1] == 6:\n+    warnings.warn(\n+        'Python v2.6 support is deprecated and is going to be dropped '\n+        'entirely in the upcoming v0.11.0 release. Update your Python '\n+        'version if you want to have access to the latest features and '\n+        'bug fixes in MongoEngine.',\n+        DeprecationWarning\n+    )\n+\n if pymongo.version_tuple[0] < 3:\n     IS_PYMONGO_3 = False\n else:\n", "issue": "Drop Python 2.6 support\nFor the most relevant discussion about the topic, see #1294.\r\n\r\nPlan:\r\n1. In the upcoming minor release, I'm going to include `warnings.warn(msg, DeprecationWarning)`. with the message saying \"Python v2.6 support is deprecated and is going to be dropped entirely in the upcoming v0.11.0 release. Update your Python version if you want to have access to the latest features and bug fixes in MongoEngine.\"\r\n2. In v0.11.0 (most likely shipped with #1428), I'll update the way we do dict comprehensions and other relics of the past, thus making it truly incompatible with v2.6.\r\n\r\nCc @lafrech @gukoff \n", "before_files": [{"content": "\"\"\"Helper functions and types to aid with Python 2.5 - 3 support.\"\"\"\n\nimport sys\nimport pymongo\n\n\nif pymongo.version_tuple[0] < 3:\n    IS_PYMONGO_3 = False\nelse:\n    IS_PYMONGO_3 = True\n\nPY3 = sys.version_info[0] == 3\n\nif PY3:\n    import codecs\n    from io import BytesIO as StringIO\n\n    # return s converted to binary.  b('test') should be equivalent to b'test'\n    def b(s):\n        return codecs.latin_1_encode(s)[0]\n\n    bin_type = bytes\n    txt_type = str\nelse:\n    try:\n        from cStringIO import StringIO\n    except ImportError:\n        from StringIO import StringIO\n\n    # Conversion to binary only necessary in Python 3\n    def b(s):\n        return s\n\n    bin_type = str\n    txt_type = unicode\n\nstr_types = (bin_type, txt_type)\n", "path": "mongoengine/python_support.py"}]}