prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  reify docstring doesn't render properly
  The testsetup section is omitted from the rendered docs at http://pyramid.readthedocs.io/en/latest/api/decorator.html#pyramid.decorator.reify
  
  Unfortunately this section is essential for understanding the example.
  
  
  </issue>
  <code>
  [start of pyramid/decorator.py]
  1 from functools import update_wrapper
  2 
  3 
  4 class reify(object):
  5     """ Use as a class method decorator.  It operates almost exactly like the
  6     Python ``@property`` decorator, but it puts the result of the method it
  7     decorates into the instance dict after the first call, effectively
  8     replacing the function it decorates with an instance variable.  It is, in
  9     Python parlance, a non-data descriptor.  An example:
  10 
  11     .. testsetup::
  12 
  13         from pyramid.decorator import reify
  14 
  15         class Foo(object):
  16             @reify
  17             def jammy(self):
  18                 print('jammy called')
  19                 return 1
  20 
  21     And usage of Foo:
  22 
  23     .. doctest::
  24 
  25         >>> f = Foo()
  26         >>> v = f.jammy
  27         jammy called
  28         >>> print(v)
  29         1
  30         >>> f.jammy
  31         1
  32         >>> # jammy func not called the second time; it replaced itself with 1
  33         >>> # Note: reassignment is possible
  34         >>> f.jammy = 2
  35         >>> f.jammy
  36         2
  37     """
  38     def __init__(self, wrapped):
  39         self.wrapped = wrapped
  40         update_wrapper(self, wrapped)
  41 
  42     def __get__(self, inst, objtype=None):
  43         if inst is None:
  44             return self
  45         val = self.wrapped(inst)
  46         setattr(inst, self.wrapped.__name__, val)
  47         return val
  48 
  49
  [end of pyramid/decorator.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/pyramid/decorator.py b/pyramid/decorator.py
  --- a/pyramid/decorator.py
  +++ b/pyramid/decorator.py
  @@ -8,6 +8,16 @@
       replacing the function it decorates with an instance variable.  It is, in
       Python parlance, a non-data descriptor.  An example:
   
  +    .. code-block:: python
  +
  +        from pyramid.decorator import reify
  +
  +        class Foo(object):
  +            @reify
  +            def jammy(self):
  +                print('jammy called')
  +                return 1
  +
       .. testsetup::
   
           from pyramid.decorator import reify
  
verification_info: {"golden_diff": "diff --git a/pyramid/decorator.py b/pyramid/decorator.py\n--- a/pyramid/decorator.py\n+++ b/pyramid/decorator.py\n@@ -8,6 +8,16 @@\n     replacing the function it decorates with an instance variable.  It is, in\n     Python parlance, a non-data descriptor.  An example:\n \n+    .. code-block:: python\n+\n+        from pyramid.decorator import reify\n+\n+        class Foo(object):\n+            @reify\n+            def jammy(self):\n+                print('jammy called')\n+                return 1\n+\n     .. testsetup::\n \n         from pyramid.decorator import reify\n", "issue": "reify docstring doesn't render properly\nThe testsetup section is omitted from the rendered docs at http://pyramid.readthedocs.io/en/latest/api/decorator.html#pyramid.decorator.reify\n\nUnfortunately this section is essential for understanding the example.\n\n", "before_files": [{"content": "from functools import update_wrapper\n\n\nclass reify(object):\n    \"\"\" Use as a class method decorator.  It operates almost exactly like the\n    Python ``@property`` decorator, but it puts the result of the method it\n    decorates into the instance dict after the first call, effectively\n    replacing the function it decorates with an instance variable.  It is, in\n    Python parlance, a non-data descriptor.  An example:\n\n    .. testsetup::\n\n        from pyramid.decorator import reify\n\n        class Foo(object):\n            @reify\n            def jammy(self):\n                print('jammy called')\n                return 1\n\n    And usage of Foo:\n\n    .. doctest::\n\n        >>> f = Foo()\n        >>> v = f.jammy\n        jammy called\n        >>> print(v)\n        1\n        >>> f.jammy\n        1\n        >>> # jammy func not called the second time; it replaced itself with 1\n        >>> # Note: reassignment is possible\n        >>> f.jammy = 2\n        >>> f.jammy\n        2\n    \"\"\"\n    def __init__(self, wrapped):\n        self.wrapped = wrapped\n        update_wrapper(self, wrapped)\n\n    def __get__(self, inst, objtype=None):\n        if inst is None:\n            return self\n        val = self.wrapped(inst)\n        setattr(inst, self.wrapped.__name__, val)\n        return val\n\n", "path": "pyramid/decorator.py"}]}