prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Exception on startup (pygments_cache)
  <!--- Provide a general summary of the issue in the Title above -->
  <!--- If you have a question along the lines of "How do I do this Bash command in xonsh"
  please first look over the Bash to Xonsh translation guide: http://xon.sh/bash_to_xsh.html
  If you don't find an answer there, please do open an issue! -->
  
  ## xonfig
  <!--- Please post the output of the `xonfig` command (run from inside xonsh) so we know more about your current setup -->
  
  ## Expected Behavior
  <!--- Tell us what should happen -->
  
  ## Current Behavior
  <!--- Tell us what happens instead of the expected behavior -->
  <!--- If part of your bug report is a traceback, please first enter debug mode before triggering the error
  To enter debug mode, set the environment variable `XONSH_DEBUG=1` _before_ starting `xonsh`.  
  On Linux and OSX, an easy way to to do this is to run `env XONSH_DEBUG=1 xonsh` -->
  
  ## Steps to Reproduce
  <!--- Please try to write out a minimal reproducible snippet to trigger the bug, it will help us fix it! -->
  
  
  </issue>
  <code>
  [start of xonsh/ptk2/__init__.py]
  1 # must come before ptk / pygments imports
  2 from xonsh.lazyasd import load_module_in_background
  3 
  4 load_module_in_background(
  5     "pkg_resources",
  6     debug="XONSH_DEBUG",
  7     replacements={"pygments.plugin": "pkg_resources"},
  8 )
  9
  [end of xonsh/ptk2/__init__.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/xonsh/ptk2/__init__.py b/xonsh/ptk2/__init__.py
  --- a/xonsh/ptk2/__init__.py
  +++ b/xonsh/ptk2/__init__.py
  @@ -1,8 +0,0 @@
  -# must come before ptk / pygments imports
  -from xonsh.lazyasd import load_module_in_background
  -
  -load_module_in_background(
  -    "pkg_resources",
  -    debug="XONSH_DEBUG",
  -    replacements={"pygments.plugin": "pkg_resources"},
  -)
  
verification_info: {"golden_diff": "diff --git a/xonsh/ptk2/__init__.py b/xonsh/ptk2/__init__.py\n--- a/xonsh/ptk2/__init__.py\n+++ b/xonsh/ptk2/__init__.py\n@@ -1,8 +0,0 @@\n-# must come before ptk / pygments imports\n-from xonsh.lazyasd import load_module_in_background\n-\n-load_module_in_background(\n-    \"pkg_resources\",\n-    debug=\"XONSH_DEBUG\",\n-    replacements={\"pygments.plugin\": \"pkg_resources\"},\n-)\n", "issue": "Exception on startup (pygments_cache)\n<!--- Provide a general summary of the issue in the Title above -->\r\n<!--- If you have a question along the lines of \"How do I do this Bash command in xonsh\"\r\nplease first look over the Bash to Xonsh translation guide: http://xon.sh/bash_to_xsh.html\r\nIf you don't find an answer there, please do open an issue! -->\r\n\r\n## xonfig\r\n<!--- Please post the output of the `xonfig` command (run from inside xonsh) so we know more about your current setup -->\r\n\r\n## Expected Behavior\r\n<!--- Tell us what should happen -->\r\n\r\n## Current Behavior\r\n<!--- Tell us what happens instead of the expected behavior -->\r\n<!--- If part of your bug report is a traceback, please first enter debug mode before triggering the error\r\nTo enter debug mode, set the environment variable `XONSH_DEBUG=1` _before_ starting `xonsh`.  \r\nOn Linux and OSX, an easy way to to do this is to run `env XONSH_DEBUG=1 xonsh` -->\r\n\r\n## Steps to Reproduce\r\n<!--- Please try to write out a minimal reproducible snippet to trigger the bug, it will help us fix it! -->\r\n\n", "before_files": [{"content": "# must come before ptk / pygments imports\nfrom xonsh.lazyasd import load_module_in_background\n\nload_module_in_background(\n    \"pkg_resources\",\n    debug=\"XONSH_DEBUG\",\n    replacements={\"pygments.plugin\": \"pkg_resources\"},\n)\n", "path": "xonsh/ptk2/__init__.py"}]}