prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  weak regex'es for apache
  See email on fail2ban-users
  
  
  </issue>
  <code>
  [start of common/version.py]
  1 # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-
  2 # vi: set ft=python sts=4 ts=4 sw=4 noet :
  3 
  4 # This file is part of Fail2Ban.
  5 #
  6 # Fail2Ban is free software; you can redistribute it and/or modify
  7 # it under the terms of the GNU General Public License as published by
  8 # the Free Software Foundation; either version 2 of the License, or
  9 # (at your option) any later version.
  10 #
  11 # Fail2Ban is distributed in the hope that it will be useful,
  12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14 # GNU General Public License for more details.
  15 #
  16 # You should have received a copy of the GNU General Public License
  17 # along with Fail2Ban; if not, write to the Free Software
  18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  19 
  20 # Author: Cyril Jaquier
  21 #
  22 
  23 __author__ = "Cyril Jaquier, Yaroslav Halchenko"
  24 __copyright__ = "Copyright (c) 2004 Cyril Jaquier, 2011-2013 Yaroslav Halchenko"
  25 __license__ = "GPL"
  26 
  27 version = "0.8.9.dev"
  28
  [end of common/version.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/common/version.py b/common/version.py
  --- a/common/version.py
  +++ b/common/version.py
  @@ -24,4 +24,4 @@
   __copyright__ = "Copyright (c) 2004 Cyril Jaquier, 2011-2013 Yaroslav Halchenko"
   __license__ = "GPL"
   
  -version = "0.8.9.dev"
  +version = "0.8.10"
  
verification_info: {"golden_diff": "diff --git a/common/version.py b/common/version.py\n--- a/common/version.py\n+++ b/common/version.py\n@@ -24,4 +24,4 @@\n __copyright__ = \"Copyright (c) 2004 Cyril Jaquier, 2011-2013 Yaroslav Halchenko\"\n __license__ = \"GPL\"\n \n-version = \"0.8.9.dev\"\n+version = \"0.8.10\"\n", "issue": "weak regex'es for apache\nSee email on fail2ban-users\n\n", "before_files": [{"content": "# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-\n# vi: set ft=python sts=4 ts=4 sw=4 noet :\n\n# This file is part of Fail2Ban.\n#\n# Fail2Ban is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# Fail2Ban is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with Fail2Ban; if not, write to the Free Software\n# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n\n# Author: Cyril Jaquier\n#\n\n__author__ = \"Cyril Jaquier, Yaroslav Halchenko\"\n__copyright__ = \"Copyright (c) 2004 Cyril Jaquier, 2011-2013 Yaroslav Halchenko\"\n__license__ = \"GPL\"\n\nversion = \"0.8.9.dev\"\n", "path": "common/version.py"}]}