prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  custodian validate failed with latest docker image
  We are using cloudcustodian/c7n:latest, and getting errors below:
  
  > 09:39:41 + custodian validate policy.yaml
  > 09:39:41 Traceback (most recent call last):
  > 09:39:41   File "/usr/local/bin/custodian", line 8, in <module>
  > 09:39:41     sys.exit(main())
  > 09:39:41   File "/usr/local/lib/python3.7/site-packages/c7n/cli.py", line 374, in main
  > 09:39:41     command(config)
  > 09:39:41   File "/usr/local/lib/python3.7/site-packages/c7n/commands.py", line 204, in validate
  > 09:39:41     load_resources()
  > 09:39:41   File "/usr/local/lib/python3.7/site-packages/c7n/resources/__init__.py", line 113, in load_resources
  > 09:39:41     initialize_azure()
  > 09:39:41   File "/usr/local/lib/python3.7/site-packages/c7n_azure/entry.py", line 21, in initialize_azure
  > 09:39:41     import c7n_azure.policy
  > 09:39:41   File "/usr/local/lib/python3.7/site-packages/c7n_azure/policy.py", line 28, in <module>
  > 09:39:41     from c7n_azure.resources.arm import ArmResourceManager
  > 09:39:41   File "/usr/local/lib/python3.7/site-packages/c7n_azure/resources/arm.py", line 24, in <module>
  > 09:39:41     from c7n_azure.query import QueryResourceManager, QueryMeta, ChildResourceManager, TypeInfo, \
  > 09:39:41   File "/usr/local/lib/python3.7/site-packages/c7n_azure/query.py", line 397, in <module>
  > 09:39:41     resources.subscribe(QueryResourceManager.register_actions_and_filters)
  > 09:39:41 TypeError: subscribe() missing 1 required positional argument: 'func'
  
  </issue>
  <code>
  [start of setup.py]
  1 import os
  2 from io import open
  3 from setuptools import setup, find_packages
  4 
  5 
  6 def read(fname):
  7     return open(os.path.join(os.path.dirname(__file__), fname), encoding='utf-8').read()
  8 
  9 
  10 setup(
  11     name="c7n",
  12     use_scm_version={'write_to': 'c7n/version.py', 'fallback_version': '0.9.0-unreleased'},
  13     setup_requires=['setuptools_scm'],
  14     description="Cloud Custodian - Policy Rules Engine",
  15     long_description=read('README.md'),
  16     long_description_content_type='text/markdown',
  17     classifiers=[
  18         'Topic :: System :: Systems Administration',
  19         'Topic :: System :: Distributed Computing',
  20         'License :: OSI Approved :: Apache Software License',
  21         'Programming Language :: Python :: 2.7',
  22         'Programming Language :: Python :: 3.6',
  23         'Programming Language :: Python :: 3.7',
  24         'Programming Language :: Python :: 3.8',
  25     ],
  26     url="https://github.com/cloud-custodian/cloud-custodian",
  27     license="Apache-2.0",
  28     packages=find_packages(),
  29     python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3, !=3.4, !=3.5, <4'",
  30     entry_points={
  31         'console_scripts': [
  32             'custodian = c7n.cli:main']},
  33     install_requires=[
  34         "boto3>=1.9.228",
  35         "botocore>=1.13.46",
  36         "python-dateutil>=2.6,<3.0.0",
  37         "PyYAML>=5.1",
  38         "jsonschema",
  39         "jsonpatch>=1.21",
  40         "argcomplete",
  41         "tabulate>=0.8.2",
  42         "urllib3",
  43         "certifi"
  44     ],
  45     extra_requires={
  46         ":python_version<'3.3'": ["backports.functools-lru-cache"]
  47     }
  48 )
  49
  [end of setup.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/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -9,7 +9,7 @@
   
   setup(
       name="c7n",
  -    use_scm_version={'write_to': 'c7n/version.py', 'fallback_version': '0.9.0-unreleased'},
  +    use_scm_version={'write_to': 'c7n/version.py', 'fallback_version': '0.9.0dev'},
       setup_requires=['setuptools_scm'],
       description="Cloud Custodian - Policy Rules Engine",
       long_description=read('README.md'),
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -9,7 +9,7 @@\n \n setup(\n     name=\"c7n\",\n-    use_scm_version={'write_to': 'c7n/version.py', 'fallback_version': '0.9.0-unreleased'},\n+    use_scm_version={'write_to': 'c7n/version.py', 'fallback_version': '0.9.0dev'},\n     setup_requires=['setuptools_scm'],\n     description=\"Cloud Custodian - Policy Rules Engine\",\n     long_description=read('README.md'),\n", "issue": "custodian validate failed with latest docker image\nWe are using cloudcustodian/c7n:latest, and getting errors below:\r\n\r\n> 09:39:41 + custodian validate policy.yaml\r\n> 09:39:41 Traceback (most recent call last):\r\n> 09:39:41   File \"/usr/local/bin/custodian\", line 8, in <module>\r\n> 09:39:41     sys.exit(main())\r\n> 09:39:41   File \"/usr/local/lib/python3.7/site-packages/c7n/cli.py\", line 374, in main\r\n> 09:39:41     command(config)\r\n> 09:39:41   File \"/usr/local/lib/python3.7/site-packages/c7n/commands.py\", line 204, in validate\r\n> 09:39:41     load_resources()\r\n> 09:39:41   File \"/usr/local/lib/python3.7/site-packages/c7n/resources/__init__.py\", line 113, in load_resources\r\n> 09:39:41     initialize_azure()\r\n> 09:39:41   File \"/usr/local/lib/python3.7/site-packages/c7n_azure/entry.py\", line 21, in initialize_azure\r\n> 09:39:41     import c7n_azure.policy\r\n> 09:39:41   File \"/usr/local/lib/python3.7/site-packages/c7n_azure/policy.py\", line 28, in <module>\r\n> 09:39:41     from c7n_azure.resources.arm import ArmResourceManager\r\n> 09:39:41   File \"/usr/local/lib/python3.7/site-packages/c7n_azure/resources/arm.py\", line 24, in <module>\r\n> 09:39:41     from c7n_azure.query import QueryResourceManager, QueryMeta, ChildResourceManager, TypeInfo, \\\r\n> 09:39:41   File \"/usr/local/lib/python3.7/site-packages/c7n_azure/query.py\", line 397, in <module>\r\n> 09:39:41     resources.subscribe(QueryResourceManager.register_actions_and_filters)\r\n> 09:39:41 TypeError: subscribe() missing 1 required positional argument: 'func'\n", "before_files": [{"content": "import os\nfrom io import open\nfrom setuptools import setup, find_packages\n\n\ndef read(fname):\n    return open(os.path.join(os.path.dirname(__file__), fname), encoding='utf-8').read()\n\n\nsetup(\n    name=\"c7n\",\n    use_scm_version={'write_to': 'c7n/version.py', 'fallback_version': '0.9.0-unreleased'},\n    setup_requires=['setuptools_scm'],\n    description=\"Cloud Custodian - Policy Rules Engine\",\n    long_description=read('README.md'),\n    long_description_content_type='text/markdown',\n    classifiers=[\n        'Topic :: System :: Systems Administration',\n        'Topic :: System :: Distributed Computing',\n        'License :: OSI Approved :: Apache Software License',\n        'Programming Language :: Python :: 2.7',\n        'Programming Language :: Python :: 3.6',\n        'Programming Language :: Python :: 3.7',\n        'Programming Language :: Python :: 3.8',\n    ],\n    url=\"https://github.com/cloud-custodian/cloud-custodian\",\n    license=\"Apache-2.0\",\n    packages=find_packages(),\n    python_requires=\">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3, !=3.4, !=3.5, <4'\",\n    entry_points={\n        'console_scripts': [\n            'custodian = c7n.cli:main']},\n    install_requires=[\n        \"boto3>=1.9.228\",\n        \"botocore>=1.13.46\",\n        \"python-dateutil>=2.6,<3.0.0\",\n        \"PyYAML>=5.1\",\n        \"jsonschema\",\n        \"jsonpatch>=1.21\",\n        \"argcomplete\",\n        \"tabulate>=0.8.2\",\n        \"urllib3\",\n        \"certifi\"\n    ],\n    extra_requires={\n        \":python_version<'3.3'\": [\"backports.functools-lru-cache\"]\n    }\n)\n", "path": "setup.py"}]}