We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN 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'

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
```
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 FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

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'),

{"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"}], "after_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.0dev'},\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"}]}