prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Incorrect logging level for `oauth2client.contrib.locked_file` (ref #427)
  This is - as per request in the original #427 - a follow-up issue.
  
  The function documentation says:
  
  > Detects an appropriate cache module and returns it. Returns `googleapiclient.discovery_cache.base.Cache`, a cache object which is auto detected, or `None` if no cache object is available.
  
  Exceptions in this context only provide a pythonic way to do control flow, and do not indicate anomalies or malfunctioning of the code.  `None` is a perfectly fine, as-per-specifications behaviour.  The correct level should probably be `INFO`.
  
  Also, even if you would stand by the `WARNING` level, you should tidy up the messy log message.  This is what the user is met with:
  
  ```WARNING:googleapiclient.discovery_cache:file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth
  Traceback (most recent call last):
    File "/home/mac/dev/flashfaces/flashfaces/lib/python3.8/site-packages/googleapiclient/discovery_cache/__init__.py", line 36, in autodetect
      from google.appengine.api import memcache
  ModuleNotFoundError: No module named 'google.appengine'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/home/mac/dev/flashfaces/flashfaces/lib/python3.8/site-packages/googleapiclient/discovery_cache/file_cache.py", line 33, in <module>
      from oauth2client.contrib.locked_file import LockedFile
  ModuleNotFoundError: No module named 'oauth2client.contrib.locked_file'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/home/mac/dev/flashfaces/flashfaces/lib/python3.8/site-packages/googleapiclient/discovery_cache/file_cache.py", line 37, in <module>
      from oauth2client.locked_file import LockedFile
  ModuleNotFoundError: No module named 'oauth2client.locked_file'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/home/mac/dev/flashfaces/flashfaces/lib/python3.8/site-packages/googleapiclient/discovery_cache/__init__.py", line 42, in autodetect
      from . import file_cache
    File "/home/mac/dev/flashfaces/flashfaces/lib/python3.8/site-packages/googleapiclient/discovery_cache/file_cache.py", line 40, in <module>
      raise ImportError(
  ImportError: file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth
  ```
  
  A saner way to to communicate with the user could potentially be:
  
  `WARNING - No caching available (file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth)`
  
  
  </issue>
  <code>
  [start of googleapiclient/discovery_cache/__init__.py]
  1 # Copyright 2014 Google Inc. All Rights Reserved.
  2 #
  3 # Licensed under the Apache License, Version 2.0 (the "License");
  4 # you may not use this file except in compliance with the License.
  5 # You may obtain a copy of the License at
  6 #
  7 #      http://www.apache.org/licenses/LICENSE-2.0
  8 #
  9 # Unless required by applicable law or agreed to in writing, software
  10 # distributed under the License is distributed on an "AS IS" BASIS,
  11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 # See the License for the specific language governing permissions and
  13 # limitations under the License.
  14 
  15 """Caching utility for the discovery document."""
  16 
  17 from __future__ import absolute_import
  18 
  19 import logging
  20 import datetime
  21 import os
  22 
  23 LOGGER = logging.getLogger(__name__)
  24 
  25 DISCOVERY_DOC_MAX_AGE = 60 * 60 * 24  # 1 day
  26 
  27 
  28 def autodetect():
  29     """Detects an appropriate cache module and returns it.
  30 
  31   Returns:
  32     googleapiclient.discovery_cache.base.Cache, a cache object which
  33     is auto detected, or None if no cache object is available.
  34   """
  35     if 'APPENGINE_RUNTIME' in os.environ:
  36         try:
  37             from google.appengine.api import memcache
  38             from . import appengine_memcache
  39 
  40             return appengine_memcache.cache
  41         except Exception:
  42             pass
  43     try:
  44         from . import file_cache
  45 
  46         return file_cache.cache
  47     except Exception as e:
  48         LOGGER.warning(e, exc_info=True)
  49         return None
  50
  [end of googleapiclient/discovery_cache/__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/googleapiclient/discovery_cache/__init__.py b/googleapiclient/discovery_cache/__init__.py
  --- a/googleapiclient/discovery_cache/__init__.py
  +++ b/googleapiclient/discovery_cache/__init__.py
  @@ -44,6 +44,7 @@
           from . import file_cache
   
           return file_cache.cache
  -    except Exception as e:
  -        LOGGER.warning(e, exc_info=True)
  +    except Exception:
  +        LOGGER.info("file_cache is only supported with oauth2client<4.0.0",
  +            exc_info=False)
           return None
  
verification_info: {"golden_diff": "diff --git a/googleapiclient/discovery_cache/__init__.py b/googleapiclient/discovery_cache/__init__.py\n--- a/googleapiclient/discovery_cache/__init__.py\n+++ b/googleapiclient/discovery_cache/__init__.py\n@@ -44,6 +44,7 @@\n         from . import file_cache\n \n         return file_cache.cache\n-    except Exception as e:\n-        LOGGER.warning(e, exc_info=True)\n+    except Exception:\n+        LOGGER.info(\"file_cache is only supported with oauth2client<4.0.0\",\n+            exc_info=False)\n         return None\n", "issue": "Incorrect logging level for `oauth2client.contrib.locked_file` (ref #427)\nThis is - as per request in the original #427 - a follow-up issue.\r\n\r\nThe function documentation says:\r\n\r\n> Detects an appropriate cache module and returns it. Returns `googleapiclient.discovery_cache.base.Cache`, a cache object which is auto detected, or `None` if no cache object is available.\r\n\r\nExceptions in this context only provide a pythonic way to do control flow, and do not indicate anomalies or malfunctioning of the code.  `None` is a perfectly fine, as-per-specifications behaviour.  The correct level should probably be `INFO`.\r\n\r\nAlso, even if you would stand by the `WARNING` level, you should tidy up the messy log message.  This is what the user is met with:\r\n\r\n```WARNING:googleapiclient.discovery_cache:file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth\r\nTraceback (most recent call last):\r\n  File \"/home/mac/dev/flashfaces/flashfaces/lib/python3.8/site-packages/googleapiclient/discovery_cache/__init__.py\", line 36, in autodetect\r\n    from google.appengine.api import memcache\r\nModuleNotFoundError: No module named 'google.appengine'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/mac/dev/flashfaces/flashfaces/lib/python3.8/site-packages/googleapiclient/discovery_cache/file_cache.py\", line 33, in <module>\r\n    from oauth2client.contrib.locked_file import LockedFile\r\nModuleNotFoundError: No module named 'oauth2client.contrib.locked_file'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/mac/dev/flashfaces/flashfaces/lib/python3.8/site-packages/googleapiclient/discovery_cache/file_cache.py\", line 37, in <module>\r\n    from oauth2client.locked_file import LockedFile\r\nModuleNotFoundError: No module named 'oauth2client.locked_file'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/mac/dev/flashfaces/flashfaces/lib/python3.8/site-packages/googleapiclient/discovery_cache/__init__.py\", line 42, in autodetect\r\n    from . import file_cache\r\n  File \"/home/mac/dev/flashfaces/flashfaces/lib/python3.8/site-packages/googleapiclient/discovery_cache/file_cache.py\", line 40, in <module>\r\n    raise ImportError(\r\nImportError: file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth\r\n```\r\n\r\nA saner way to to communicate with the user could potentially be:\r\n\r\n`WARNING - No caching available (file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth)`\r\n\n", "before_files": [{"content": "# Copyright 2014 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"Caching utility for the discovery document.\"\"\"\n\nfrom __future__ import absolute_import\n\nimport logging\nimport datetime\nimport os\n\nLOGGER = logging.getLogger(__name__)\n\nDISCOVERY_DOC_MAX_AGE = 60 * 60 * 24  # 1 day\n\n\ndef autodetect():\n    \"\"\"Detects an appropriate cache module and returns it.\n\n  Returns:\n    googleapiclient.discovery_cache.base.Cache, a cache object which\n    is auto detected, or None if no cache object is available.\n  \"\"\"\n    if 'APPENGINE_RUNTIME' in os.environ:\n        try:\n            from google.appengine.api import memcache\n            from . import appengine_memcache\n\n            return appengine_memcache.cache\n        except Exception:\n            pass\n    try:\n        from . import file_cache\n\n        return file_cache.cache\n    except Exception as e:\n        LOGGER.warning(e, exc_info=True)\n        return None\n", "path": "googleapiclient/discovery_cache/__init__.py"}]}